diff options
| author | Martin Hořeňovský <martin.horenovsky@gmail.com> | 2020-04-29 21:00:50 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-29 12:00:50 -0700 |
| commit | 6ef805c2a915cba16f5d9f1ccd38d13384f424a1 (patch) | |
| tree | bd77bdabd36612dd9680a3819390972ff21b53ee | |
| parent | ce8b01a14bb6a61b4f0686674e4b51bd8ecfb83b (diff) | |
| download | vcpkg-6ef805c2a915cba16f5d9f1ccd38d13384f424a1.tar.gz vcpkg-6ef805c2a915cba16f5d9f1ccd38d13384f424a1.zip | |
[vcpkg] Small touchups for vcpkg unit tests (#11068)
* Do not disable expression decomposition in some optional tests
The tests are trivial enough that it is unlikely to come useful,
but the old usage is bad practice.
* Run tests in random order
This should prevent committing tests that are run-order dependent,
or at least shake them out eventually in CI.
| -rw-r--r-- | toolsrc/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | toolsrc/src/vcpkg-test/optional.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/toolsrc/CMakeLists.txt b/toolsrc/CMakeLists.txt index 7dd333e30..c08e71fb0 100644 --- a/toolsrc/CMakeLists.txt +++ b/toolsrc/CMakeLists.txt @@ -120,7 +120,7 @@ if (BUILD_TESTING) enable_testing()
add_executable(vcpkg-test ${VCPKGTEST_SOURCES} $<TARGET_OBJECTS:vcpkglib>)
- add_test(NAME default COMMAND vcpkg-test)
+ add_test(NAME default COMMAND vcpkg-test --order rand --rng-seed time)
if (VCPKG_BUILD_BENCHMARKING)
target_compile_options(vcpkg-test PRIVATE -DCATCH_CONFIG_ENABLE_BENCHMARKING)
diff --git a/toolsrc/src/vcpkg-test/optional.cpp b/toolsrc/src/vcpkg-test/optional.cpp index ce728208f..c2348c5c6 100644 --- a/toolsrc/src/vcpkg-test/optional.cpp +++ b/toolsrc/src/vcpkg-test/optional.cpp @@ -19,9 +19,9 @@ TEST_CASE ("equal", "[optional]") using vcpkg::Optional; CHECK(Optional<int>{} == Optional<int>{}); - CHECK(!(Optional<int>{} == Optional<int>{42})); - CHECK(!(Optional<int>{42} == Optional<int>{})); - CHECK(!(Optional<int>{1729} == Optional<int>{42})); + CHECK_FALSE(Optional<int>{} == Optional<int>{42}); + CHECK_FALSE(Optional<int>{42} == Optional<int>{}); + CHECK_FALSE(Optional<int>{1729} == Optional<int>{42}); CHECK(Optional<int>{42} == Optional<int>{42}); } |
