add spritetest lua test case

This commit is contained in:
wangshuai 2013-03-11 13:49:09 +08:00
parent b06380432b
commit 78d5c480b7
4 changed files with 1260 additions and 62 deletions

File diff suppressed because it is too large Load Diff

View File

@ -59,3 +59,20 @@ function class(classname, super)
return cls
end
function schedule(node, callback, delay)
local delay = CCDelayTime:create(delay)
local callfunc = CCCallFunc:create(callback)
local sequence = CCSequence:createWithTwoActions(delay, callfunc)
local action = CCRepeatForever:create(sequence)
node:runAction(action)
return action
end
function performWithDelay(node, callback, delay)
local delay = CCDelayTime:create(delay)
local callfunc = CCCallFunc:create(callback)
local sequence = CCSequence:createWithTwoActions(delay, callfunc)
node:runAction(sequence)
return sequence
end

View File

@ -68,6 +68,7 @@ local function CreateTestScene(nIdx)
elseif nIdx == Test_Table.TEST_TEXT_INPUT then
elseif nIdx == Test_Table.TEST_SPRITE then
scene = SpriteTest()
elseif nIdx == Test_Table.TEST_SCHEDULER then

View File

@ -12,6 +12,7 @@ require "luaScript/MotionStreakTest/MotionStreakTest"
require "luaScript/DrawPrimitivesTest/DrawPrimitivesTest"
require "luaScript/NodeTest/NodeTest"
require "luaScript/TouchesTest/TouchesTest"
require "luaScript/SpriteTest/SpriteTest"
require "luaScript/PerformanceTest/PerformanceTest"
@ -29,40 +30,40 @@ Test_Table =
"TEST_PARTICLE",
"TEST_EASE_ACTIONS",
"TEST_MOTION_STREAK",
"TEST_DRAW_PRIMITIVES",
-- "TEST_DRAW_PRIMITIVES",
"TEST_COCOSNODE",
"TEST_TOUCHES",
"TEST_MENU",
"TEST_ACTION_MANAGER",
"TEST_LAYER",
"TEST_SCENE",
"TEST_PARALLAX",
"TEST_TILE_MAP",
"TEST_INTERVAL",
"TEST_CHIPMUNKACCELTOUCH",
"TEST_LABEL",
"TEST_TEXT_INPUT",
-- "TEST_MENU",
-- "TEST_ACTION_MANAGER",
-- "TEST_LAYER",
-- "TEST_SCENE",
-- "TEST_PARALLAX",
-- "TEST_TILE_MAP",
-- "TEST_INTERVAL",
-- "TEST_CHIPMUNKACCELTOUCH",
-- "TEST_LABEL",
-- "TEST_TEXT_INPUT",
"TEST_SPRITE",
"TEST_SCHEDULER",
"TEST_RENDERTEXTURE",
"TEST_TEXTURE2D",
"TEST_BOX2D",
"TEST_BOX2DBED",
"TEST_EFFECT_ADVANCE",
"TEST_ACCELEROMRTER",
"TEST_KEYPAD",
"TEST_COCOSDENSHION",
"TEST_PERFORMANCE",
"TEST_ZWOPTEX",
"TEST_CURL",
"TEST_USERDEFAULT",
"TEST_BUGS",
"TEST_FONTS",
"TEST_CURRENT_LANGUAGE",
"TEST_TEXTURECACHE",
"TEST_EXTENSIONS",
"TEST_SHADER",
"TEST_MUTITOUCH",
-- "TEST_SCHEDULER",
-- "TEST_RENDERTEXTURE",
-- "TEST_TEXTURE2D",
-- "TEST_BOX2D",
-- "TEST_BOX2DBED",
-- "TEST_EFFECT_ADVANCE",
-- "TEST_ACCELEROMRTER",
-- "TEST_KEYPAD",
-- "TEST_COCOSDENSHION",
-- "TEST_PERFORMANCE",
-- "TEST_ZWOPTEX",
-- "TEST_CURL",
-- "TEST_USERDEFAULT",
-- "TEST_BUGS",
-- "TEST_FONTS",
-- "TEST_CURRENT_LANGUAGE",
-- "TEST_TEXTURECACHE",
-- "TEST_EXTENSIONS",
-- "TEST_SHADER",
-- "TEST_MUTITOUCH",
"TESTS_COUNT"
}
@ -79,38 +80,38 @@ Test_Name =
"ParticleTest",
"ActionsEaseTest",
"MotionStreakTest",
"DrawPrimitivesTest",
-- "DrawPrimitivesTest",
"NodeTest",
"TouchesTest",
"MenuTest",
"ActionManagerTest",
"LayerTest",
"SceneTest",
"ParallaxTest",
"TileMapTest",
"IntervalTest",
"ChipmunkAccelTouchTest",
"LabelTest",
"TextInputTest",
-- "MenuTest",
-- "ActionManagerTest",
-- "LayerTest",
-- "SceneTest",
-- "ParallaxTest",
-- "TileMapTest",
-- "IntervalTest",
-- "ChipmunkAccelTouchTest",
-- "LabelTest",
-- "TextInputTest",
"SpriteTest",
"SchdulerTest",
"RenderTextureTest",
"Texture2DTest",
"Box2dTest",
"Box2dTestBed",
"EffectAdvancedTest",
"Accelerometer",
"KeypadTest",
"CocosDenshionTest",
"PerformanceTest",
"ZwoptexTest",
"CurlTest",
"UserDefaultTest",
"BugsTest",
"FontTest",
"CurrentLanguageTest",
"TextureCacheTest",
"ExtensionsTest",
"ShaderTest",
"MutiTouchTest"
-- "SchdulerTest",
-- "RenderTextureTest",
-- "Texture2DTest",
-- "Box2dTest",
-- "Box2dTestBed",
-- "EffectAdvancedTest",
-- "Accelerometer",
-- "KeypadTest",
-- "CocosDenshionTest",
-- "PerformanceTest",
-- "ZwoptexTest",
-- "CurlTest",
-- "UserDefaultTest",
-- "BugsTest",
-- "FontTest",
-- "CurrentLanguageTest",
-- "TextureCacheTest",
-- "ExtensionsTest",
-- "ShaderTest",
-- "MutiTouchTest"
}