#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
/* 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
--- /dev/null
+\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
-#include "../gdi32api.h"\r
-\r
INT\r
Test_CreateCompatibleDC(PTESTINFO pti)\r
{\r
-#include "../gdi32api.h"\r
-\r
#define INVALIDFONT "ThisFontDoesNotExist"\r
\r
INT\r
-#include "../gdi32api.h"\r
-\r
INT\r
Test_CreatePen(PTESTINFO pti)\r
{\r
-#include "../gdi32api.h"\r
-\r
INT\r
Test_CreateRectRgn(PTESTINFO pti)\r
{\r
-#include "../gdi32api.h"\r
-\r
INT\r
Test_ExtCreatePen(PTESTINFO pti)\r
{\r
-#include "../gdi32api.h"\r
-\r
INT\r
Test_GetClipRgn(PTESTINFO pti)\r
{\r
-#include "../gdi32api.h"\r
-\r
static INT\r
Test_General(PTESTINFO pti)\r
{\r
-#include "../gdi32api.h"\r
-\r
INT\r
Test_GetStockObject(PTESTINFO pti)\r
{\r
-#include "../gdi32api.h"\r
-\r
INT\r
Test_SelectObject(PTESTINFO pti)\r
{\r
-#include "../gdi32api.h"\r
-\r
INT\r
Test_SetDCPenColor(PTESTINFO pti)\r
{\r
-#include "../gdi32api.h"\r
-\r
#define NUM_SYSCOLORS 31\r
\r
INT\r