aboutsummaryrefslogtreecommitdiff
path: root/src/test/ScriptSceneTest.cpp
blob: 9ee1e52a1c214cd49d5f917ca1dff99f30410c60 (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
#include <gtest/gtest.h>

// stupid hack to allow access to private/protected members under test
#define private public
#define protected public

#include "ScriptTest.h"
#include <crepe/manager/SceneManager.h>

using namespace std;
using namespace crepe;
using namespace testing;

class ScriptSceneTest : public ScriptTest {
public:
	SceneManager scene_manager{mediator};

	class MyScene : public Scene {};
};

TEST_F(ScriptSceneTest, Inactive) {
	BehaviorScript & behaviorscript = this->behaviorscript;
	MyScript & script = this->script;

	const char * non_default_value = "foo";
	ASSERT_NE(non_default_value, scene_manager.next_scene);

	script.set_next_scene(non_default_value);
	EXPECT_EQ(non_default_value, scene_manager.next_scene);
}