1 /**
2  * Base test for gdImageStringUp16()
3  */
4 #include <gd.h>
5 #include <gdfontl.h>
6 #include "gdtest.h"
7 
main()8 int main()
9 {
10 	/* Declare the image */
11 	gdImagePtr im = NULL;
12 	unsigned short s[2] = {'H', 0};
13 	int foreground;
14 	int errorcode = 0;
15 	gdFontPtr fontptr = gdFontGetLarge();
16 
17 	im = gdImageCreate(20, 20);
18 	gdImageColorAllocate(im, 255, 255, 255);
19 	foreground = gdImageColorAllocate(im, 22, 4, 238);
20 
21 	gdImageStringUp16(im, fontptr, 2, 18, s, foreground);
22 
23 	if (!gdAssertImageEqualsToFile("gdimagestringup16/gdimagestringup16_exp.png", im))
24 		errorcode = 1;
25 
26 	gdImageDestroy(im);
27 
28 	return errorcode;
29 }
30