aboutsummaryrefslogtreecommitdiff
path: root/src/test/ReplayManagerTest.cpp
diff options
context:
space:
mode:
authormax-001 <maxsmits21@kpnmail.nl>2024-12-20 12:01:36 +0100
committermax-001 <maxsmits21@kpnmail.nl>2024-12-20 12:01:36 +0100
commit79d3a9f4311e6684b6df83a15ca7844f58c1959c (patch)
treeb2883e83f61cee9edf290a6a7228c7f0b1fbae8a /src/test/ReplayManagerTest.cpp
parent9140b73e4af7aa925b53e4fb4e6aa7f4ea2e3385 (diff)
parent03aea832aa0bc2edba2cc5ab4d9f8eba42d355be (diff)
Merge remote-tracking branch 'origin/master' into max/game
Diffstat (limited to 'src/test/ReplayManagerTest.cpp')
-rw-r--r--src/test/ReplayManagerTest.cpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/test/ReplayManagerTest.cpp b/src/test/ReplayManagerTest.cpp
new file mode 100644
index 0000000..5ee4b40
--- /dev/null
+++ b/src/test/ReplayManagerTest.cpp
@@ -0,0 +1,38 @@
+#include <gtest/gtest.h>
+
+#include <crepe/api/BehaviorScript.h>
+#include <crepe/api/Scene.h>
+#include <crepe/api/Script.h>
+#include <crepe/manager/ReplayManager.h>
+#include <crepe/system/ReplaySystem.h>
+
+using namespace std;
+using namespace crepe;
+using namespace testing;
+
+class ReplayManagerTest : public Test {
+ Mediator mediator;
+
+public:
+ ComponentManager component_manager{mediator};
+ ReplayManager replay_manager{mediator};
+ ReplaySystem replay_system{mediator};
+
+ GameObject entity = component_manager.new_object("foo");
+ Transform & entity_transform
+ = component_manager.get_components_by_id<Transform>(entity.id).back();
+ Metadata & entity_metadata
+ = component_manager.get_components_by_id<Metadata>(entity.id).back();
+};
+
+TEST_F(ReplayManagerTest, Default) {
+ // replay_manager.record_start();
+
+ // replay_system.fixed_update();
+ // entity_transform.position += {1, 1};
+ // replay_system.fixed_update();
+ // entity_transform.position += {1, 1};
+ // replay_system.fixed_update();
+
+ // recording_t recording = replay_manager.record_end();
+}