fixed math unittests

This commit is contained in:
andrey.zhirnov
2019-06-21 11:19:40 +03:00
parent 3660dcf42a
commit dd2dc510bc
2 changed files with 4 additions and 4 deletions

View File

@@ -703,7 +703,7 @@ namespace e2d::math
template < typename T, typename U >
std::enable_if_t<
std::is_unsigned_v<T> &&
std::is_integral_v<T> &&
std::is_convertible_v<U,T>,
T>
align_ceil (T v, U alignment) {
@@ -714,7 +714,7 @@ namespace e2d::math
template < typename T, typename U >
std::enable_if_t<
std::is_unsigned_v<T> &&
std::is_integral_v<T> &&
std::is_convertible_v<U,T>,
T>
align_floor (T v, U alignment) {

View File

@@ -662,7 +662,7 @@ TEST_CASE("math") {
REQUIRE_FALSE(math::approximately<u32>(umax,umin,1));
}
{
REQUIRE(math::align_ceil(11, 4) == 16);
REQUIRE(math::align_floor(11, 4) == 8);
REQUIRE(math::align_ceil(11, 4) == 12);
REQUIRE(math::align_floor(11, 4u) == 8);
}
}