summaryrefslogtreecommitdiff
path: root/tests/gdimageellipse
diff options
context:
space:
mode:
Diffstat (limited to 'tests/gdimageellipse')
-rw-r--r--tests/gdimageellipse/.gitignore1
-rw-r--r--tests/gdimageellipse/CMakeLists.txt7
-rw-r--r--tests/gdimageellipse/Makemodule.am8
-rw-r--r--tests/gdimageellipse/bug00169.c22
-rw-r--r--tests/gdimageellipse/bug00169_exp.pngbin0 -> 24802 bytes
5 files changed, 38 insertions, 0 deletions
diff --git a/tests/gdimageellipse/.gitignore b/tests/gdimageellipse/.gitignore
new file mode 100644
index 0000000..58e31a6
--- /dev/null
+++ b/tests/gdimageellipse/.gitignore
@@ -0,0 +1 @@
+/bug00169
diff --git a/tests/gdimageellipse/CMakeLists.txt b/tests/gdimageellipse/CMakeLists.txt
new file mode 100644
index 0000000..b7d79f2
--- /dev/null
+++ b/tests/gdimageellipse/CMakeLists.txt
@@ -0,0 +1,7 @@
+IF(PNG_FOUND)
+LIST(APPEND TESTS_FILES
+ bug00169
+)
+ENDIF(PNG_FOUND)
+
+ADD_GD_TESTS()
diff --git a/tests/gdimageellipse/Makemodule.am b/tests/gdimageellipse/Makemodule.am
new file mode 100644
index 0000000..11d2079
--- /dev/null
+++ b/tests/gdimageellipse/Makemodule.am
@@ -0,0 +1,8 @@
+if HAVE_LIBPNG
+libgd_test_programs += \
+ gdimageellipse/bug00169
+endif
+
+EXTRA_DIST += \
+ gdimageellipse/CMakeLists.txt \
+ gdimageellipse/bug00169_exp.png
diff --git a/tests/gdimageellipse/bug00169.c b/tests/gdimageellipse/bug00169.c
new file mode 100644
index 0000000..8246c8c
--- /dev/null
+++ b/tests/gdimageellipse/bug00169.c
@@ -0,0 +1,22 @@
+/**
+ * add test case for gdImageEllipse
+ */
+
+#include "gd.h"
+#include "gdtest.h"
+
+int main()
+{
+ gdImagePtr im;
+ int white = 0;
+
+ im = gdImageCreateTrueColor(2200, 2200);
+ white = gdImageColorAllocate(im, 255, 255, 255);
+
+ gdImageEllipse(im, 1100, 1100, 2200, 2200, white);
+ gdAssertImageEqualsToFile("gdimageellipse/bug00169_exp.png", im);
+
+ gdImageDestroy(im);
+
+ return gdNumFailures();
+}
diff --git a/tests/gdimageellipse/bug00169_exp.png b/tests/gdimageellipse/bug00169_exp.png
new file mode 100644
index 0000000..f844608
--- /dev/null
+++ b/tests/gdimageellipse/bug00169_exp.png
Binary files differ