Skip to content

Commit d75e6d0

Browse files
committed
Add test project for broadcasts
1 parent a475b03 commit d75e6d0

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

test/broadcasts.sb3

2.25 KB
Binary file not shown.

test/engine/engine_test.cpp

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -673,6 +673,31 @@ TEST(EngineTest, CloneLimit)
673673
ASSERT_EQ(GET_VAR(stage, "test5")->value().toString(), "2 2 0 0");
674674
}*/
675675

676+
// TODO: Uncomment this after fixing #256 and #257
677+
/*TEST(EngineTest, BroadcastsProject)
678+
{
679+
// TODO: Set "infinite" FPS (#254)
680+
Project p("broadcasts.sb3");
681+
ASSERT_TRUE(p.load());
682+
p.run();
683+
684+
auto engine = p.engine();
685+
686+
Stage *stage = engine->stage();
687+
ASSERT_TRUE(stage);
688+
689+
ASSERT_VAR(stage, "test1");
690+
ASSERT_EQ(GET_VAR(stage, "test1")->value().toInt(), 4);
691+
ASSERT_VAR(stage, "test2");
692+
ASSERT_EQ(GET_VAR(stage, "test2")->value().toInt(), 14);
693+
ASSERT_VAR(stage, "test3");
694+
ASSERT_EQ(GET_VAR(stage, "test3")->value().toInt(), 10);
695+
ASSERT_VAR(stage, "test4");
696+
ASSERT_EQ(GET_VAR(stage, "test4")->value().toInt(), 10);
697+
ASSERT_VAR(stage, "test5");
698+
ASSERT_EQ(GET_VAR(stage, "test5")->value().toString(), "2 2 0 0");
699+
}*/
700+
676701
TEST(EngineTest, NoCrashAfterStop)
677702
{
678703
// Regtest for #186

0 commit comments

Comments
 (0)