Improve test cases for gdImageString16 and gdImageStringUp16 (#625)

Fixed #623. wchar_t is 32 bits on 64-bits AIX, which will result in test case failure.
So we replace wchar_t with unsigned short array.
master
wilson chen 2020-04-15 00:25:01 +08:00 committed by GitHub
parent da50dce3ba
commit ec0b439769
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 8 deletions

View File

@ -9,9 +9,7 @@ int main()
{
/* Declare the image */
gdImagePtr im = NULL;
wchar_t *wchr = L"H";
unsigned short *sptr;
sptr = (unsigned short *)wchr;
unsigned short s[2] = {'H', 0};
int foreground;
int errorcode = 0;
gdFontPtr fontptr = gdFontGetLarge();
@ -20,7 +18,7 @@ int main()
gdImageColorAllocate(im, 255, 255, 255);
foreground = gdImageColorAllocate(im, 22, 4, 238);
gdImageString16(im, fontptr, 2, 2, sptr, foreground);
gdImageString16(im, fontptr, 2, 2, s, foreground);
if (!gdAssertImageEqualsToFile("gdimagestring16/gdimagestring16_exp.png", im))
errorcode = 1;

View File

@ -9,9 +9,7 @@ int main()
{
/* Declare the image */
gdImagePtr im = NULL;
wchar_t *wchr = L"H";
unsigned short *sptr;
sptr = (unsigned short *)wchr;
unsigned short s[2] = {'H', 0};
int foreground;
int errorcode = 0;
gdFontPtr fontptr = gdFontGetLarge();
@ -20,7 +18,7 @@ int main()
gdImageColorAllocate(im, 255, 255, 255);
foreground = gdImageColorAllocate(im, 22, 4, 238);
gdImageStringUp16(im, fontptr, 2, 18, sptr, foreground);
gdImageStringUp16(im, fontptr, 2, 18, s, foreground);
if (!gdAssertImageEqualsToFile("gdimagestringup16/gdimagestringup16_exp.png", im))
errorcode = 1;