Skip to content

Commit

Permalink
Add regtest for #277
Browse files Browse the repository at this point in the history
  • Loading branch information
adazem009 committed Nov 18, 2023
1 parent 98206c4 commit 5fb6b8f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/engine/engine_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1192,3 +1192,22 @@ TEST(EngineTest, NoRefreshWhenCallingRunningBroadcast)
ASSERT_VAR(stage, "passed2");
ASSERT_TRUE(GET_VAR(stage, "passed2")->value().toBool());
}

TEST(EngineTest, NoStopWhenCallingRunningBroadcastFromCustomBlock)
{
// Regtest for #257
Project p("regtest_projects/277_custom_block_call_running_broadcast_stop.sb3");
ASSERT_TRUE(p.load());
p.run();

auto engine = p.engine();

Stage *stage = engine->stage();
ASSERT_TRUE(stage);

ASSERT_VAR(stage, "passed1");
ASSERT_TRUE(GET_VAR(stage, "passed1")->value().toBool());

ASSERT_VAR(stage, "passed2");
ASSERT_TRUE(GET_VAR(stage, "passed2")->value().toBool());
}
Binary file not shown.

0 comments on commit 5fb6b8f

Please sign in to comment.