Merge pull request #6805 from andyque/fix_broken_test_resource_file

fix cpp-tests resource crash
This commit is contained in:
minggo 2014-05-19 13:38:28 +08:00
commit 66dd5866d1
3 changed files with 10 additions and 10 deletions

View File

@ -31,7 +31,7 @@ struct {
{ "Texture Perf Test",[](Ref*sender){runTextureTest();} }, { "Texture Perf Test",[](Ref*sender){runTextureTest();} },
{ "Touches Perf Test",[](Ref*sender){runTouchesTest();} }, { "Touches Perf Test",[](Ref*sender){runTouchesTest();} },
{ "Label Perf Test",[](Ref*sender){runLabelTest();} }, { "Label Perf Test",[](Ref*sender){runLabelTest();} },
{ "Renderer Perf Test",[](Ref*sender){runRendererTest();} }, //{ "Renderer Perf Test",[](Ref*sender){runRendererTest();} },
{ "Container Perf Test", [](Ref* sender ) { runContainerPerformanceTest(); } }, { "Container Perf Test", [](Ref* sender ) { runContainerPerformanceTest(); } },
{ "EventDispatcher Perf Test", [](Ref* sender ) { runEventDispatcherPerformanceTest(); } }, { "EventDispatcher Perf Test", [](Ref* sender ) { runEventDispatcherPerformanceTest(); } },
{ "Scenario Perf Test", [](Ref* sender ) { runScenarioTest(); } }, { "Scenario Perf Test", [](Ref* sender ) { runScenarioTest(); } },

View File

@ -1951,34 +1951,34 @@ void TextureMemoryAlloc::updateImage(cocos2d::Ref *sender)
switch (tag) switch (tag)
{ {
case 0: case 0:
file = "Images/test_1021x1024.png"; file = "Images/background.png";
break; break;
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
// android can not pack .gz file into apk file // android can not pack .gz file into apk file
case 1: case 1:
file = "Images/test_1021x1024_rgba8888.pvr"; file = "Images/fire_rgba8888.pvr";
break; break;
case 2: case 2:
file = "Images/test_1021x1024_rgb888.pvr"; file = "Images/grossini_prv_rgba8888.pvr";
break; break;
case 3: case 3:
file = "Images/test_1021x1024_rgba4444.pvr"; file = "Images/grossini_prv_rgba4444.pvr";
break; break;
case 4: case 4:
file = "Images/test_1021x1024_a8.pvr"; file = "Images/test_image_a8.pvr";
break; break;
#else #else
case 1: case 1:
file = "Images/test_1021x1024_rgba8888.pvr.gz"; file = "Images/test_image_rgba4444.pvr.gz";
break; break;
case 2: case 2:
file = "Images/test_1021x1024_rgb888.pvr.gz"; file = "Images/test_image_rgba4444.pvr.gz";
break; break;
case 3: case 3:
file = "Images/test_1021x1024_rgba4444.pvr.gz"; file = "Images/test_image_rgba4444.pvr.gz";
break; break;
case 4: case 4:
file = "Images/test_1021x1024_a8.pvr.gz"; file = "Images/test_image_rgba4444.pvr.gz";
break; break;
#endif #endif
} }