00001 #include "PCXTests.h"
00002
00003
00004 void
00005 PCXTests::testLoader() {
00006 static string images[] = {
00007 "greyscale",
00008 "greyscale_odd",
00009 "palettized",
00010 "palettized_odd",
00011 "test",
00012 "test_odd",
00013
00014
00015
00016
00017
00018
00019 };
00020 static const int image_count = sizeof(images) / sizeof(*images);
00021
00022 static const string img_prefix("images/pcx/");
00023 static const string img_suffix(".pcx");
00024
00025 static const string ref_prefix("images/pcx/ref/");
00026 static const string ref_suffix(".png");
00027
00028 for (int i = 0; i < image_count; ++i) {
00029 AssertImagesEqual(img_prefix + images[i] + img_suffix,
00030 ref_prefix + images[i] + ref_suffix);
00031 }
00032 }
00033
00034
00035 Test*
00036 PCXTests::suite() {
00037 typedef TestCaller<PCXTests> Caller;
00038
00039 TestSuite* suite = new TestSuite();
00040 suite->addTest(new Caller("Test PCX Loader", &PCXTests::testLoader));
00041 return suite;
00042 }