mirror of
https://github.com/boostorg/stacktrace.git
synced 2026-01-19 16:52:10 +00:00
More COM related tests, measure speed of some of the test runs
This commit is contained in:
@@ -13,6 +13,8 @@
|
||||
#include <boost/optional.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
|
||||
#include <boost/timer/timer.hpp>
|
||||
|
||||
#ifdef BOOST_STACKTRACE_DYN_LINK
|
||||
# define BOOST_ST_API BOOST_SYMBOL_IMPORT
|
||||
#else
|
||||
@@ -61,7 +63,20 @@ void main_test_loop() {
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(BOOST_STACKTRACE_TEST_COM_PREINIT_MT) || defined(BOOST_STACKTRACE_TEST_COM_PREINIT_ST)
|
||||
# include <windows.h>
|
||||
# include "dbgeng.h"
|
||||
#endif
|
||||
|
||||
int main() {
|
||||
#if defined(BOOST_STACKTRACE_TEST_COM_PREINIT_MT)
|
||||
::CoInitializeEx(0, COINIT_MULTITHREADED);
|
||||
#elif defined(BOOST_STACKTRACE_TEST_COM_PREINIT_ST)
|
||||
::CoInitializeEx(0, COINIT_APARTMENTTHREADED);
|
||||
#endif
|
||||
|
||||
boost::timer::auto_cpu_timer t;
|
||||
|
||||
boost::thread t1(main_test_loop);
|
||||
boost::thread t2(main_test_loop);
|
||||
boost::thread t3(main_test_loop);
|
||||
@@ -71,5 +86,9 @@ int main() {
|
||||
t2.join();
|
||||
t3.join();
|
||||
|
||||
#if defined(BOOST_STACKTRACE_TEST_COM_PREINIT_MT) || defined(BOOST_STACKTRACE_TEST_COM_PREINIT_ST)
|
||||
::CoUninitialize();
|
||||
#endif
|
||||
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user