add another small test for AddFontResource

svn path=/trunk/; revision=29263
This commit is contained in:
Timo Kreuzer 2007-09-27 22:32:09 +00:00
parent 581e34abb2
commit b6ebc1b19c

View file

@ -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;
}