diff options
Diffstat (limited to 'tests/src/confTest/confTest.cpp')
-rw-r--r-- | tests/src/confTest/confTest.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/src/confTest/confTest.cpp b/tests/src/confTest/confTest.cpp index a32f2ae..94cdb11 100644 --- a/tests/src/confTest/confTest.cpp +++ b/tests/src/confTest/confTest.cpp @@ -55,3 +55,22 @@ TEST_CASE("parse config - invalid field") REQUIRE(result.isErr()); REQUIRE(result.getErrMsg() == "Invalid field \"invalidField\" under object \"package\""); } + +TEST_CASE("parse config - use different config for different platforms") +{ + SibsConfig sibsConfig(Compiler::GCC, TINYDIR_STRING("tests/src/confTest")); + Result<bool> result = Config::readFromFile(TINYDIR_STRING("tests/src/confTest/platformConfig.conf"), sibsConfig); + if(result.isErr()) + { + fprintf(stderr, "%s", result.getErrMsg().c_str()); + exit(1); + } + + #if OS_TYPE == OS_TYPE_LINUX and defined(SIBS_ENV_64BIT) + #ifdef DEBUG + REQUIRE(sibsConfig.getDebugStaticLibs()[0] == TINYDIR_STRING("tests/src/confTest/linux/x64/static/debug/libcool.a")); + #else + REQUIRE(sibsConfig.getDebugStaticLibs()[0] == TINYDIR_STRING("tests/src/confTest/linux/x64/static/release/libcool.a")); + #endif + #endif +} |