From 2e295da70e062b94c24e5ff2b3ecda4ee5fa6953 Mon Sep 17 00:00:00 2001 From: Nick Waddoups Date: Tue, 5 Nov 2024 09:46:30 -0700 Subject: [PATCH] Fixed find_if_not test name and added runtime test --- test/test_find_if.cpp | 2 ++ test/test_find_if_not.cpp | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/test/test_find_if.cpp b/test/test_find_if.cpp index b64e6aef..b9472936 100644 --- a/test/test_find_if.cpp +++ b/test/test_find_if.cpp @@ -105,6 +105,8 @@ static_assert(test_find_if()); TEST_CASE("find_if") { + REQUIRE(test_find_if()); + { std::vector vec {1, 2, 3, 4, 5}; auto is_greater_than_3 = [](int x) { return x > 3; }; diff --git a/test/test_find_if_not.cpp b/test/test_find_if_not.cpp index 6e8208ec..73796433 100644 --- a/test/test_find_if_not.cpp +++ b/test/test_find_if_not.cpp @@ -44,7 +44,7 @@ static_assert(not std::invocable); using not_a_predicate = auto(int x) -> S; static_assert(not std::invocable); -constexpr bool test_find_if() +constexpr bool test_find_if_not() { { int const ints[] = {0, 1, 2, 3, 4, 5}; @@ -99,12 +99,14 @@ constexpr bool test_find_if() return true; } -static_assert(test_find_if()); +static_assert(test_find_if_not()); } // namespace TEST_CASE("find_if_not") { + REQUIRE(test_find_if_not()); + { std::vector vec {1, 2, 3, 4, 5}; auto is_odd = [](int x) { return x % 2 == 1; };