diff --git a/test/broadcasts.sb3 b/test/broadcasts.sb3 new file mode 100644 index 00000000..0347dd43 Binary files /dev/null and b/test/broadcasts.sb3 differ diff --git a/test/engine/engine_test.cpp b/test/engine/engine_test.cpp index 3e621154..73b08ff8 100644 --- a/test/engine/engine_test.cpp +++ b/test/engine/engine_test.cpp @@ -673,6 +673,72 @@ TEST(EngineTest, CloneLimit) ASSERT_EQ(GET_VAR(stage, "test5")->value().toString(), "2 2 0 0"); }*/ +// TODO: Uncomment this after fixing #256 and #257 +/*TEST(EngineTest, BroadcastsProject) +{ + // TODO: Set "infinite" FPS (#254) + Project p("broadcasts.sb3"); + ASSERT_TRUE(p.load()); + p.run(); + + auto engine = p.engine(); + + Stage *stage = engine->stage(); + ASSERT_TRUE(stage); + + ASSERT_VAR(stage, "test1"); + ASSERT_EQ(GET_VAR(stage, "test1")->value().toInt(), 4); + ASSERT_VAR(stage, "test2"); + ASSERT_EQ(GET_VAR(stage, "test2")->value().toInt(), 14); + ASSERT_VAR(stage, "test3"); + ASSERT_EQ(GET_VAR(stage, "test3")->value().toInt(), 10); + ASSERT_VAR(stage, "test4"); + ASSERT_EQ(GET_VAR(stage, "test4")->value().toInt(), 10); + ASSERT_VAR(stage, "test5"); + ASSERT_EQ(GET_VAR(stage, "test5")->value().toString(), "2 2 0 0"); +}*/ + +// TODO: Uncomment this after fixing #305 +/*TEST(EngineTest, StopAll) +{ + Project p("stop_all.sb3"); + ASSERT_TRUE(p.load()); + p.run(); + + auto engine = p.engine(); + + Stage *stage = engine->stage(); + ASSERT_TRUE(stage); + + ASSERT_VAR(stage, "i"); + ASSERT_EQ(GET_VAR(stage, "i")->value().toInt(), 11); +}*/ + +// TODO: Uncomment this after fixing #305 +/*TEST(EngineTest, StopOtherScriptsInSprite) +{ + Project p("stop_other_scripts_in_sprite.sb3"); + ASSERT_TRUE(p.load()); + p.run(); + + auto engine = p.engine(); + + Stage *stage = engine->stage(); + ASSERT_TRUE(stage); + + ASSERT_VAR(stage, "i"); + ASSERT_EQ(GET_VAR(stage, "i")->value().toInt(), 10); + + ASSERT_VAR(stage, "j"); + ASSERT_EQ(GET_VAR(stage, "j")->value().toInt(), 109); + + ASSERT_VAR(stage, "k"); + ASSERT_EQ(GET_VAR(stage, "k")->value().toInt(), 10); + + ASSERT_VAR(stage, "l"); + ASSERT_EQ(GET_VAR(stage, "l")->value().toInt(), 110); +}*/ + TEST(EngineTest, NoCrashAfterStop) { // Regtest for #186 diff --git a/test/stop_all.sb3 b/test/stop_all.sb3 new file mode 100644 index 00000000..8ccc6eec Binary files /dev/null and b/test/stop_all.sb3 differ diff --git a/test/stop_other_scripts_in_sprite.sb3 b/test/stop_other_scripts_in_sprite.sb3 new file mode 100644 index 00000000..96ab3369 Binary files /dev/null and b/test/stop_other_scripts_in_sprite.sb3 differ