1 /* 2 * PROJECT: ReactOS api tests 3 * LICENSE: GPL - See COPYING in the top level directory 4 * PURPOSE: Test for GetTextExtentExPoint 5 * PROGRAMMERS: Timo Kreuzer 6 * Katayama Hirofumi MZ 7 */ 8 9 #include "precomp.h" 10 11 void Test_GetTextExtentExPoint() 12 { 13 INT nFit; 14 SIZE size; 15 BOOL result; 16 17 SetLastError(0); 18 19 result = GetTextExtentExPointA(GetDC(0), "test", 4, 1000, &nFit, NULL, &size); 20 ok_int(result, 1); 21 ok_int(nFit, 4); 22 ok_err(0); 23 printf("nFit = %d\n", nFit); 24 25 result = GetTextExtentExPointA(GetDC(0), "test", 4, 1, &nFit, NULL, &size); 26 ok_int(result, 1); 27 ok_int(nFit, 0); 28 ok_err(0); 29 printf("nFit = %d\n", nFit); 30 31 result = GetTextExtentExPointA(GetDC(0), "test", 4, 0, &nFit, NULL, &size); 32 ok_int(result, 1); 33 ok_int(nFit, 0); 34 ok_err(0); 35 36 result = GetTextExtentExPointA(GetDC(0), "test", 4, -1, &nFit, NULL, &size); 37 ok_int(result, 1); 38 ok_int(nFit, 4); 39 ok_err(0); 40 41 result = GetTextExtentExPointA(GetDC(0), "test", 4, -2, &nFit, NULL, &size); 42 ok_int(result, 0); 43 ok_err(87); 44 45 result = GetTextExtentExPointW(GetDC(0), L"test", 4, -10, &nFit, NULL, &size); 46 ok_int(result, 1); 47 48 result = GetTextExtentExPointA(GetDC(0), "test", 4, -10, &nFit, NULL, &size); 49 ok_int(result, 0); 50 } 51 52 START_TEST(GetTextExtentExPoint) 53 { 54 Test_GetTextExtentExPoint(); 55 } 56 57