aboutsummaryrefslogtreecommitdiff
path: root/src/test/ReplayManagerTest.cpp
blob: b2619eb616012836edecfc737d1471019755531b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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();
}