From b6ebc1b19ce5346e34f35c65729a7b22eb0757b4 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Thu, 27 Sep 2007 22:32:09 +0000 Subject: [PATCH] add another small test for AddFontResource svn path=/trunk/; revision=29263 --- rostests/apitests/gdi32api/tests/AddFontResourceEx.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/rostests/apitests/gdi32api/tests/AddFontResourceEx.c b/rostests/apitests/gdi32api/tests/AddFontResourceEx.c index 4dff4c483db..f10874f0ed6 100644 --- a/rostests/apitests/gdi32api/tests/AddFontResourceEx.c +++ b/rostests/apitests/gdi32api/tests/AddFontResourceEx.c @@ -1,12 +1,14 @@ +#define STAMP_DESIGNVECTOR (0x8000000 + 'd' + ('v' << 8)) INT Test_AddFontResourceEx(PTESTINFO pti) { WCHAR szFileName[MAX_PATH]; - GetEnvironmentVariableW(L"systemroot", szFileName, MAX_PATH); + GetEnvironmentVariableW(L"systemroot", szFileName, MAX_PATH); wcscat(szFileName, L"\\Fonts\\cour.ttf"); + /* Test flags = 0 */ SetLastError(ERROR_SUCCESS); TEST(AddFontResourceExW(szFileName, 0, 0) != 0); TEST(GetLastError() == ERROR_SUCCESS); @@ -15,5 +17,9 @@ Test_AddFontResourceEx(PTESTINFO pti) TEST(AddFontResourceExW(szFileName, 256, 0) == 0); TEST(GetLastError() == ERROR_INVALID_PARAMETER); + /* Test invalid pointer as last parameter */ + TEST(AddFontResourceExW(szFileName, 0, (void*)-1) != 0); + + return APISTATUS_NORMAL; }