Module: wine Branch: master Commit: cb886f49bead941476eb3f643c337bb1311ab7d6 URL: http://source.winehq.org/git/wine.git/?a=commit;h=cb886f49bead941476eb3f643c...
Author: Mariusz Pluciński vshader@gmail.com Date: Tue Aug 3 11:58:01 2010 +0200
gameux/tests: Add test of IGameExplorer creation.
---
configure | 1 + configure.ac | 1 + dlls/gameux/tests/Makefile.in | 12 +++++++ dlls/gameux/tests/gameexplorer.c | 61 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 75 insertions(+), 0 deletions(-)
diff --git a/configure b/configure index 3a5b7b6..bc1196c 100755 --- a/configure +++ b/configure @@ -14511,6 +14511,7 @@ wine_fn_config_dll fusion enable_fusion wine_fn_config_test dlls/fusion/tests fusion_test wine_fn_config_dll fwpuclnt enable_fwpuclnt wine_fn_config_dll gameux enable_gameux +wine_fn_config_test dlls/gameux/tests gameux_test wine_fn_config_dll gdi.exe16 enable_win16 wine_fn_config_dll gdi32 enable_gdi32 gdi32 wine_fn_config_test dlls/gdi32/tests gdi32_test diff --git a/configure.ac b/configure.ac index 37b0cf0..b5430bd 100644 --- a/configure.ac +++ b/configure.ac @@ -2367,6 +2367,7 @@ WINE_CONFIG_DLL(fusion) WINE_CONFIG_TEST(dlls/fusion/tests) WINE_CONFIG_DLL(fwpuclnt) WINE_CONFIG_DLL(gameux) +WINE_CONFIG_TEST(dlls/gameux/tests) WINE_CONFIG_DLL(gdi.exe16,enable_win16) WINE_CONFIG_DLL(gdi32,,[gdi32]) WINE_CONFIG_TEST(dlls/gdi32/tests) diff --git a/dlls/gameux/tests/Makefile.in b/dlls/gameux/tests/Makefile.in new file mode 100644 index 0000000..b8e27d7 --- /dev/null +++ b/dlls/gameux/tests/Makefile.in @@ -0,0 +1,12 @@ +TOPSRCDIR = @top_srcdir@ +TOPOBJDIR = ../../.. +SRCDIR = @srcdir@ +VPATH = @srcdir@ +TESTDLL = gameux.dll +IMPORTS = ole32 + +C_SRCS = \ + gameexplorer.c + + +@MAKE_TEST_RULES@ diff --git a/dlls/gameux/tests/gameexplorer.c b/dlls/gameux/tests/gameexplorer.c new file mode 100644 index 0000000..b87fd02 --- /dev/null +++ b/dlls/gameux/tests/gameexplorer.c @@ -0,0 +1,61 @@ +/* + * IGameExplorer tests + * + * Copyright (C) 2010 Mariusz Pluciński + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#define COBJMACROS + +#include "initguid.h" + +#include "windows.h" +#include "ole2.h" +#include "objsafe.h" +#include "objbase.h" +#include "gameux.h" + +#include "wine/test.h" + + +static void test_create( void ) +{ + HRESULT hr; + + IGameExplorer* ge = NULL; + + /* interface available up from Vista */ + hr = CoCreateInstance( &CLSID_GameExplorer, NULL, CLSCTX_INPROC_SERVER, &IID_IGameExplorer, (LPVOID*)&ge); + if(ge) + { + ok(hr == S_OK, "IGameExplorer creating failed (result false)\n"); + IGameExplorer_Release(ge); + } + else + win_skip("IGameExplorer cannot be created\n"); +} + +START_TEST(gameexplorer) +{ + HRESULT r; + + r = CoInitialize( NULL ); + ok( r == S_OK, "failed to init COM\n"); + + test_create(); + + CoUninitialize(); +}