Translated tests for Math/Max
This commit is contained in:
parent
baa22608a6
commit
b6ce760cda
@ -14,6 +14,7 @@ add_executable(Tests
|
||||
Math__Abs.cpp
|
||||
Math__Clamp.cpp
|
||||
Math__Lerp.cpp
|
||||
Math__Max.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(Tests Eule)
|
||||
|
31
Test/Math__Max.cpp
Normal file
31
Test/Math__Max.cpp
Normal file
@ -0,0 +1,31 @@
|
||||
#include "Catch2.h"
|
||||
#include <Eule/Math.h>
|
||||
|
||||
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;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user