diff options
| author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-14 19:57:45 +0100 | 
|---|---|---|
| committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-14 19:57:45 +0100 | 
| commit | add8724446fdeae1aaec9b07544cf7a5475a9bfe (patch) | |
| tree | 7c51cf0d65f8f0d906a0abe2b29bad916dcf83e8 /src/test/main.cpp | |
| parent | ab0b4923c4f49e7a28f6d17e994d3e013ca344bb (diff) | |
ResourceManager working + tested
Diffstat (limited to 'src/test/main.cpp')
| -rw-r--r-- | src/test/main.cpp | 15 | 
1 files changed, 13 insertions, 2 deletions
| diff --git a/src/test/main.cpp b/src/test/main.cpp index 241015d..19a8d6e 100644 --- a/src/test/main.cpp +++ b/src/test/main.cpp @@ -5,11 +5,22 @@  using namespace crepe;  using namespace testing; +class GlobalConfigReset : public EmptyTestEventListener { +public: +	Config & cfg = Config::get_instance(); + +	// This function is called before each test +	void OnTestStart(const TestInfo &) override { +		cfg.log.level = Log::Level::WARNING; +	} +}; +  int main(int argc, char ** argv) {  	InitGoogleTest(&argc, argv); -	auto & cfg = Config::get_instance(); -	cfg.log.level = Log::Level::ERROR; +	UnitTest & ut = *UnitTest::GetInstance(); +	ut.listeners().Append(new GlobalConfigReset);  	return RUN_ALL_TESTS();  } + |