mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 17:05:46 +00:00
add another small test for AddFontResource
svn path=/trunk/; revision=29263
This commit is contained in:
parent
581e34abb2
commit
b6ebc1b19c
1 changed files with 7 additions and 1 deletions
|
@ -1,12 +1,14 @@
|
||||||
|
#define STAMP_DESIGNVECTOR (0x8000000 + 'd' + ('v' << 8))
|
||||||
|
|
||||||
INT
|
INT
|
||||||
Test_AddFontResourceEx(PTESTINFO pti)
|
Test_AddFontResourceEx(PTESTINFO pti)
|
||||||
{
|
{
|
||||||
WCHAR szFileName[MAX_PATH];
|
WCHAR szFileName[MAX_PATH];
|
||||||
GetEnvironmentVariableW(L"systemroot", szFileName, MAX_PATH);
|
|
||||||
|
|
||||||
|
GetEnvironmentVariableW(L"systemroot", szFileName, MAX_PATH);
|
||||||
wcscat(szFileName, L"\\Fonts\\cour.ttf");
|
wcscat(szFileName, L"\\Fonts\\cour.ttf");
|
||||||
|
|
||||||
|
/* Test flags = 0 */
|
||||||
SetLastError(ERROR_SUCCESS);
|
SetLastError(ERROR_SUCCESS);
|
||||||
TEST(AddFontResourceExW(szFileName, 0, 0) != 0);
|
TEST(AddFontResourceExW(szFileName, 0, 0) != 0);
|
||||||
TEST(GetLastError() == ERROR_SUCCESS);
|
TEST(GetLastError() == ERROR_SUCCESS);
|
||||||
|
@ -15,5 +17,9 @@ Test_AddFontResourceEx(PTESTINFO pti)
|
||||||
TEST(AddFontResourceExW(szFileName, 256, 0) == 0);
|
TEST(AddFontResourceExW(szFileName, 256, 0) == 0);
|
||||||
TEST(GetLastError() == ERROR_INVALID_PARAMETER);
|
TEST(GetLastError() == ERROR_INVALID_PARAMETER);
|
||||||
|
|
||||||
|
/* Test invalid pointer as last parameter */
|
||||||
|
TEST(AddFontResourceExW(szFileName, 0, (void*)-1) != 0);
|
||||||
|
|
||||||
|
|
||||||
return APISTATUS_NORMAL;
|
return APISTATUS_NORMAL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue