A retro style homage to 80s dungeon crawlers hand crafted in C++.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
|
|
|
#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::out_bounce(out);
|
|
|
|
out = ease::out_bounce(out);
|
|
|
|
out = ease::out_bounce(out);
|
|
|
|
|
|
|
|
out = ease::in_out_back(3.4);
|
|
|
|
REQUIRE(out < 250.0);
|
|
|
|
}
|