localspl/tests: Add initial test.

oldstable
Detlef Riekenberg 2006-09-28 11:47:52 +02:00 committed by Alexandre Julliard
parent 493bc6b875
commit ecb97fc24c
8 changed files with 95 additions and 1 deletions

View File

@ -247,6 +247,7 @@ ALL_MAKEFILES = \
dlls/kernel32/Makefile \
dlls/kernel32/tests/Makefile \
dlls/localspl/Makefile \
dlls/localspl/tests/Makefile \
dlls/lz32/Makefile \
dlls/lz32/tests/Makefile \
dlls/mapi32/Makefile \
@ -566,6 +567,7 @@ dlls/itss/Makefile: dlls/itss/Makefile.in dlls/Makedll.rules
dlls/kernel32/Makefile: dlls/kernel32/Makefile.in dlls/Makedll.rules
dlls/kernel32/tests/Makefile: dlls/kernel32/tests/Makefile.in dlls/Maketest.rules
dlls/localspl/Makefile: dlls/localspl/Makefile.in dlls/Makedll.rules
dlls/localspl/tests/Makefile: dlls/localspl/tests/Makefile.in dlls/Maketest.rules
dlls/lz32/Makefile: dlls/lz32/Makefile.in dlls/Makedll.rules
dlls/lz32/tests/Makefile: dlls/lz32/tests/Makefile.in dlls/Maketest.rules
dlls/mapi32/Makefile: dlls/mapi32/Makefile.in dlls/Makedll.rules

3
configure vendored

File diff suppressed because one or more lines are too long

View File

@ -1590,6 +1590,7 @@ dlls/itss/Makefile
dlls/kernel32/Makefile
dlls/kernel32/tests/Makefile
dlls/localspl/Makefile
dlls/localspl/tests/Makefile
dlls/lz32/Makefile
dlls/lz32/tests/Makefile
dlls/mapi32/Makefile

View File

@ -230,6 +230,7 @@ TESTSUBDIRS = \
infosoft/tests \
iphlpapi/tests \
kernel32/tests \
localspl/tests \
lz32/tests \
mapi32/tests \
mlang/tests \

View File

@ -0,0 +1,13 @@
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../../..
SRCDIR = @srcdir@
VPATH = @srcdir@
TESTDLL = localspl.dll
IMPORTS = kernel32
CTESTS = \
localmon.c
@MAKE_TEST_RULES@
@DEPENDENCIES@ # everything below this line is overwritten by make depend

View File

@ -0,0 +1,72 @@
/*
* 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 HANDLE hdll;
static LPMONITOREX (WINAPI *pInitializePrintMonitor)(LPWSTR);
static const WCHAR emptyW[] = {0};
/* ##### */
static void test_InitializePrintMonitor(void)
{
LPMONITOREX res;
if (!pInitializePrintMonitor) return;
SetLastError(0xdeadbeef);
res = pInitializePrintMonitor(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 = pInitializePrintMonitor((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)
{
hdll = LoadLibraryA("localspl.dll");
if (!hdll) return;
pInitializePrintMonitor = (void *) GetProcAddress(hdll, "InitializePrintMonitor");
test_InitializePrintMonitor();
}

View File

@ -41,6 +41,7 @@ TESTBINS = \
infosoft_test.exe \
iphlpapi_test.exe \
kernel32_test.exe \
localspl_test.exe \
lz32_test.exe \
mapi32_test.exe \
mlang_test.exe \
@ -113,6 +114,8 @@ iphlpapi_test.exe: $(DLLDIR)/iphlpapi/tests/iphlpapi_test.exe$(DLLEXT)
cp $(DLLDIR)/iphlpapi/tests/iphlpapi_test.exe$(DLLEXT) $@ && $(STRIP) $@
kernel32_test.exe: $(DLLDIR)/kernel32/tests/kernel32_test.exe$(DLLEXT)
cp $(DLLDIR)/kernel32/tests/kernel32_test.exe$(DLLEXT) $@ && $(STRIP) $@
localspl_test.exe: $(DLLDIR)/localspl/tests/localspl_test.exe$(DLLEXT)
cp $(DLLDIR)/localspl/tests/localspl_test.exe$(DLLEXT) $@ && $(STRIP) $@
lz32_test.exe: $(DLLDIR)/lz32/tests/lz32_test.exe$(DLLEXT)
cp $(DLLDIR)/lz32/tests/lz32_test.exe$(DLLEXT) $@ && $(STRIP) $@
mapi32_test.exe: $(DLLDIR)/mapi32/tests/mapi32_test.exe$(DLLEXT)

View File

@ -164,6 +164,7 @@ hlink_test.exe TESTRES "hlink_test.exe"
infosoft_test.exe TESTRES "infosoft_test.exe"
iphlpapi_test.exe TESTRES "iphlpapi_test.exe"
kernel32_test.exe TESTRES "kernel32_test.exe"
localspl_test.exe TESTRES "localspl_test.exe"
lz32_test.exe TESTRES "lz32_test.exe"
mapi32_test.exe TESTRES "mapi32_test.exe"
mlang_test.exe TESTRES "mlang_test.exe"