gameux/tests: Run the game explorer tests in a multithreaded apartment as well.
This commit is contained in:
parent
95ede76673
commit
7679d96c86
|
@ -656,17 +656,11 @@ static void test_install_uninstall_game(void)
|
|||
}
|
||||
}
|
||||
|
||||
START_TEST(gameexplorer)
|
||||
static void run_tests(void)
|
||||
{
|
||||
HRESULT r;
|
||||
BOOL gameExplorerAvailable = FALSE;
|
||||
BOOL gameExplorer2Available = FALSE;
|
||||
|
||||
if(_loadDynamicRoutines())
|
||||
{
|
||||
r = CoInitialize( NULL );
|
||||
ok( r == S_OK, "failed to init COM\n");
|
||||
|
||||
test_create(&gameExplorerAvailable, &gameExplorer2Available);
|
||||
|
||||
if(gameExplorerAvailable)
|
||||
|
@ -675,11 +669,29 @@ START_TEST(gameexplorer)
|
|||
if(gameExplorer2Available)
|
||||
test_install_uninstall_game();
|
||||
}
|
||||
|
||||
START_TEST(gameexplorer)
|
||||
{
|
||||
if(_loadDynamicRoutines())
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
ok(hr == S_OK, "Failed to initialize COM, hr %#x.\n", hr);
|
||||
trace("Running apartment threaded tests.\n");
|
||||
run_tests();
|
||||
if(SUCCEEDED(hr))
|
||||
CoUninitialize();
|
||||
|
||||
hr = CoInitializeEx(NULL, COINIT_MULTITHREADED);
|
||||
ok(hr == S_OK, "Failed to initialize COM, hr %#x.\n", hr);
|
||||
trace("Running multithreaded tests.\n");
|
||||
run_tests();
|
||||
if(SUCCEEDED(hr))
|
||||
CoUninitialize();
|
||||
}
|
||||
else
|
||||
/* this is not a failure, because both procedures loaded by address
|
||||
* are always available on systems which has gameux.dll */
|
||||
win_skip("too old system, cannot load required dynamic procedures\n");
|
||||
|
||||
|
||||
CoUninitialize();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue