aboutsummaryrefslogtreecommitdiff
path: root/src/test/ScriptTest.cpp
diff options
context:
space:
mode:
authorheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-19 13:58:58 +0100
committerheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-19 13:58:58 +0100
commitb5c4879189a8ff55434c8c04c14163dfda83de65 (patch)
tree17595782d04038818f7ed4f6bb2199949ebd30a0 /src/test/ScriptTest.cpp
parentebe2fcfce52d9a303c5fa19d79554e20ac7f0bac (diff)
parent794efc4ef7a44b190a4d9ecc2dd84a66c62ab005 (diff)
Merge branch 'master' into niels/UI
Diffstat (limited to 'src/test/ScriptTest.cpp')
-rw-r--r--src/test/ScriptTest.cpp22
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);
+}