diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/confTest/confTest.cpp | 11 | ||||
-rw-r--r-- | tests/src/confTest/validProject.conf | 12 |
2 files changed, 23 insertions, 0 deletions
diff --git a/tests/src/confTest/confTest.cpp b/tests/src/confTest/confTest.cpp index 17b5995..e508e84 100644 --- a/tests/src/confTest/confTest.cpp +++ b/tests/src/confTest/confTest.cpp @@ -27,6 +27,17 @@ TEST_CASE("parse config") const auto &catch2Dependency = sibsConfig.getDependencies()[1]; REQUIRE(catch2Dependency.name == "catch2"); REQUIRE(catch2Dependency.version == "1.0.0"); + + REQUIRE(sibsConfig.shouldUseCmake()); + + REQUIRE(sibsConfig.getCmakeDir() == TINYDIR_STRING("tests/src/confTest/cmakeGlobal")); + REQUIRE(sibsConfig.getCmakeArgs() == "\"-DCMAKE_BUILD_TYPE=Debug\" \"-DENTITYX_RUN_BENCHMARKS=0\""); + + REQUIRE(sibsConfig.getCmakeDirStatic() == TINYDIR_STRING("tests/src/confTest/cmakeStatic")); + REQUIRE(sibsConfig.getCmakeArgsStatic() == "\"-DCMAKE_BUILD_TYPE=Debug\" \"-DENTITYX_RUN_BENCHMARKS=0\" \"-DENTITYX_BUILD_TESTING=0\""); + + REQUIRE(sibsConfig.getCmakeDirDynamic() == TINYDIR_STRING("tests/src/confTest/cmakeDynamic")); + REQUIRE(sibsConfig.getCmakeArgsDynamic() == "\"-DCMAKE_BUILD_TYPE=Debug\" \"-DENTITYX_RUN_BENCHMARKS=0\" \"-DENTITYX_BUILD_TESTING=0\" \"-DENTITYX_BUILD_SHARED=1\""); } TEST_CASE("parse config - invalid object") diff --git a/tests/src/confTest/validProject.conf b/tests/src/confTest/validProject.conf index de5112d..eab258b 100644 --- a/tests/src/confTest/validProject.conf +++ b/tests/src/confTest/validProject.conf @@ -7,3 +7,15 @@ platforms = ["linux64", "win64"] [dependencies] xxhash = "0.1.0" catch2 = "1.0.0" + +[cmake] +dir = "cmakeGlobal" +args = ["ENTITYX_RUN_BENCHMARKS=0"] + +[cmake.static] +dir = "cmakeStatic" +args = ["ENTITYX_BUILD_TESTING=0"] + +[cmake.dynamic] +dir = "cmakeDynamic" +args = ["ENTITYX_BUILD_TESTING=0", "ENTITYX_BUILD_SHARED=1"] |