Mariusz Pluciński : gameux/tests: Add test of IGameStatisticsMgr creation.

Alexandre Julliard julliard at winehq.org
Tue Aug 17 11:31:18 CDT 2010


Module: wine
Branch: master
Commit: 152fbc1c3f7ab8e44ed002681f3e3ebe466df9c2
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=152fbc1c3f7ab8e44ed002681f3e3ebe466df9c2

Author: Mariusz Pluciński <vshader at gmail.com>
Date:   Mon Aug 16 09:57:34 2010 +0200

gameux/tests: Add test of IGameStatisticsMgr creation.

---

 dlls/gameux/tests/Makefile.in      |    3 +-
 dlls/gameux/tests/gamestatistics.c |   53 ++++++++++++++++++++++++++++++++++++
 2 files changed, 55 insertions(+), 1 deletions(-)

diff --git a/dlls/gameux/tests/Makefile.in b/dlls/gameux/tests/Makefile.in
index b8e27d7..7188e74 100644
--- a/dlls/gameux/tests/Makefile.in
+++ b/dlls/gameux/tests/Makefile.in
@@ -6,7 +6,8 @@ TESTDLL   = gameux.dll
 IMPORTS   = ole32
 
 C_SRCS = \
-	gameexplorer.c
+	gameexplorer.c \
+	gamestatistics.c
 
 
 @MAKE_TEST_RULES@
diff --git a/dlls/gameux/tests/gamestatistics.c b/dlls/gameux/tests/gamestatistics.c
new file mode 100644
index 0000000..3a8260c
--- /dev/null
+++ b/dlls/gameux/tests/gamestatistics.c
@@ -0,0 +1,53 @@
+/*
+ * IGameStatisticsMgr 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 "gameux.h"
+#include "wine/test.h"
+
+static void test_create( void )
+{
+    HRESULT hr;
+
+    IGameStatisticsMgr* gsm = NULL;
+
+    /* interface available up from Win7 */
+    hr = CoCreateInstance( &CLSID_GameStatistics, NULL, CLSCTX_INPROC_SERVER, &IID_IGameStatisticsMgr, (LPVOID*)&gsm);
+    if(gsm)
+    {
+        ok( hr == S_OK, "IGameStatisticsMgr creating failed (result: 0x%08x)\n", hr);
+        IGameStatisticsMgr_Release(gsm);
+    }
+    else
+        win_skip("IGameStatisticsMgr cannot be created\n");
+}
+
+START_TEST(gamestatistics)
+{
+    HRESULT hr;
+
+    hr = CoInitialize( NULL );
+    ok( hr == S_OK, "failed to init COM\n");
+
+    test_create();
+
+    CoUninitialize();
+}




More information about the wine-cvs mailing list