aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-01-01 06:24:01 +0100
committerdec05eba <dec05eba@protonmail.com>2018-01-01 06:42:25 +0100
commit9723d823bba90862df6de9ae8cec90cbda9e064c (patch)
treec9c737c5c6376ec0a281862473e1fac6f267d8bd
parent02396d0ed9bda1a6f02819946604fb29da64dba0 (diff)
Add unit test for package.platforms
-rw-r--r--tests/src/confTest/confTest.cpp6
-rw-r--r--tests/src/confTest/project.conf1
2 files changed, 6 insertions, 1 deletions
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"