summaryrefslogtreecommitdiff
path: root/Build/source/libs/gd/libgd-src/tests/gd2
diff options
context:
space:
mode:
authorDenis Bitouzé <dbitouze@wanadoo.fr>2021-02-25 18:23:07 +0000
committerDenis Bitouzé <dbitouze@wanadoo.fr>2021-02-25 18:23:07 +0000
commitc6101f91d071883b48b1b4b51e5eba0f36d9a78d (patch)
tree1bf7f5a881d7a4f5c5bf59d0b2821943dd822372 /Build/source/libs/gd/libgd-src/tests/gd2
parent07ee7222e389b0777456b427a55c22d0e6ffd267 (diff)
French translation for tlmgr updated
git-svn-id: svn://tug.org/texlive/trunk@57912 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/gd/libgd-src/tests/gd2')
-rw-r--r--Build/source/libs/gd/libgd-src/tests/gd2/CMakeLists.txt27
-rw-r--r--Build/source/libs/gd/libgd-src/tests/gd2/Makemodule.am37
-rw-r--r--Build/source/libs/gd/libgd-src/tests/gd2/bug00209.c26
-rw-r--r--Build/source/libs/gd/libgd-src/tests/gd2/bug00209.gd2bin1050 -> 0 bytes
-rw-r--r--Build/source/libs/gd/libgd-src/tests/gd2/bug00309.c37
-rw-r--r--Build/source/libs/gd/libgd-src/tests/gd2/bug00354.c30
-rw-r--r--Build/source/libs/gd/libgd-src/tests/gd2/bug00354a.gd2bin92 -> 0 bytes
-rw-r--r--Build/source/libs/gd/libgd-src/tests/gd2/bug00354b.gd2bin18 -> 0 bytes
-rw-r--r--Build/source/libs/gd/libgd-src/tests/gd2/bug00383.c32
-rw-r--r--Build/source/libs/gd/libgd-src/tests/gd2/bug00383.gd2bin1113 -> 0 bytes
-rw-r--r--Build/source/libs/gd/libgd-src/tests/gd2/bug_289.c35
-rw-r--r--Build/source/libs/gd/libgd-src/tests/gd2/conv_gd2_exp.gd20
-rw-r--r--Build/source/libs/gd/libgd-src/tests/gd2/conv_test.gd2bin423 -> 0 bytes
-rw-r--r--Build/source/libs/gd/libgd-src/tests/gd2/conv_test_exp.pngbin87 -> 0 bytes
-rw-r--r--Build/source/libs/gd/libgd-src/tests/gd2/createimagefromgd2part.c35
-rw-r--r--Build/source/libs/gd/libgd-src/tests/gd2/createimagefromgd2partptr.c59
-rw-r--r--Build/source/libs/gd/libgd-src/tests/gd2/empty.gd20
-rw-r--r--Build/source/libs/gd/libgd-src/tests/gd2/gd2_empty_file.c19
-rw-r--r--Build/source/libs/gd/libgd-src/tests/gd2/gd2_im2im.c62
-rw-r--r--Build/source/libs/gd/libgd-src/tests/gd2/gd2_null.c14
-rw-r--r--Build/source/libs/gd/libgd-src/tests/gd2/gd2_read.c59
-rw-r--r--Build/source/libs/gd/libgd-src/tests/gd2/gd2_read_corrupt.c28
-rw-r--r--Build/source/libs/gd/libgd-src/tests/gd2/invalid_header.gd2bin512 -> 0 bytes
-rw-r--r--Build/source/libs/gd/libgd-src/tests/gd2/invalid_neg_size.gd2bin1676 -> 0 bytes
-rw-r--r--Build/source/libs/gd/libgd-src/tests/gd2/php_bug_72339.c36
-rw-r--r--Build/source/libs/gd/libgd-src/tests/gd2/too_few_image_data.c22
-rw-r--r--Build/source/libs/gd/libgd-src/tests/gd2/too_few_image_data.gd2bin1050 -> 0 bytes
27 files changed, 0 insertions, 558 deletions
diff --git a/Build/source/libs/gd/libgd-src/tests/gd2/CMakeLists.txt b/Build/source/libs/gd/libgd-src/tests/gd2/CMakeLists.txt
deleted file mode 100644
index cc188ca043d..00000000000
--- a/Build/source/libs/gd/libgd-src/tests/gd2/CMakeLists.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-IF(ENABLE_GD_FORMATS)
-IF(ZLIB_FOUND)
-LIST(APPEND TESTS_FILES
- bug_289
- bug00209
- bug00309
- bug00354
- bug00383
- createimagefromgd2part
- createimagefromgd2partptr
- gd2_empty_file
- php_bug_72339
- gd2_null
- gd2_read_corrupt
- too_few_image_data
- gd2_im2im
-)
-
-IF(PNG_FOUND)
-LIST(APPEND TESTS_FILES
- gd2_read
-)
-ENDIF(PNG_FOUND)
-ENDIF(ZLIB_FOUND)
-ENDIF(ENABLE_GD_FORMATS)
-
-ADD_GD_TESTS()
diff --git a/Build/source/libs/gd/libgd-src/tests/gd2/Makemodule.am b/Build/source/libs/gd/libgd-src/tests/gd2/Makemodule.am
deleted file mode 100644
index 5cd29e6f7f9..00000000000
--- a/Build/source/libs/gd/libgd-src/tests/gd2/Makemodule.am
+++ /dev/null
@@ -1,37 +0,0 @@
-if ENABLE_GD_FORMATS
-if HAVE_LIBZ
-libgd_test_programs += \
- gd2/bug_289 \
- gd2/bug00209 \
- gd2/bug00309 \
- gd2/bug00354 \
- gd2/bug00383 \
- gd2/createimagefromgd2part \
- gd2/createimagefromgd2partptr \
- gd2/gd2_empty_file \
- gd2/php_bug_72339 \
- gd2/gd2_null \
- gd2/gd2_read_corrupt \
- gd2/too_few_image_data \
- gd2/gd2_im2im
-
-if HAVE_LIBPNG
-libgd_test_programs += \
- gd2/gd2_read
-endif
-endif
-endif
-
-EXTRA_DIST += \
- gd2/CMakeLists.txt \
- gd2/bug00209.gd2 \
- gd2/bug00354a.gd2 \
- gd2/bug00354b.gd2 \
- gd2/bug00383.gd2 \
- gd2/conv_gd2_exp.gd2 \
- gd2/conv_test.gd2 \
- gd2/conv_test_exp.png \
- gd2/empty.gd2 \
- gd2/invalid_header.gd2 \
- gd2/invalid_neg_size.gd2 \
- gd2/too_few_image_data.gd2
diff --git a/Build/source/libs/gd/libgd-src/tests/gd2/bug00209.c b/Build/source/libs/gd/libgd-src/tests/gd2/bug00209.c
deleted file mode 100644
index 7904d01fcf5..00000000000
--- a/Build/source/libs/gd/libgd-src/tests/gd2/bug00209.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * Regression test for github issue #209
- *
- * We're testing that bug00209.gd2, which claims to have 12336 x 48 pixels, but
- * actually provides not enough image data, is rejected, i.e. that
- * gdImageCreateFromGd2() returns NULL
- *
- * See <https://github.com/libgd/libgd/issues/209>.
- */
-
-#include "gd.h"
-#include "gdtest.h"
-
-int main()
-{
- gdImagePtr im;
- FILE *fp;
-
- fp = gdTestFileOpen2("gd2", "bug00209.gd2");
- gdTestAssert(fp != NULL);
- im = gdImageCreateFromGd2(fp);
- gdTestAssert(im == NULL);
- fclose(fp);
-
- return gdNumFailures();
-}
diff --git a/Build/source/libs/gd/libgd-src/tests/gd2/bug00209.gd2 b/Build/source/libs/gd/libgd-src/tests/gd2/bug00209.gd2
deleted file mode 100644
index 1c797d1acfa..00000000000
--- a/Build/source/libs/gd/libgd-src/tests/gd2/bug00209.gd2
+++ /dev/null
Binary files differ
diff --git a/Build/source/libs/gd/libgd-src/tests/gd2/bug00309.c b/Build/source/libs/gd/libgd-src/tests/gd2/bug00309.c
deleted file mode 100644
index b649cdc2d63..00000000000
--- a/Build/source/libs/gd/libgd-src/tests/gd2/bug00309.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * Regression test for <https://github.com/libgd/libgd/issues/309>.
- *
- * We test that an image with 64x64 pixels reports only a single chunk in the
- * GD2 image header when the chunk size is 64.
- */
-
-
-#include "gd.h"
-#include "gdtest.h"
-
-
-int main()
-{
- gdImagePtr im;
- unsigned char *buf;
- int size, word;
-
- im = gdImageCreate(64, 64);
- gdImageColorAllocate(im, 0, 0, 0);
-
- buf = gdImageGd2Ptr(im, 64, 1, &size);
-
- gdImageDestroy(im);
-
- word = buf[10] << 8 | buf[11];
- gdTestAssertMsg(word == 64, "chunk size is %d, but expected 64\n", word);
- word = buf[14] << 8 | buf[15];
- gdTestAssertMsg(word == 1, "x chunk count is %d, but expected 1\n", word);
- word = buf[16] << 8 | buf[17];
- gdTestAssertMsg(word == 1, "y chunk count is %d, but expected 1\n", word);
- gdTestAssertMsg(size == 5145, "file size is %d, but expected 5145\n", size);
-
- gdFree(buf);
-
- return gdNumFailures();
-}
diff --git a/Build/source/libs/gd/libgd-src/tests/gd2/bug00354.c b/Build/source/libs/gd/libgd-src/tests/gd2/bug00354.c
deleted file mode 100644
index 1bce091ab09..00000000000
--- a/Build/source/libs/gd/libgd-src/tests/gd2/bug00354.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * We're testing GD2 image files which report illegal chunk counts. These should
- * not cause integer overflows or other issues, but instead simply fail to be
- * loaded.
- *
- * See also <https://github.com/libgd/libgd/issues/354>.
- */
-
-#include "gd.h"
-#include "gdtest.h"
-
-int main()
-{
- gdImagePtr im;
- FILE *fp;
-
- fp = gdTestFileOpen2("gd2", "bug00354a.gd2");
- gdTestAssert(fp != NULL);
- im = gdImageCreateFromGd2(fp);
- gdTestAssert(im == NULL);
- fclose(fp);
-
- fp = gdTestFileOpen2("gd2", "bug00354b.gd2");
- gdTestAssert(fp != NULL);
- im = gdImageCreateFromGd2(fp);
- gdTestAssert(im == NULL);
- fclose(fp);
-
- return gdNumFailures();
-}
diff --git a/Build/source/libs/gd/libgd-src/tests/gd2/bug00354a.gd2 b/Build/source/libs/gd/libgd-src/tests/gd2/bug00354a.gd2
deleted file mode 100644
index 5060bfde3aa..00000000000
--- a/Build/source/libs/gd/libgd-src/tests/gd2/bug00354a.gd2
+++ /dev/null
Binary files differ
diff --git a/Build/source/libs/gd/libgd-src/tests/gd2/bug00354b.gd2 b/Build/source/libs/gd/libgd-src/tests/gd2/bug00354b.gd2
deleted file mode 100644
index 8600126becb..00000000000
--- a/Build/source/libs/gd/libgd-src/tests/gd2/bug00354b.gd2
+++ /dev/null
Binary files differ
diff --git a/Build/source/libs/gd/libgd-src/tests/gd2/bug00383.c b/Build/source/libs/gd/libgd-src/tests/gd2/bug00383.c
deleted file mode 100644
index dbbf661aa58..00000000000
--- a/Build/source/libs/gd/libgd-src/tests/gd2/bug00383.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * Test that invalid transparent colors can't be read
- *
- * We're reading a corrupt palette image in GD2 format, which has only a single
- * palette entry, but claims that the transparent color would be 1. We check
- * that the transparency is simply ignored in this case.
- *
- * See also <https://github.com/libgd/libgd/issues/383>
- */
-
-
-#include "gd.h"
-#include "gdtest.h"
-
-
-int main()
-{
- gdImagePtr im;
- FILE *fp;
-
- fp = gdTestFileOpen2("gd2", "bug00383.gd2");
- gdTestAssert(fp != NULL);
- im = gdImageCreateFromGd2(fp);
- gdTestAssert(im != NULL);
- fclose(fp);
-
- gdTestAssert(gdImageGetTransparent(im) == -1);
-
- gdImageDestroy(im);
-
- return gdNumFailures();
-}
diff --git a/Build/source/libs/gd/libgd-src/tests/gd2/bug00383.gd2 b/Build/source/libs/gd/libgd-src/tests/gd2/bug00383.gd2
deleted file mode 100644
index dcb164de288..00000000000
--- a/Build/source/libs/gd/libgd-src/tests/gd2/bug00383.gd2
+++ /dev/null
Binary files differ
diff --git a/Build/source/libs/gd/libgd-src/tests/gd2/bug_289.c b/Build/source/libs/gd/libgd-src/tests/gd2/bug_289.c
deleted file mode 100644
index 9ca03cc1ee1..00000000000
--- a/Build/source/libs/gd/libgd-src/tests/gd2/bug_289.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * Passing an unrecognized format to gdImageGd2() should result in
- * GD2_FMT_TRUECOLOR_COMPRESSED for truecolor images.
- *
- * See <https://github.com/libgd/libgd/issues/289>.
- */
-
-#include "gd.h"
-#include "gdtest.h"
-
-
-#define GD2_FMT_UNRECOGNIZED 0
-#define GD2_FMT_TRUECOLOR_COMPRESSED 4
-
-#define MSG "expected %s byte to be %d, but got %d\n"
-
-
-int main()
-{
- gdImagePtr im;
- char *buffer;
- int size;
-
- im = gdImageCreateTrueColor(10, 10);
- gdTestAssert(im != NULL);
- buffer = (char *) gdImageGd2Ptr(im, 128, GD2_FMT_UNRECOGNIZED, &size);
- gdTestAssert(buffer != NULL);
- gdImageDestroy(im);
- gdTestAssertMsg(buffer[12] == 0, MSG, "1st", 0, buffer[12]);
- gdTestAssertMsg(buffer[13] == GD2_FMT_TRUECOLOR_COMPRESSED, MSG, "2nd", GD2_FMT_TRUECOLOR_COMPRESSED, buffer[13]);
-
- gdFree(buffer);
-
- return gdNumFailures();
-}
diff --git a/Build/source/libs/gd/libgd-src/tests/gd2/conv_gd2_exp.gd2 b/Build/source/libs/gd/libgd-src/tests/gd2/conv_gd2_exp.gd2
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/Build/source/libs/gd/libgd-src/tests/gd2/conv_gd2_exp.gd2
+++ /dev/null
diff --git a/Build/source/libs/gd/libgd-src/tests/gd2/conv_test.gd2 b/Build/source/libs/gd/libgd-src/tests/gd2/conv_test.gd2
deleted file mode 100644
index 1c64b46d9ae..00000000000
--- a/Build/source/libs/gd/libgd-src/tests/gd2/conv_test.gd2
+++ /dev/null
Binary files differ
diff --git a/Build/source/libs/gd/libgd-src/tests/gd2/conv_test_exp.png b/Build/source/libs/gd/libgd-src/tests/gd2/conv_test_exp.png
deleted file mode 100644
index b4bc3fad9f4..00000000000
--- a/Build/source/libs/gd/libgd-src/tests/gd2/conv_test_exp.png
+++ /dev/null
Binary files differ
diff --git a/Build/source/libs/gd/libgd-src/tests/gd2/createimagefromgd2part.c b/Build/source/libs/gd/libgd-src/tests/gd2/createimagefromgd2part.c
deleted file mode 100644
index 0c81ba6235b..00000000000
--- a/Build/source/libs/gd/libgd-src/tests/gd2/createimagefromgd2part.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- *Base test for gdImageCreateFromGd2Part()
- */
-#include "gd.h"
-#include "gdtest.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-int main()
-{
- gdImagePtr im;
- FILE *p;
- int expected_color = 0xffffff;
- int actual_color = 0;
-
- p = gdTestFileOpen2("gd2", "conv_test.gd2");
-
- if (!p) {
- gdTestErrorMsg("failed, connot open gd2 file: conv_test.gd2");
- return 1;
- }
-
- im = gdImageCreateFromGd2Part(p, 3, 3, 3, 3);
- fclose(p);
-
- if (!im) {
- return 1;
- }
-
- actual_color = gdImageGetPixel(im, 2, 2);
- gdImageDestroy(im);
- gdTestAssert(expected_color == actual_color);
-
- return gdNumFailures();
-}
diff --git a/Build/source/libs/gd/libgd-src/tests/gd2/createimagefromgd2partptr.c b/Build/source/libs/gd/libgd-src/tests/gd2/createimagefromgd2partptr.c
deleted file mode 100644
index e432874667f..00000000000
--- a/Build/source/libs/gd/libgd-src/tests/gd2/createimagefromgd2partptr.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * Base test for gdImageCreateFromGd2PartPtr()
- */
-#include "gd.h"
-#include "gdtest.h"
-#include <stdio.h>
-
-int main()
-{
- FILE *p;
- gdImagePtr im, partim;
- void *pg;
- int size = 0;
- int status = 0;
- int actual_color = 0;
- int expected_color = 0xffffff;
-
- p = gdTestFileOpen2("gd2", "conv_test.gd2");
- if (!p) {
- gdTestErrorMsg("failed, cannot open gd2 file:conv_test.gd2");
- return 1;
- }
-
- im = gdImageCreateFromGd2(p);
- fclose(p);
-
- if (!im) {
- gdTestErrorMsg("failed, cannot create gd2 file.");
- return 1;
- }
-
- pg = gdImageGd2Ptr(im, (GD2_CHUNKSIZE_MIN + GD2_CHUNKSIZE_MAX) / 2, GD2_FMT_COMPRESSED, &size);
- if (!pg) {
- status = 1;
- goto done1;
- }
-
- if (size <= 0) {
- status = 1;
- goto done0;
- }
-
- partim = gdImageCreateFromGd2PartPtr(size, pg, 3, 3, 3, 3);
- if (!partim) {
- status = 1;
- goto done0;
- }
-
- actual_color = gdImageGetPixel(partim, 2, 2);
- status = (expected_color == actual_color) ? 0 : 1;
- gdImageDestroy(partim);
-
-done0:
- gdFree(pg);
-done1:
- gdImageDestroy(im);
-
- return status;
-}
diff --git a/Build/source/libs/gd/libgd-src/tests/gd2/empty.gd2 b/Build/source/libs/gd/libgd-src/tests/gd2/empty.gd2
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/Build/source/libs/gd/libgd-src/tests/gd2/empty.gd2
+++ /dev/null
diff --git a/Build/source/libs/gd/libgd-src/tests/gd2/gd2_empty_file.c b/Build/source/libs/gd/libgd-src/tests/gd2/gd2_empty_file.c
deleted file mode 100644
index 9b1c5b2e1b5..00000000000
--- a/Build/source/libs/gd/libgd-src/tests/gd2/gd2_empty_file.c
+++ /dev/null
@@ -1,19 +0,0 @@
-#include "gd.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include "gdtest.h"
-
-int main()
-{
- gdImagePtr im;
- FILE *fp = gdTestFileOpen("gd2/empty.gd2");
- im = gdImageCreateFromGd2(fp);
- fclose(fp);
-
- if (!im) {
- return 0;
- } else {
- gdImageDestroy(im);
- return 1;
- }
-}
diff --git a/Build/source/libs/gd/libgd-src/tests/gd2/gd2_im2im.c b/Build/source/libs/gd/libgd-src/tests/gd2/gd2_im2im.c
deleted file mode 100644
index 02a44206554..00000000000
--- a/Build/source/libs/gd/libgd-src/tests/gd2/gd2_im2im.c
+++ /dev/null
@@ -1,62 +0,0 @@
-#include "gd.h"
-#include "gdtest.h"
-
-int main()
-{
- gdImagePtr src, dst;
- int r, g, b;
- void *p;
- int size = 0;
- int status = 0;
- CuTestImageResult result = {0, 0};
-
- src = gdImageCreate(100, 100);
- if (src == NULL) {
- gdTestErrorMsg("could not create src\n");
- return 1;
- }
- r = gdImageColorAllocate(src, 0xFF, 0, 0);
- g = gdImageColorAllocate(src, 0, 0xFF, 0);
- b = gdImageColorAllocate(src, 0, 0, 0xFF);
- gdImageFilledRectangle(src, 0, 0, 99, 99, r);
- gdImageRectangle(src, 20, 20, 79, 79, g);
- gdImageEllipse(src, 70, 25, 30, 20, b);
-
-#define OUTPUT_GD2(x) do { \
- FILE *fp = gdTestTempFp(); \
- gdImageGd2(x, fp, (GD2_CHUNKSIZE_MIN+GD2_CHUNKSIZE_MAX)/2, GD2_FMT_COMPRESSED); \
- fclose(fp); \
- } while (0)
-
- OUTPUT_GD2(src);
- p = gdImageGd2Ptr(src, (GD2_CHUNKSIZE_MIN+GD2_CHUNKSIZE_MAX)/2, GD2_FMT_COMPRESSED, &size);
- if (p == NULL) {
- status = 1;
- gdTestErrorMsg("p is null\n");
- goto door0;
- }
- if (size <= 0) {
- status = 1;
- gdTestErrorMsg("size is non-positive\n");
- goto door1;
- }
-
- dst = gdImageCreateFromGd2Ptr(size, p);
- if (dst == NULL) {
- status = 1;
- gdTestErrorMsg("could not create dst\n");
- goto door1;
- }
- OUTPUT_GD2(dst);
- gdTestImageDiff(src, dst, NULL, &result);
- if (result.pixels_changed > 0) {
- status = 1;
- gdTestErrorMsg("pixels changed: %d\n", result.pixels_changed);
- }
- gdImageDestroy(dst);
-door1:
- gdFree(p);
-door0:
- gdImageDestroy(src);
- return status;
-}
diff --git a/Build/source/libs/gd/libgd-src/tests/gd2/gd2_null.c b/Build/source/libs/gd/libgd-src/tests/gd2/gd2_null.c
deleted file mode 100644
index 6c8fc96caae..00000000000
--- a/Build/source/libs/gd/libgd-src/tests/gd2/gd2_null.c
+++ /dev/null
@@ -1,14 +0,0 @@
-#include "gd.h"
-
-int main()
-{
- gdImagePtr im;
-
- im = gdImageCreateFromGd2(NULL);
- if (im != NULL) {
- gdImageDestroy(im);
- return 1;
- }
- gdImageGd2(im, NULL, 0, GD2_FMT_RAW); /* noop safely */
- return 0;
-}
diff --git a/Build/source/libs/gd/libgd-src/tests/gd2/gd2_read.c b/Build/source/libs/gd/libgd-src/tests/gd2/gd2_read.c
deleted file mode 100644
index 9f2b808255e..00000000000
--- a/Build/source/libs/gd/libgd-src/tests/gd2/gd2_read.c
+++ /dev/null
@@ -1,59 +0,0 @@
-#include "gd.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include "gdtest.h"
-
-int main(int argc, char *argv[])
-{
- int error = 0, i = 0;
- gdImagePtr im, exp;
- FILE *fp;
- char *path[] = {
- "conv_test.gd2",
- "invalid_neg_size.gd2",
- "invalid_header.gd2",
- NULL
- };
- char *path_exp[] = {
- "conv_test_exp.png",
- NULL,
- NULL,
- NULL
- };
- while (path[i] != NULL) {
- fp = gdTestFileOpen2("gd2", path[i]);
- if (!fp) {
- gdTestErrorMsg("failed, cannot open file: %s\n", path[0]);
- return 1;
- }
- im = gdImageCreateFromGd2(fp);
- fclose(fp);
-
- if (path_exp[i] != NULL) {
- fp = gdTestFileOpen2("gd2", path_exp[i]);
- if (!fp) {
- gdTestErrorMsg("failed, cannot open file: %s\n", path_exp[i]);
- gdImageDestroy(im);
- return 1;
- }
- exp = gdImageCreateFromPng(fp);
- if (!gdAssertImageEquals(exp, im)) {
- gdTestErrorMsg("image %s differs from expected result\n", path[i]);
- error = 1;
- }
- if (exp) {
- gdImageDestroy(exp);
- }
- gdImageDestroy(im);
- } else {
- /* expected to fail */
- if (im) {
- gdTestErrorMsg("image %s should have failed to be loaded\n", path[i]);
- gdImageDestroy(im);
- error = 1;
- }
- }
- i++;
- }
- return error;
-}
diff --git a/Build/source/libs/gd/libgd-src/tests/gd2/gd2_read_corrupt.c b/Build/source/libs/gd/libgd-src/tests/gd2/gd2_read_corrupt.c
deleted file mode 100644
index 7afc30393f2..00000000000
--- a/Build/source/libs/gd/libgd-src/tests/gd2/gd2_read_corrupt.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Just try to read the invalid gd2 image & not crash. */
-#include "gd.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include "gdtest.h"
-
-int main(int argc, char *argv[])
-{
- gdImagePtr im;
- FILE *fp;
-
- fp = gdTestFileOpen2("gd2", "invalid_header.gd2");
-
- if (!fp) {
- gdTestErrorMsg("failed, cannot open file: %s\n", "invalid_header.gd2");
- return 1;
- }
- im = gdImageCreateFromGd2(fp);
- fclose(fp);
-
- if (im != NULL) {
- gdTestErrorMsg("image should have failed to be loaded\n");
- gdImageDestroy(im);
- return 1;
- } else {
- return 0;
- }
-}
diff --git a/Build/source/libs/gd/libgd-src/tests/gd2/invalid_header.gd2 b/Build/source/libs/gd/libgd-src/tests/gd2/invalid_header.gd2
deleted file mode 100644
index 45323da7f82..00000000000
--- a/Build/source/libs/gd/libgd-src/tests/gd2/invalid_header.gd2
+++ /dev/null
Binary files differ
diff --git a/Build/source/libs/gd/libgd-src/tests/gd2/invalid_neg_size.gd2 b/Build/source/libs/gd/libgd-src/tests/gd2/invalid_neg_size.gd2
deleted file mode 100644
index 3075f15a81a..00000000000
--- a/Build/source/libs/gd/libgd-src/tests/gd2/invalid_neg_size.gd2
+++ /dev/null
Binary files differ
diff --git a/Build/source/libs/gd/libgd-src/tests/gd2/php_bug_72339.c b/Build/source/libs/gd/libgd-src/tests/gd2/php_bug_72339.c
deleted file mode 100644
index 8217c87c1d5..00000000000
--- a/Build/source/libs/gd/libgd-src/tests/gd2/php_bug_72339.c
+++ /dev/null
@@ -1,36 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include "gd.h"
-
-#include "gdtest.h"
-
-int main()
-{
- gdImagePtr im;
- FILE *fp;
- int i;
- const char header[] = {
- 0x00, 0x02,
- 0x00, 0x01,
- 0x00, 0x01,
- 0x00, 0x40,
- 0x00, 0x02,
- 0x54, 0xA0,
- 0x5B, 0x00
- };
-
- /* we're creating the test image dynamically, due to its size */
- fp = gdTestTempFp();
- fwrite(header, sizeof(header[0]), sizeof(header), fp);
- for (i = 0; i < 0x4000000; i++) {
- fputc(0x41, fp);
- }
- rewind(fp);
-
- im = gdImageCreateFromGd2(fp);
- fclose(fp);
-
- gdTestAssertMsg(im == NULL, "Image should have failed to be loaded\n");
-
- return gdNumFailures();
-}
diff --git a/Build/source/libs/gd/libgd-src/tests/gd2/too_few_image_data.c b/Build/source/libs/gd/libgd-src/tests/gd2/too_few_image_data.c
deleted file mode 100644
index 3153a080078..00000000000
--- a/Build/source/libs/gd/libgd-src/tests/gd2/too_few_image_data.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
-too_few_image_data.gd2 claims to have a size of 12336x48 pixels, but doesn't
-provide as much image data. We test that gdImageCreateFromGd2Ctx() returns NULL
-in this case.
-*/
-
-#include "gd.h"
-#include "gdtest.h"
-
-int main()
-{
- gdImagePtr im;
- FILE *fp;
-
- fp = gdTestFileOpen2("gd2", "too_few_image_data.gd2");
- gdTestAssert(fp != NULL);
- im = gdImageCreateFromGd2(fp);
- gdTestAssert(im == NULL);
- fclose(fp);
-
- return gdNumFailures();
-}
diff --git a/Build/source/libs/gd/libgd-src/tests/gd2/too_few_image_data.gd2 b/Build/source/libs/gd/libgd-src/tests/gd2/too_few_image_data.gd2
deleted file mode 100644
index 1c797d1acfa..00000000000
--- a/Build/source/libs/gd/libgd-src/tests/gd2/too_few_image_data.gd2
+++ /dev/null
Binary files differ