fixed tests

This commit is contained in:
Robin Müller 2022-05-09 11:15:18 +02:00
parent 80a5ed3c5b
commit 398d04dc50
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
2 changed files with 6 additions and 7 deletions

View File

@ -26,7 +26,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/585
- Major update for version handling, using `git describe` to fetch version information with git.
PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/601
- Place `Version` class outside of `fsfw` namespace. It is generic
- Add helper functions provided by [`cmake-modules`](https://github.com/bilke/cmake-modules)
manually now. Those should not change too often and only a small subset is needed
- Separate folder for easier update and for distinction

View File

@ -10,12 +10,12 @@ TEST_CASE("Version API Tests", "[TestVersionAPI]") {
// Check that major version is non-zero
REQUIRE(fsfw::FSFW_VERSION.major > 0);
uint32_t fsfwMajor = fsfw::FSFW_VERSION.major;
REQUIRE(Version(255, 0, 0) > fsfw::FSFW_VERSION);
REQUIRE(Version(255, 0, 0) >= fsfw::FSFW_VERSION);
REQUIRE(Version(0, 0, 0) < fsfw::FSFW_VERSION);
REQUIRE(Version(0, 0, 0) <= fsfw::FSFW_VERSION);
Version v1 = Version(1, 1, 1);
Version v2 = Version(1, 1, 1);
REQUIRE(fsfw::Version(255, 0, 0) > fsfw::FSFW_VERSION);
REQUIRE(fsfw::Version(255, 0, 0) >= fsfw::FSFW_VERSION);
REQUIRE(fsfw::Version(0, 0, 0) < fsfw::FSFW_VERSION);
REQUIRE(fsfw::Version(0, 0, 0) <= fsfw::FSFW_VERSION);
auto v1 = fsfw::Version(1, 1, 1);
auto v2 = fsfw::Version(1, 1, 1);
REQUIRE(v1 == v2);
REQUIRE(not(v1 < v2));
REQUIRE(not(v1 > v2));