diff options
author | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-12-19 09:31:59 +0100 |
---|---|---|
committer | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-12-19 09:31:59 +0100 |
commit | 6c5e55a1c7d7de3f518fa12f2316e871ad4d9dd2 (patch) | |
tree | a86d846ec2ee1bc97e17297e7155ed4d35b04b5a /src/test/ScriptTest.cpp | |
parent | ee6bf92b661a3762fa3886409641958f32544f88 (diff) | |
parent | d8f1e161b0c98baa7dde287c484529a8b1291626 (diff) |
merge with master
Diffstat (limited to 'src/test/ScriptTest.cpp')
-rw-r--r-- | src/test/ScriptTest.cpp | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/src/test/ScriptTest.cpp b/src/test/ScriptTest.cpp index acdae70..846e398 100644 --- a/src/test/ScriptTest.cpp +++ b/src/test/ScriptTest.cpp @@ -28,7 +28,7 @@ void ScriptTest::SetUp() { TEST_F(ScriptTest, Default) { MyScript & script = this->script; EXPECT_CALL(script, init()).Times(0); - EXPECT_CALL(script, update()).Times(0); + EXPECT_CALL(script, update(_)).Times(0); } TEST_F(ScriptTest, UpdateOnce) { @@ -38,7 +38,7 @@ TEST_F(ScriptTest, UpdateOnce) { InSequence seq; EXPECT_CALL(script, init()).Times(1); - EXPECT_CALL(script, update()).Times(1); + EXPECT_CALL(script, update(_)).Times(1); system.update(); } @@ -46,7 +46,7 @@ TEST_F(ScriptTest, UpdateOnce) { InSequence seq; EXPECT_CALL(script, init()).Times(0); - EXPECT_CALL(script, update()).Times(1); + EXPECT_CALL(script, update(_)).Times(1); system.update(); } } @@ -59,7 +59,7 @@ TEST_F(ScriptTest, UpdateInactive) { InSequence seq; EXPECT_CALL(script, init()).Times(0); - EXPECT_CALL(script, update()).Times(0); + EXPECT_CALL(script, update(_)).Times(0); behaviorscript.active = false; system.update(); } @@ -68,8 +68,20 @@ TEST_F(ScriptTest, UpdateInactive) { InSequence seq; EXPECT_CALL(script, init()).Times(1); - EXPECT_CALL(script, update()).Times(1); + EXPECT_CALL(script, update(_)).Times(1); behaviorscript.active = true; system.update(); } } + +TEST_F(ScriptTest, SaveManager) { + MyScript & script = this->script; + + EXPECT_EQ(&script.get_save_manager(), &this->save_manager); +} + +TEST_F(ScriptTest, LoopTimerManager) { + MyScript & script = this->script; + + EXPECT_EQ(&script.get_loop_timer(), &this->loop_timer); +} |