From 7c24c5d0de4d3584d6d2f9f3c26b4d757b0a0df2 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 10 Oct 2018 07:59:51 +0200 Subject: Fix sibs test not including parent library correctly Refactor config parsing to reduce number of changes when introducing a new platform to support --- tests/src/confTest/confTest.cpp | 12 +++++++----- tests/src/confTest/linux/x86/static/debug/libcool.a | 0 tests/src/confTest/linux/x86/static/release/libcool.a | 0 3 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 tests/src/confTest/linux/x86/static/debug/libcool.a create mode 100644 tests/src/confTest/linux/x86/static/release/libcool.a (limited to 'tests') diff --git a/tests/src/confTest/confTest.cpp b/tests/src/confTest/confTest.cpp index b5d5ae1..8dab691 100644 --- a/tests/src/confTest/confTest.cpp +++ b/tests/src/confTest/confTest.cpp @@ -83,11 +83,13 @@ TEST_CASE("parse config - use different config for different platforms") } #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 + REQUIRE(sibsConfig.getDebugStaticLibs()[0] == TINYDIR_STRING("tests/src/confTest/linux/x64/static/debug/libcool.a")); + REQUIRE(sibsConfig.getReleaseStaticLibs()[0] == TINYDIR_STRING("tests/src/confTest/linux/x64/static/release/libcool.a")); + REQUIRE(sibsConfig.getGlobalIncludeDirs()[0] == "include_linux64"); + #elif OS_TYPE == OS_TYPE_LINUX and defined(SIBS_ENV_32BIT) + REQUIRE(sibsConfig.getDebugStaticLibs()[0] == TINYDIR_STRING("tests/src/confTest/linux/x86/static/debug/libcool.a")); + REQUIRE(sibsConfig.getReleaseStaticLibs()[0] == TINYDIR_STRING("tests/src/confTest/linux/x86/static/release/libcool.a")); + REQUIRE(sibsConfig.getGlobalIncludeDirs()[0] == "include_linux32"); #endif } diff --git a/tests/src/confTest/linux/x86/static/debug/libcool.a b/tests/src/confTest/linux/x86/static/debug/libcool.a new file mode 100644 index 0000000..e69de29 diff --git a/tests/src/confTest/linux/x86/static/release/libcool.a b/tests/src/confTest/linux/x86/static/release/libcool.a new file mode 100644 index 0000000..e69de29 -- cgit v1.2.3