share one loadTestConfig() helper across the tests
This commit is contained in:
15
src/test/TestConfig.h
Normal file
15
src/test/TestConfig.h
Normal file
@@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#include "ConfigLoader.h"
|
||||
#include "GameConfig.h"
|
||||
|
||||
// Loads the test fixture config set (CONFIG_DIR points at bin/test/data/config
|
||||
// for the test target). Shared by every test that needs a full GameConfig, so
|
||||
// the one-liner is not repeated per translation unit.
|
||||
//
|
||||
// Like SimulationTestAccess.h this header lives under src/test and is
|
||||
// deliberately off the lib/ui/app include path.
|
||||
inline GameConfig loadTestConfig()
|
||||
{
|
||||
return ConfigLoader::loadFromDirectory(CONFIG_DIR);
|
||||
}
|
||||
Reference in New Issue
Block a user