Author: tkreuzer Date: Tue Aug 3 23:15:20 2010 New Revision: 48445
URL: http://svn.reactos.org/svn/reactos?rev=48445&view=rev Log: Add some tests for GetTextExtentExPoint. Dedicated to Pigglesworth
Added: trunk/rostests/apitests/gdi32api/tests/GetTextExtentExPoint.c (with props) Modified: trunk/rostests/apitests/gdi32api/testlist.c
Modified: trunk/rostests/apitests/gdi32api/testlist.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32api/testlist... ============================================================================== --- trunk/rostests/apitests/gdi32api/testlist.c [iso-8859-1] (original) +++ trunk/rostests/apitests/gdi32api/testlist.c [iso-8859-1] Tue Aug 3 23:15:20 2010 @@ -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 @@ { 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 },
Added: trunk/rostests/apitests/gdi32api/tests/GetTextExtentExPoint.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32api/tests/Ge... ============================================================================== --- trunk/rostests/apitests/gdi32api/tests/GetTextExtentExPoint.c (added) +++ trunk/rostests/apitests/gdi32api/tests/GetTextExtentExPoint.c [iso-8859-1] Tue Aug 3 23:15:20 2010 @@ -1,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; +}
Propchange: trunk/rostests/apitests/gdi32api/tests/GetTextExtentExPoint.c ------------------------------------------------------------------------------ svn:eol-style = native