Skip to content

Commit da5cb26

Browse files
committed
Add test project for stop other scripts in sprite
1 parent ee36e52 commit da5cb26

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

test/engine/engine_test.cpp

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -714,6 +714,31 @@ TEST(EngineTest, CloneLimit)
714714
ASSERT_EQ(GET_VAR(stage, "i")->value().toInt(), 11);
715715
}*/
716716

717+
// TODO: Uncomment this after fixing #305
718+
/*TEST(EngineTest, StopOtherScriptsInSprite)
719+
{
720+
Project p("stop_other_scripts_in_sprite.sb3");
721+
ASSERT_TRUE(p.load());
722+
p.run();
723+
724+
auto engine = p.engine();
725+
726+
Stage *stage = engine->stage();
727+
ASSERT_TRUE(stage);
728+
729+
ASSERT_VAR(stage, "i");
730+
ASSERT_EQ(GET_VAR(stage, "i")->value().toInt(), 10);
731+
732+
ASSERT_VAR(stage, "j");
733+
ASSERT_EQ(GET_VAR(stage, "j")->value().toInt(), 109);
734+
735+
ASSERT_VAR(stage, "k");
736+
ASSERT_EQ(GET_VAR(stage, "k")->value().toInt(), 10);
737+
738+
ASSERT_VAR(stage, "l");
739+
ASSERT_EQ(GET_VAR(stage, "l")->value().toInt(), 110);
740+
}*/
741+
717742
TEST(EngineTest, NoCrashAfterStop)
718743
{
719744
// Regtest for #186
1.96 KB
Binary file not shown.

0 commit comments

Comments
 (0)