localspl/tests: [3/3] Add initial Test
Detlef Riekenberg
wine.dev at web.de
Wed Sep 27 06:02:20 CDT 2006
Changelog:
localspl/tests: Add initial Test
needs "./tools/make-makefile" after
the Patch
mingw needs "liblocalspl.a" to build a
windows-binary of the tests
(will send my version in the next patch)
--
By by ... Detlef
-------------- next part --------------
Subject: [PATCH] localspl/tests: Add initial test
---
dlls/localspl/tests/Makefile.in | 13 ++++++++
dlls/localspl/tests/localmon.c | 65 +++++++++++++++++++++++++++++++++++++++
2 files changed, 78 insertions(+), 0 deletions(-)
create mode 100644 dlls/localspl/tests/Makefile.in
create mode 100644 dlls/localspl/tests/localmon.c
07a19004d9af06a0b46778762af67de186bd8ff4
diff --git a/dlls/localspl/tests/Makefile.in b/dlls/localspl/tests/Makefile.in
new file mode 100644
index 0000000..8622add
--- /dev/null
+++ b/dlls/localspl/tests/Makefile.in
@@ -0,0 +1,13 @@
+TOPSRCDIR = @top_srcdir@
+TOPOBJDIR = ../../..
+SRCDIR = @srcdir@
+VPATH = @srcdir@
+TESTDLL = localspl.dll
+IMPORTS = localspl kernel32
+
+CTESTS = \
+ localmon.c
+
+ at MAKE_TEST_RULES@
+
+ at DEPENDENCIES@ # everything below this line is overwritten by make depend
diff --git a/dlls/localspl/tests/localmon.c b/dlls/localspl/tests/localmon.c
new file mode 100644
index 0000000..3c929d9
--- /dev/null
+++ b/dlls/localspl/tests/localmon.c
@@ -0,0 +1,65 @@
+/*
+ * Unit test suite for localspl API functions: local print monitor
+ *
+ * Copyright 2006 Detlef Riekenberg
+ *
+ * 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
+ *
+ */
+
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "winerror.h"
+#include "wingdi.h"
+#include "winreg.h"
+
+#include "winspool.h"
+#include "ddk/winsplp.h"
+
+#include "wine/test.h"
+
+
+/* ##### */
+
+static const WCHAR emptyW[] = {0};
+
+/* ##### */
+
+static void test_InitializePrintMonitor(void)
+{
+ LPMONITOREX res;
+
+ SetLastError(0xdeadbeef);
+ res = InitializePrintMonitor(NULL);
+ ok( (res == NULL) && (GetLastError() == ERROR_INVALID_PARAMETER),
+ "returned %p with %ld\n (expected NULL with " \
+ "ERROR_INVALID_PARAMETER)\n", res, GetLastError());
+
+ SetLastError(0xdeadbeef);
+ res = InitializePrintMonitor((LPWSTR) emptyW);
+ ok( (res == NULL) && (GetLastError() == ERROR_INVALID_PARAMETER),
+ "returned %p with %ld\n (expected NULL with " \
+ "ERROR_INVALID_PARAMETER)\n", res, GetLastError());
+
+}
+
+
+START_TEST(localmon)
+{
+ test_InitializePrintMonitor();
+
+}
--
1.1.3
More information about the wine-patches
mailing list