Added first test.
Robert Wilhelm
robert.wilhelm at gmx.net
Thu Mar 5 16:54:03 CST 2009
---
configure.ac | 1 +
dlls/vbscript/tests/Makefile.in | 13 ++++++++
dlls/vbscript/tests/vbscript.c | 61 +++++++++++++++++++++++++++++++++++++++
3 files changed, 75 insertions(+), 0 deletions(-)
create mode 100644 dlls/vbscript/tests/Makefile.in
create mode 100644 dlls/vbscript/tests/vbscript.c
diff --git a/configure.ac b/configure.ac
index 7325953..4c9a9db 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2206,6 +2206,7 @@ WINE_CONFIG_MAKEFILE([dlls/uuid/Makefile],[dlls/Makeimplib.rules],[dlls],[ALL_IM
WINE_CONFIG_MAKEFILE([dlls/uxtheme/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
WINE_CONFIG_MAKEFILE([dlls/uxtheme/tests/Makefile],[dlls/Maketest.rules],[dlls],[ALL_TEST_DIRS],[enable_tests])
WINE_CONFIG_MAKEFILE([dlls/vbscript/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
+WINE_CONFIG_MAKEFILE([dlls/vbscript/tests/Makefile],[dlls/Maketest.rules],[dlls],[ALL_TEST_DIRS],[enable_tests])
WINE_CONFIG_MAKEFILE([dlls/vdhcp.vxd/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
WINE_CONFIG_MAKEFILE([dlls/vdmdbg/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
WINE_CONFIG_MAKEFILE([dlls/version/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
diff --git a/dlls/vbscript/tests/Makefile.in b/dlls/vbscript/tests/Makefile.in
new file mode 100644
index 0000000..a3addb4
--- /dev/null
+++ b/dlls/vbscript/tests/Makefile.in
@@ -0,0 +1,13 @@
+TOPSRCDIR = @top_srcdir@
+TOPOBJDIR = ../../..
+SRCDIR = @srcdir@
+VPATH = @srcdir@
+TESTDLL = vbscript.dll
+IMPORTS = oleaut32 ole32 kernel32
+
+CTESTS = \
+ vbscript.c
+
+ at MAKE_TEST_RULES@
+
+ at DEPENDENCIES@ # everything below this line is overwritten by make depend
diff --git a/dlls/vbscript/tests/vbscript.c b/dlls/vbscript/tests/vbscript.c
new file mode 100644
index 0000000..d5e97fb
--- /dev/null
+++ b/dlls/vbscript/tests/vbscript.c
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2008 Jacek Caban for CodeWeavers
+ * Copyright 2009 Robert Wilhelm
+ *
+ * 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
+#define CONST_VTABLE
+
+#include <initguid.h>
+#include <ole2.h>
+#include <activscp.h>
+#include <objsafe.h>
+#include <dispex.h>
+
+#include "wine/test.h"
+
+DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
+
+static const CLSID CLSID_VBScript =
+ {0xb54f3741,0x5b07,0x11cf,{0xa4,0xb0,0x00,0xaa,0x00,0x4a,0x55,0xe8}};
+
+
+static void test_vbscript(void)
+{
+ IUnknown *unk;
+ ULONG ref;
+ HRESULT hres;
+
+ hres = CoCreateInstance(&CLSID_VBScript, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
+ &IID_IUnknown, (void**)&unk);
+ ok(hres == S_OK, "CoCreateInstance failed: %08x\n", hres);
+ if(FAILED(hres))
+ return;
+
+ ref = IUnknown_Release(unk);
+ ok(!ref, "ref = %d\n", ref);
+}
+
+
+START_TEST(vbscript)
+{
+ CoInitialize(NULL);
+
+ test_vbscript();
+
+ CoUninitialize();
+}
--
1.6.0.6
--=-My2U9KCJTi4b9Pc+t/03--
More information about the wine-patches
mailing list