summaryrefslogtreecommitdiff
path: root/tests/gdimageline/bug00111.c
blob: 9b24113535a895f8d7793b59dd3679064eeb1af4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "gd.h"
#include <stdio.h>
#include <stdlib.h>
#include "gdtest.h"

int main()
{
	gdImagePtr im;
	int error = 0;

	im = gdImageCreateTrueColor(10, 10);
	if (!im) {
		gdTestErrorMsg("can't get truecolor image\n");
		return 1;
	}

	gdImageLine(im, 2, 2, 2, 2, 0xFFFFFF);
	gdImageLine(im, 5, 5, 5, 5, 0xFFFFFF);

	gdImageLine(im, 0, 0, 0, 0, 0xFFFFFF);

	if (!gdAssertImageEqualsToFile("gdimageline/bug00111_exp.png", im)) {
		error = 1;
		gdTestErrorMsg("Reference image and destination differ\n");
	}

	gdImageDestroy(im);

	return error;
}