- Add test for AddFontResourceEx showing that the function accepts 0 as flags.
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Sat, 1 Sep 2007 22:06:05 +0000 (22:06 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Sat, 1 Sep 2007 22:06:05 +0000 (22:06 +0000)
- remove header inclusion in test files

svn path=/trunk/; revision=28753

13 files changed:
rostests/apitests/gdi32api/testlist.c
rostests/apitests/gdi32api/tests/AddFontResourceEx.c [new file with mode: 0644]
rostests/apitests/gdi32api/tests/CreateCompatibleDC.c
rostests/apitests/gdi32api/tests/CreateFont.c
rostests/apitests/gdi32api/tests/CreatePen.c
rostests/apitests/gdi32api/tests/CreateRectRgn.c
rostests/apitests/gdi32api/tests/ExtCreatePen.c
rostests/apitests/gdi32api/tests/GetClipRgn.c
rostests/apitests/gdi32api/tests/GetObject.c
rostests/apitests/gdi32api/tests/GetStockObject.c
rostests/apitests/gdi32api/tests/SelectObject.c
rostests/apitests/gdi32api/tests/SetDCPenColor.c
rostests/apitests/gdi32api/tests/SetSysColors.c

index 5c85313..e54cd8f 100644 (file)
@@ -4,6 +4,7 @@
 #include "gdi32api.h"\r
 \r
 /* include the tests */\r
+#include "tests/AddFontResourceEx.c"\r
 #include "tests/CreateCompatibleDC.c"\r
 #include "tests/CreateFont.c"\r
 #include "tests/CreatePen.c"\r
@@ -20,6 +21,7 @@
 /* The List of tests */\r
 TESTENTRY TestList[] =\r
 {\r
+       { L"AddFontResourceEx", Test_AddFontResourceEx },\r
        { L"CreateCompatibleDC", Test_CreateCompatibleDC },\r
        { L"CreateFont", Test_CreateFont },\r
        { L"CreatePen", Test_CreatePen },\r
diff --git a/rostests/apitests/gdi32api/tests/AddFontResourceEx.c b/rostests/apitests/gdi32api/tests/AddFontResourceEx.c
new file mode 100644 (file)
index 0000000..4dff4c4
--- /dev/null
@@ -0,0 +1,19 @@
+\r
+INT\r
+Test_AddFontResourceEx(PTESTINFO pti)\r
+{\r
+       WCHAR szFileName[MAX_PATH];\r
+       GetEnvironmentVariableW(L"systemroot", szFileName, MAX_PATH);\r
+\r
+       wcscat(szFileName, L"\\Fonts\\cour.ttf");\r
+\r
+       SetLastError(ERROR_SUCCESS);\r
+       TEST(AddFontResourceExW(szFileName, 0, 0) != 0);\r
+       TEST(GetLastError() == ERROR_SUCCESS);\r
+\r
+       SetLastError(ERROR_SUCCESS);\r
+       TEST(AddFontResourceExW(szFileName, 256, 0) == 0);\r
+       TEST(GetLastError() == ERROR_INVALID_PARAMETER);\r
+\r
+       return APISTATUS_NORMAL;\r
+}\r
index 8a3c45f..fc26058 100644 (file)
@@ -1,5 +1,3 @@
-#include "../gdi32api.h"\r
-\r
 #define INVALIDFONT "ThisFontDoesNotExist"\r
 \r
 INT\r
index 4031f19..20bffa6 100644 (file)
@@ -1,5 +1,3 @@
-#include "../gdi32api.h"\r
-\r
 INT\r
 Test_CreatePen(PTESTINFO pti)\r
 {\r
index 853417f..d2488e1 100644 (file)
@@ -1,5 +1,3 @@
-#include "../gdi32api.h"\r
-\r
 INT\r
 Test_ExtCreatePen(PTESTINFO pti)\r
 {\r
index 5f46943..14bd2a8 100644 (file)
@@ -1,5 +1,3 @@
-#include "../gdi32api.h"\r
-\r
 INT\r
 Test_GetClipRgn(PTESTINFO pti)\r
 {\r
index 5200f85..45a8863 100644 (file)
@@ -1,5 +1,3 @@
-#include "../gdi32api.h"\r
-\r
 static INT\r
 Test_General(PTESTINFO pti)\r
 {\r
index ee72b17..2eb7c56 100644 (file)
@@ -1,5 +1,3 @@
-#include "../gdi32api.h"\r
-\r
 INT\r
 Test_SelectObject(PTESTINFO pti)\r
 {\r