From 50400bbe832218a22d7112a2c1aef8e12f6ad59d Mon Sep 17 00:00:00 2001 From: =?utf-8?q?Mariusz=20Pluci=C5=84ski?= Date: Mon, 7 Jun 2010 22:47:46 +0200 Subject: gameux/tests: Add creating test for IGameExplorer --- configure.ac | 1 + dlls/gameux/tests/Makefile.in | 12 ++++++++ dlls/gameux/tests/gameexplorer.c | 56 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 69 insertions(+), 0 deletions(-) create mode 100644 dlls/gameux/tests/Makefile.in create mode 100644 dlls/gameux/tests/gameexplorer.c diff --git a/configure.ac b/configure.ac index 91684b2..b22f55d 100644 --- a/configure.ac +++ b/configure.ac @@ -2357,6 +2357,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..c31fb24 --- /dev/null +++ b/dlls/gameux/tests/Makefile.in @@ -0,0 +1,12 @@ +TOPSRCDIR = @top_srcdir@ +TOPOBJDIR = ../../.. +SRCDIR = @srcdir@ +VPATH = @srcdir@ +TESTDLL = gameux.dll +IMPORTS = oleaut32 ole32 user32 kernel32 + +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..008853e --- /dev/null +++ b/dlls/gameux/tests/gameexplorer.c @@ -0,0 +1,56 @@ +/* + * 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 r; + + IGameExplorer* ge = NULL; + + r = CoCreateInstance( &CLSID_GameExplorer, NULL, CLSCTX_INPROC_SERVER, &IID_IGameExplorer, (LPVOID*)&ge); + + ok( r == S_OK, "IGameExplorer creating failed (result false)\n"); + ok( ge != NULL, "IGameExplorer creating failed (NULL interface pointer)\n"); +} + +START_TEST(gameexplorer) +{ + HRESULT r; + + r = CoInitialize( NULL ); + ok( r == S_OK, "failed to init COM\n"); + + test_create(); + + CoUninitialize(); +} -- 1.6.2.5