mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-03 19:33:49 +00:00
committed by
Konstantin Pastbin
parent
7781528263
commit
836c39ff64
@@ -1,12 +1,10 @@
|
||||
#include "geometry/geometry_tests/equality.hpp"
|
||||
|
||||
#include "base/math.hpp"
|
||||
#include "geometry/screenbase.hpp"
|
||||
#include "geometry/transformations.hpp"
|
||||
|
||||
#include "testing/testing.hpp"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
namespace screen_test
|
||||
{
|
||||
using test::is_equal;
|
||||
@@ -23,10 +21,10 @@ static void check_set_from_rect(ScreenBase & screen, int width, int height)
|
||||
b2 = screen.GtoP(b2);
|
||||
|
||||
// check that we are in boundaries.
|
||||
TEST(math::Between(0, width, static_cast<int>(std::lround(b1.x))), ());
|
||||
TEST(math::Between(0, width, static_cast<int>(std::lround(b2.x))), ());
|
||||
TEST(math::Between(0, height, static_cast<int>(std::lround(b1.y))), ());
|
||||
TEST(math::Between(0, height, static_cast<int>(std::lround(b2.y))), ());
|
||||
TEST(math::Between(0, width, math::iround(b1.x)), ());
|
||||
TEST(math::Between(0, width, math::iround(b2.x)), ());
|
||||
TEST(math::Between(0, height, math::iround(b1.y)), ());
|
||||
TEST(math::Between(0, height, math::iround(b2.y)), ());
|
||||
}
|
||||
|
||||
UNIT_TEST(ScreenBase_P2G2P)
|
||||
|
||||
Reference in New Issue
Block a user