00001 #include "GIFTests.h"
00002
00003
00004 void
00005 GIFTests::testLoader() {
00006 static string images[] = {
00007 "clustindex",
00008 "cover",
00009 "enter",
00010 "fireball",
00011 "image95",
00012 "panly01",
00013 "porsche",
00014 "quake",
00015 "solid2",
00016 "x-trans",
00017 "zemus2",
00018 };
00019 static const int image_count = sizeof(images) / sizeof(*images);
00020
00021 static const string img_prefix("images/gif/");
00022 static const string img_suffix(".gif");
00023
00024 static const string ref_prefix("images/gif/ref/");
00025 static const string ref_suffix(".png");
00026
00027 for (int i = 0; i < image_count; ++i) {
00028 AssertImagesEqual(img_prefix + images[i] + img_suffix,
00029 ref_prefix + images[i] + ref_suffix);
00030 }
00031 }
00032
00033
00034 Test*
00035 GIFTests::suite() {
00036 typedef TestCaller<GIFTests> Caller;
00037
00038 TestSuite* suite = new TestSuite();
00039 suite->addTest(new Caller("Test GIF Loader", &GIFTests::testLoader));
00040 return suite;
00041 }