Commit 7679d96c authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

gameux/tests: Run the game explorer tests in a multithreaded apartment as well.

parent 95ede766
...@@ -656,30 +656,42 @@ static void test_install_uninstall_game(void) ...@@ -656,30 +656,42 @@ static void test_install_uninstall_game(void)
} }
} }
START_TEST(gameexplorer) static void run_tests(void)
{ {
HRESULT r;
BOOL gameExplorerAvailable = FALSE; BOOL gameExplorerAvailable = FALSE;
BOOL gameExplorer2Available = FALSE; BOOL gameExplorer2Available = FALSE;
test_create(&gameExplorerAvailable, &gameExplorer2Available);
if(gameExplorerAvailable)
test_add_remove_game();
if(gameExplorer2Available)
test_install_uninstall_game();
}
START_TEST(gameexplorer)
{
if(_loadDynamicRoutines()) if(_loadDynamicRoutines())
{ {
r = CoInitialize( NULL ); HRESULT hr;
ok( r == S_OK, "failed to init COM\n");
test_create(&gameExplorerAvailable, &gameExplorer2Available);
if(gameExplorerAvailable) hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
test_add_remove_game(); ok(hr == S_OK, "Failed to initialize COM, hr %#x.\n", hr);
trace("Running apartment threaded tests.\n");
run_tests();
if(SUCCEEDED(hr))
CoUninitialize();
if(gameExplorer2Available) hr = CoInitializeEx(NULL, COINIT_MULTITHREADED);
test_install_uninstall_game(); ok(hr == S_OK, "Failed to initialize COM, hr %#x.\n", hr);
trace("Running multithreaded tests.\n");
run_tests();
if(SUCCEEDED(hr))
CoUninitialize();
} }
else else
/* this is not a failure, because both procedures loaded by address /* this is not a failure, because both procedures loaded by address
* are always available on systems which has gameux.dll */ * are always available on systems which has gameux.dll */
win_skip("too old system, cannot load required dynamic procedures\n"); win_skip("too old system, cannot load required dynamic procedures\n");
CoUninitialize();
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment