diff --git a/Test/CMakeLists.txt b/Test/CMakeLists.txt index 1afd106..6dfbbf9 100644 --- a/Test/CMakeLists.txt +++ b/Test/CMakeLists.txt @@ -14,6 +14,7 @@ add_executable(Tests Math__Abs.cpp Math__Clamp.cpp Math__Lerp.cpp + Math__Max.cpp ) target_link_libraries(Tests Eule) diff --git a/Test/Math__Max.cpp b/Test/Math__Max.cpp new file mode 100644 index 0000000..a7ddb53 --- /dev/null +++ b/Test/Math__Max.cpp @@ -0,0 +1,31 @@ +#include "Catch2.h" +#include + +using namespace Eule; + +/** Equivalence classes: +* -- a < b +* -- a > b +* -- a == b +*/ + +// a < b +TEST_CASE(__FILE__"/a_lt_b", "[Math][Max]") +{ + REQUIRE(Math::Max(4.0, 12.0) == 12.0); + return; +} + +// a > b +TEST_CASE(__FILE__"/a_gt_b", "[Math][Max]") +{ + REQUIRE(Math::Max(12.0, 4.0) == 12.0); + return; +} + +// a == b +TEST_CASE(__FILE__"/a_eq_b", "[Math][Max]") +{ + REQUIRE(Math::Max(9.0, 9.0) == 9.0); + return; +}