aboutsummaryrefslogtreecommitdiff
path: root/src/test/AudioTest.cpp
blob: 3be5afafab7d9bc35c26dd68b6efa109b39f1a49 (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>

#include <crepe/manager/ComponentManager.h>
#include <crepe/manager/ResourceManager.h>
#include <crepe/api/AudioSource.h>
#include <crepe/api/GameObject.h>
#include <crepe/system/AudioSystem.h>

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

class AudioTest : public Test {
	Mediator mediator;
public:
	ComponentManager component_manager{mediator};
	ResourceManager resource_manager{mediator};
	AudioSystem system {mediator};

	void SetUp() override {
		auto & mgr = this->component_manager;
		GameObject entity = mgr.new_object("name");
		AudioSource & audio_source = entity.add_component<AudioSource>("mwe/audio/sfx1.wav");
	}
};

TEST_F(AudioTest, Default) {
	system.update();
}