diff options
author | wilson chen <willson.chenwx@gmail.com> | 2020-04-15 00:25:01 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-15 00:25:01 +0800 |
commit | ec0b4397698bd358557d33641aac4beb1912f43b (patch) | |
tree | e24a7ff74023273f4798fb3fadd3e9da0b6a9c8c /tests/gdimagestringup16 | |
parent | da50dce3bad26bd38b13271f269c137f7ccdb103 (diff) | |
download | libgd-ec0b4397698bd358557d33641aac4beb1912f43b.tar.gz |
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.
Diffstat (limited to 'tests/gdimagestringup16')
-rw-r--r-- | tests/gdimagestringup16/gdimagestringup16.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/gdimagestringup16/gdimagestringup16.c b/tests/gdimagestringup16/gdimagestringup16.c index c843abe..c24639f 100644 --- a/tests/gdimagestringup16/gdimagestringup16.c +++ b/tests/gdimagestringup16/gdimagestringup16.c @@ -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; |