corona
1.0.2
|
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 "bob_hit_james", 00019 }; 00020 static const int image_count = sizeof(images) / sizeof(*images); 00021 00022 static const string img_prefix("images/gif/"); 00023 static const string img_suffix(".gif"); 00024 00025 static const string ref_prefix("images/gif/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 GIFTests::suite() { 00037 typedef TestCaller<GIFTests> Caller; 00038 00039 TestSuite* suite = new TestSuite(); 00040 suite->addTest(new Caller("Test GIF Loader", &GIFTests::testLoader)); 00041 return suite; 00042 }