From bfb3139110277f278bdbc8eaf243a88478a9f81c Mon Sep 17 00:00:00 2001 From: willson-chen Date: Wed, 6 May 2020 11:40:29 +0800 Subject: [PATCH] Move src/gd_color_map_test.c to tests And improve it more like a test case. --- src/Makefile.am | 2 +- src/gd_color_map_test.c | 27 ----------------------- tests/CMakeLists.txt | 1 + tests/Makefile.am | 1 + tests/gdcolormaplookup/.gitignore | 1 + tests/gdcolormaplookup/CMakeLists.txt | 5 +++++ tests/gdcolormaplookup/Makemodule.am | 5 +++++ tests/gdcolormaplookup/gdcolormaplookup.c | 24 ++++++++++++++++++++ 8 files changed, 38 insertions(+), 28 deletions(-) delete mode 100644 src/gd_color_map_test.c create mode 100644 tests/gdcolormaplookup/.gitignore create mode 100644 tests/gdcolormaplookup/CMakeLists.txt create mode 100644 tests/gdcolormaplookup/Makemodule.am create mode 100644 tests/gdcolormaplookup/gdcolormaplookup.c diff --git a/src/Makefile.am b/src/Makefile.am index 377acc0..11eda04 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,7 +1,7 @@ ## Process this file with automake to produce Makefile.in -*-Makefile-*- bin_PROGRAMS = gdcmpgif -check_PROGRAMS = gifanimtest gd_color_map_test +check_PROGRAMS = gifanimtest if HAVE_LIBPNG bin_PROGRAMS += gdtopng pngtogd webpng diff --git a/src/gd_color_map_test.c b/src/gd_color_map_test.c deleted file mode 100644 index 26e08bd..0000000 --- a/src/gd_color_map_test.c +++ /dev/null @@ -1,27 +0,0 @@ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include "gd.h" -#include "gd_color_map.h" - -int -main(void) -{ - int r, g, b; - int i; - for (i=0; i