Did a full code coverage review and improved many of the tests and a bunch of code. I'll do one more final walk through all the code before getting back to work on the new combat system.
This commit is contained in:
parent
113a4a3b3e
commit
d3158291f7
29 changed files with 119 additions and 1218 deletions
17
tests/easings.cpp
Normal file
17
tests/easings.cpp
Normal file
|
@ -0,0 +1,17 @@
|
|||
#include <catch2/catch_test_macros.hpp>
|
||||
#include "easings.hpp"
|
||||
#include <cmath>
|
||||
|
||||
TEST_CASE("make sure the easing functions at least run", "[easings]") {
|
||||
double out = ease::sine(1.3);
|
||||
REQUIRE(out <= 1.0);
|
||||
|
||||
out = ease::out_circ(3.444);
|
||||
REQUIRE(std::isnan(out));
|
||||
|
||||
out = ease::out_bounce(1.13);
|
||||
REQUIRE(out <= 10 );
|
||||
|
||||
out = ease::in_out_back(3.4);
|
||||
REQUIRE(out < 250.0);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue