[ros-diffs] [tkreuzer] 30849: Another test for AddFontResourceEx

tkreuzer at svn.reactos.org tkreuzer at svn.reactos.org
Thu Nov 29 00:45:23 CET 2007


Author: tkreuzer
Date: Thu Nov 29 02:45:23 2007
New Revision: 30849

URL: http://svn.reactos.org/svn/reactos?rev=30849&view=rev
Log:
Another test for AddFontResourceEx

Modified:
    trunk/rostests/apitests/gdi32api/tests/AddFontResourceEx.c

Modified: trunk/rostests/apitests/gdi32api/tests/AddFontResourceEx.c
URL: http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32api/tests/AddFontResourceEx.c?rev=30849&r1=30848&r2=30849&view=diff
==============================================================================
--- trunk/rostests/apitests/gdi32api/tests/AddFontResourceEx.c (original)
+++ trunk/rostests/apitests/gdi32api/tests/AddFontResourceEx.c Thu Nov 29 02:45:23 2007
@@ -4,6 +4,17 @@
 Test_AddFontResourceEx(PTESTINFO pti)
 {
 	WCHAR szFileName[MAX_PATH];
+
+	/* Test NULL filename */
+	SetLastError(ERROR_SUCCESS);
+	/* Windows crashes, would need SEH here */
+//	TEST(AddFontResourceExW(NULL, 0, 0) != 0);
+//	TEST(GetLastError() == ERROR_SUCCESS);
+
+	/* Test "" filename */
+	SetLastError(ERROR_SUCCESS);
+	TEST(AddFontResourceExW(L"", 0, 0) == 0);
+	TEST(GetLastError() == ERROR_INVALID_PARAMETER);
 
 	GetEnvironmentVariableW(L"systemroot", szFileName, MAX_PATH);
 	wcscat(szFileName, L"\\Fonts\\cour.ttf");




More information about the Ros-diffs mailing list