mirror of
https://github.com/reactos/reactos.git
synced 2024-11-01 12:26:32 +00:00
f65a62ea5b
[ROSTESTS][GDI32_APITEST] Refactor testcases
57 lines
1.4 KiB
C
57 lines
1.4 KiB
C
/*
|
|
* PROJECT: ReactOS api tests
|
|
* LICENSE: GPL - See COPYING in the top level directory
|
|
* PURPOSE: Test for GetTextExtentExPoint
|
|
* PROGRAMMERS: Timo Kreuzer
|
|
* Katayama Hirofumi MZ
|
|
*/
|
|
|
|
#include "precomp.h"
|
|
|
|
void Test_GetTextExtentExPoint()
|
|
{
|
|
INT nFit;
|
|
SIZE size;
|
|
BOOL result;
|
|
|
|
SetLastError(0);
|
|
|
|
result = GetTextExtentExPointA(GetDC(0), "test", 4, 1000, &nFit, NULL, &size);
|
|
ok_int(result, 1);
|
|
ok_int(nFit, 4);
|
|
ok_err(0);
|
|
printf("nFit = %d\n", nFit);
|
|
|
|
result = GetTextExtentExPointA(GetDC(0), "test", 4, 1, &nFit, NULL, &size);
|
|
ok_int(result, 1);
|
|
ok_int(nFit, 0);
|
|
ok_err(0);
|
|
printf("nFit = %d\n", nFit);
|
|
|
|
result = GetTextExtentExPointA(GetDC(0), "test", 4, 0, &nFit, NULL, &size);
|
|
ok_int(result, 1);
|
|
ok_int(nFit, 0);
|
|
ok_err(0);
|
|
|
|
result = GetTextExtentExPointA(GetDC(0), "test", 4, -1, &nFit, NULL, &size);
|
|
ok_int(result, 1);
|
|
ok_int(nFit, 4);
|
|
ok_err(0);
|
|
|
|
result = GetTextExtentExPointA(GetDC(0), "test", 4, -2, &nFit, NULL, &size);
|
|
ok_int(result, 0);
|
|
ok_err(87);
|
|
|
|
result = GetTextExtentExPointW(GetDC(0), L"test", 4, -10, &nFit, NULL, &size);
|
|
ok_int(result, 1);
|
|
|
|
result = GetTextExtentExPointA(GetDC(0), "test", 4, -10, &nFit, NULL, &size);
|
|
ok_int(result, 0);
|
|
}
|
|
|
|
START_TEST(GetTextExtentExPoint)
|
|
{
|
|
Test_GetTextExtentExPoint();
|
|
}
|
|
|