mirror of
https://github.com/reactos/reactos.git
synced 2025-08-07 11:03:00 +00:00
Add some tests for GetTextExtentExPoint. Dedicated to Pigglesworth
svn path=/trunk/; revision=48445
This commit is contained in:
parent
9c9f4cb9e9
commit
e3736b149a
2 changed files with 41 additions and 0 deletions
|
@ -35,6 +35,7 @@
|
|||
#include "tests/GetDIBits.c"
|
||||
#include "tests/GetObject.c"
|
||||
#include "tests/GetStockObject.c"
|
||||
#include "tests/GetTextExtentExPoint.c"
|
||||
#include "tests/GetTextFace.c"
|
||||
#include "tests/SelectObject.c"
|
||||
#include "tests/SetDCPenColor.c"
|
||||
|
@ -78,6 +79,7 @@ TESTENTRY TestList[] =
|
|||
{ L"GetDIBits", Test_GetDIBits },
|
||||
{ L"GetObject", Test_GetObject },
|
||||
{ L"GetStockObject", Test_GetStockObject },
|
||||
{ L"GetTextExtentExPoint", Test_GetTextExtentExPoint },
|
||||
{ L"GetTextFace", Test_GetTextFace },
|
||||
{ L"SelectObject", Test_SelectObject },
|
||||
{ L"SetDCPenColor", Test_SetDCPenColor },
|
||||
|
|
39
rostests/apitests/gdi32api/tests/GetTextExtentExPoint.c
Normal file
39
rostests/apitests/gdi32api/tests/GetTextExtentExPoint.c
Normal file
|
@ -0,0 +1,39 @@
|
|||
#define NUM_SYSCOLORS 31
|
||||
|
||||
INT
|
||||
Test_GetTextExtentExPoint(PTESTINFO pti)
|
||||
{
|
||||
INT nFit;
|
||||
SIZE size;
|
||||
BOOL result;
|
||||
|
||||
SetLastError(0);
|
||||
|
||||
result = GetTextExtentExPointA(GetDC(0), "test", 4, 1000, &nFit, NULL, &size);
|
||||
TEST(result == 1);
|
||||
TEST(nFit == 4);
|
||||
TEST(GetLastError() == 0);
|
||||
printf("nFit = %d\n", nFit);
|
||||
|
||||
result = GetTextExtentExPointA(GetDC(0), "test", 4, 1, &nFit, NULL, &size);
|
||||
TEST(result == 1);
|
||||
TEST(nFit == 0);
|
||||
TEST(GetLastError() == 0);
|
||||
printf("nFit = %d\n", nFit);
|
||||
|
||||
result = GetTextExtentExPointA(GetDC(0), "test", 4, 0, &nFit, NULL, &size);
|
||||
TEST(result == 1);
|
||||
TEST(nFit == 0);
|
||||
TEST(GetLastError() == 0);
|
||||
|
||||
result = GetTextExtentExPointA(GetDC(0), "test", 4, -1, &nFit, NULL, &size);
|
||||
TEST(result == 1);
|
||||
TEST(nFit == 4);
|
||||
TEST(GetLastError() == 0);
|
||||
|
||||
result = GetTextExtentExPointA(GetDC(0), "test", 4, -2, &nFit, NULL, &size);
|
||||
TEST(result == 0);
|
||||
TEST(GetLastError() == 87);
|
||||
|
||||
return APISTATUS_NORMAL;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue