mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-06-07 01:07:02 +08:00
[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.
This commit is contained in:
parent
ce8b01a14b
commit
6ef805c2a9
@ -120,7 +120,7 @@ if (BUILD_TESTING)
|
|||||||
|
|
||||||
enable_testing()
|
enable_testing()
|
||||||
add_executable(vcpkg-test ${VCPKGTEST_SOURCES} $<TARGET_OBJECTS:vcpkglib>)
|
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)
|
if (VCPKG_BUILD_BENCHMARKING)
|
||||||
target_compile_options(vcpkg-test PRIVATE -DCATCH_CONFIG_ENABLE_BENCHMARKING)
|
target_compile_options(vcpkg-test PRIVATE -DCATCH_CONFIG_ENABLE_BENCHMARKING)
|
||||||
|
@ -19,9 +19,9 @@ TEST_CASE ("equal", "[optional]")
|
|||||||
using vcpkg::Optional;
|
using vcpkg::Optional;
|
||||||
|
|
||||||
CHECK(Optional<int>{} == Optional<int>{});
|
CHECK(Optional<int>{} == Optional<int>{});
|
||||||
CHECK(!(Optional<int>{} == Optional<int>{42}));
|
CHECK_FALSE(Optional<int>{} == Optional<int>{42});
|
||||||
CHECK(!(Optional<int>{42} == Optional<int>{}));
|
CHECK_FALSE(Optional<int>{42} == Optional<int>{});
|
||||||
CHECK(!(Optional<int>{1729} == Optional<int>{42}));
|
CHECK_FALSE(Optional<int>{1729} == Optional<int>{42});
|
||||||
CHECK(Optional<int>{42} == Optional<int>{42});
|
CHECK(Optional<int>{42} == Optional<int>{42});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user