X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=images%2Fimage-test.c;h=b046672f9e1959aec7a3eb3df05a07d6ac0b54fd;hb=62eda8640605c19ecd817e274e75717022349732;hp=c751e8a0225ccd3c0bc0f3ed7407784c3d056976;hpb=54caf9eea63bd7f50bbe201b60c80aa93b0f6a01;p=libucw.git diff --git a/images/image-test.c b/images/image-test.c index c751e8a0..b046672f 100644 --- a/images/image-test.c +++ b/images/image-test.c @@ -1,3 +1,12 @@ +/* + * Image Library -- Simple automatic tests + * + * (c) 2006 Pavel Charvat + * + * This software may be freely distributed and used according to the terms + * of the GNU Lesser General Public License. + */ + #undef LOCAL_DEBUG #include "lib/lib.h" @@ -129,7 +138,7 @@ test_threads_thread(void *param UNUSED) uns format = 0; while (!format) { - switch (random_max(2)) + switch (random_max(3)) { case 0: #if defined(CONFIG_IMAGES_LIBJPEG) || defined(CONFIG_IMAGES_LIBMAGICK) @@ -139,6 +148,11 @@ test_threads_thread(void *param UNUSED) case 1: #if defined(CONFIG_IMAGES_LIBPNG) || defined(CONFIG_IMAGES_LIBMAGICK) format = IMAGE_FORMAT_PNG; +#endif + break; + case 2: +#if defined(CONFIG_IMAGES_LIBMAGICK) + format = IMAGE_FORMAT_GIF; #endif break; default: @@ -203,12 +217,12 @@ main(int argc, char **argv) die("Invalid parameter"); srandom(time(NULL) ^ getpid()); - + if (want_image_iface) test_image_iface(); if (want_threads) test_threads(); - + return 0; }