mirror of
https://github.com/reactos/reactos.git
synced 2024-12-31 19:42:51 +00:00
[APITESTS][WIN32KNT_APITEST] Improve NtGdiEnumFontOpen testcase (#1285)
Use ok, ok_int and ok_ptr macros instead of obsolete TEST macros.
This commit is contained in:
parent
687eba26f3
commit
a024ae626f
1 changed files with 12 additions and 11 deletions
|
@ -19,27 +19,28 @@ START_TEST(NtGdiEnumFontOpen)
|
||||||
// FIXME: We should load the font first
|
// FIXME: We should load the font first
|
||||||
|
|
||||||
idEnum = NtGdiEnumFontOpen(hDC, 2, 0, 32, L"Courier", ANSI_CHARSET, &ulCount);
|
idEnum = NtGdiEnumFontOpen(hDC, 2, 0, 32, L"Courier", ANSI_CHARSET, &ulCount);
|
||||||
TEST(idEnum != 0);
|
ok(idEnum != 0, "idEnum was 0.\n");
|
||||||
if (idEnum == 0)
|
if (idEnum == 0)
|
||||||
|
{
|
||||||
|
skip("idEnum == 0");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* we should have a gdi handle here */
|
/* we should have a gdi handle here */
|
||||||
TEST(GDI_HANDLE_GET_TYPE(idEnum) == GDI_OBJECT_TYPE_ENUMFONT);
|
ok_int((int)GDI_HANDLE_GET_TYPE(idEnum), (int)GDI_OBJECT_TYPE_ENUMFONT);
|
||||||
pEntry = &GdiHandleTable[GDI_HANDLE_GET_INDEX(idEnum)];
|
pEntry = &GdiHandleTable[GDI_HANDLE_GET_INDEX(idEnum)];
|
||||||
TEST(pEntry->einfo.pobj != NULL);
|
ok(pEntry->einfo.pobj != NULL, "pEntry->einfo.pobj was NULL.\n");
|
||||||
TEST(pEntry->ObjectOwner.ulObj == GetCurrentProcessId());
|
ok_long(pEntry->ObjectOwner.ulObj, GetCurrentProcessId());
|
||||||
TEST(pEntry->pUser == NULL);
|
ok_ptr(pEntry->pUser, NULL);
|
||||||
TEST(pEntry->FullUnique == (idEnum >> 16));
|
ok_int(pEntry->FullUnique, (idEnum >> 16));
|
||||||
TEST(pEntry->Objt == GDI_OBJECT_TYPE_ENUMFONT >> 16);
|
ok_int(pEntry->Objt, GDI_OBJECT_TYPE_ENUMFONT >> 16);
|
||||||
TEST(pEntry->Flags == 0);
|
ok_int(pEntry->Flags, 0);
|
||||||
|
|
||||||
/* We should not be able to use DeleteObject() on the handle */
|
/* We should not be able to use DeleteObject() on the handle */
|
||||||
TEST(DeleteObject((HGDIOBJ)idEnum) == FALSE);
|
ok_int(DeleteObject((HGDIOBJ)idEnum), FALSE);
|
||||||
|
|
||||||
NtGdiEnumFontClose(idEnum);
|
NtGdiEnumFontClose(idEnum);
|
||||||
|
|
||||||
// Test no logfont (NULL): should word
|
// Test no logfont (NULL): should word
|
||||||
// Test empty lfFaceName string: should not work
|
// Test empty lfFaceName string: should not work
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue