From 9723d823bba90862df6de9ae8cec90cbda9e064c Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 1 Jan 2018 06:24:01 +0100 Subject: Add unit test for package.platforms --- tests/src/confTest/confTest.cpp | 6 +++++- tests/src/confTest/project.conf | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/src/confTest/confTest.cpp b/tests/src/confTest/confTest.cpp index e1b5b7a..5bab144 100644 --- a/tests/src/confTest/confTest.cpp +++ b/tests/src/confTest/confTest.cpp @@ -14,8 +14,12 @@ TEST_CASE("parse config") } REQUIRE(sibsConfig.getPackageName() == "confTest"); REQUIRE(sibsConfig.getPackageType() == PackageType::LIBRARY); - REQUIRE(sibsConfig.getDependencies().size() == 2); + REQUIRE(sibsConfig.getPlatforms().size() == 2); + REQUIRE(containsPlatform(sibsConfig.getPlatforms(), PLATFORM_LINUX64)); + REQUIRE(containsPlatform(sibsConfig.getPlatforms(), PLATFORM_WIN64)); + + REQUIRE(sibsConfig.getDependencies().size() == 2); const auto &xxhashDependency = sibsConfig.getDependencies()[0]; REQUIRE(xxhashDependency.name == "xxhash"); REQUIRE(xxhashDependency.version == "0.1.0"); diff --git a/tests/src/confTest/project.conf b/tests/src/confTest/project.conf index e50ad9c..de5112d 100644 --- a/tests/src/confTest/project.conf +++ b/tests/src/confTest/project.conf @@ -2,6 +2,7 @@ name = "confTest" version = "0.1.0" type = "library" +platforms = ["linux64", "win64"] [dependencies] xxhash = "0.1.0" -- cgit v1.2.3