Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

PCXTests.cpp

Go to the documentation of this file.
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     // we don't support these yet
00015     //"test_v0",
00016     //"test_v0_odd",
00017     //"test_v2",
00018     //"test_v2_odd",
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 }

Generated on Thu Oct 2 12:59:31 2003 for corona by doxygen1.3-rc1