aboutsummaryrefslogtreecommitdiff
path: root/src/test/ScriptTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ScriptTest.cpp')
-rw-r--r--src/test/ScriptTest.cpp26
1 files changed, 17 insertions, 9 deletions
diff --git a/src/test/ScriptTest.cpp b/src/test/ScriptTest.cpp
index 846e398..40aa25c 100644
--- a/src/test/ScriptTest.cpp
+++ b/src/test/ScriptTest.cpp
@@ -28,7 +28,8 @@ 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, fixed_update(_)).Times(0);
+ EXPECT_CALL(script, frame_update(_)).Times(0);
}
TEST_F(ScriptTest, UpdateOnce) {
@@ -38,16 +39,23 @@ TEST_F(ScriptTest, UpdateOnce) {
InSequence seq;
EXPECT_CALL(script, init()).Times(1);
- EXPECT_CALL(script, update(_)).Times(1);
- system.update();
+ EXPECT_CALL(script, fixed_update(_)).Times(1);
+ system.fixed_update();
}
{
InSequence seq;
EXPECT_CALL(script, init()).Times(0);
- EXPECT_CALL(script, update(_)).Times(1);
- system.update();
+ EXPECT_CALL(script, fixed_update(_)).Times(1);
+ system.fixed_update();
+ }
+
+ {
+ InSequence seq;
+
+ EXPECT_CALL(script, frame_update(_)).Times(1);
+ system.frame_update();
}
}
@@ -59,18 +67,18 @@ TEST_F(ScriptTest, UpdateInactive) {
InSequence seq;
EXPECT_CALL(script, init()).Times(0);
- EXPECT_CALL(script, update(_)).Times(0);
+ EXPECT_CALL(script, fixed_update(_)).Times(0);
behaviorscript.active = false;
- system.update();
+ system.fixed_update();
}
{
InSequence seq;
EXPECT_CALL(script, init()).Times(1);
- EXPECT_CALL(script, update(_)).Times(1);
+ EXPECT_CALL(script, fixed_update(_)).Times(1);
behaviorscript.active = true;
- system.update();
+ system.fixed_update();
}
}