Skip to content

Commit c1f22b7

Browse files
committed
clear
1 parent c4398bf commit c1f22b7

File tree

5 files changed

+10
-19
lines changed

5 files changed

+10
-19
lines changed

tests/engines/unit_test_iw_engine.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#include <omath/engines/iw_engine/constants.hpp>
77
#include <omath/engines/iw_engine/formulas.hpp>
88
#include <random>
9-
#include "../test_tolerance.hpp"
109

1110
TEST(unit_test_iw_engine, ForwardVector)
1211
{
@@ -78,8 +77,8 @@ TEST(unit_test_iw_engine, ProjectTargetMovedFromCamera)
7877
if (!projected.has_value())
7978
continue;
8079

81-
EXPECT_NEAR(projected->x, 960, TEST_TOLERANCE_STRICT);
82-
EXPECT_NEAR(projected->y, 540, TEST_TOLERANCE_STRICT);
80+
EXPECT_NEAR(projected->x, 960, 0.00001);
81+
EXPECT_NEAR(projected->y, 540, 0.00001);
8382
}
8483
}
8584

tests/engines/unit_test_open_gl.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#include <omath/engines/opengl_engine/constants.hpp>
77
#include <omath/engines/opengl_engine/formulas.hpp>
88
#include <random>
9-
#include "../test_tolerance.hpp"
109

1110
TEST(unit_test_opengl, ForwardVector)
1211
{
@@ -76,8 +75,8 @@ TEST(unit_test_opengl, ProjectTargetMovedFromCamera)
7675
if (!projected.has_value())
7776
continue;
7877

79-
EXPECT_NEAR(projected->x, 960, TEST_TOLERANCE_STRICT);
80-
EXPECT_NEAR(projected->y, 540, TEST_TOLERANCE_STRICT);
78+
EXPECT_NEAR(projected->x, 960, 0.00001);
79+
EXPECT_NEAR(projected->y, 540, 0.00001);
8180
}
8281
}
8382

tests/engines/unit_test_source_engine.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#include <omath/engines/source_engine/constants.hpp>
77
#include <omath/engines/source_engine/formulas.hpp>
88
#include <random>
9-
#include "../test_tolerance.hpp"
109

1110
TEST(unit_test_source_engine, ForwardVector)
1211
{
@@ -78,8 +77,8 @@ TEST(unit_test_source_engine, ProjectTargetMovedFromCamera)
7877
if (!projected.has_value())
7978
continue;
8079

81-
EXPECT_NEAR(projected->x, 960, TEST_TOLERANCE_STRICT);
82-
EXPECT_NEAR(projected->y, 540, TEST_TOLERANCE_STRICT);
80+
EXPECT_NEAR(projected->x, 960, 0.00001);
81+
EXPECT_NEAR(projected->y, 540, 0.00001);
8382
}
8483
}
8584

tests/general/unit_test_projection.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#include <omath/projection/camera.hpp>
99
#include <print>
1010
#include <random>
11-
#include "../test_tolerance.hpp"
1211

1312
TEST(UnitTestProjection, Projection)
1413
{
@@ -71,8 +70,8 @@ TEST(UnitTestProjection, ScreenToWorldTopLeftCorner)
7170
const auto world_cords = cam.screen_to_world<ScreenStart::TOP_LEFT_CORNER>(initial_screen_cords);
7271
const auto screen_cords = cam.world_to_screen<ScreenStart::TOP_LEFT_CORNER>(world_cords.value());
7372

74-
EXPECT_NEAR(screen_cords->x, initial_screen_cords.x, TEST_TOLERANCE_ROUNDTRIP);
75-
EXPECT_NEAR(screen_cords->y, initial_screen_cords.y, TEST_TOLERANCE_ROUNDTRIP);
73+
EXPECT_NEAR(screen_cords->x, initial_screen_cords.x, 0.001);
74+
EXPECT_NEAR(screen_cords->y, initial_screen_cords.y, 0.001);
7675
}
7776
}
7877

@@ -96,7 +95,7 @@ TEST(UnitTestProjection, ScreenToWorldBottomLeftCorner)
9695
const auto world_cords = cam.screen_to_world<ScreenStart::BOTTOM_LEFT_CORNER>(initial_screen_cords);
9796
const auto screen_cords = cam.world_to_screen<ScreenStart::BOTTOM_LEFT_CORNER>(world_cords.value());
9897

99-
EXPECT_NEAR(screen_cords->x, initial_screen_cords.x, TEST_TOLERANCE_ROUNDTRIP);
100-
EXPECT_NEAR(screen_cords->y, initial_screen_cords.y, TEST_TOLERANCE_ROUNDTRIP);
98+
EXPECT_NEAR(screen_cords->x, initial_screen_cords.x, 0.001);
99+
EXPECT_NEAR(screen_cords->y, initial_screen_cords.y, 0.001);
101100
}
102101
}

tests/test_tolerance.hpp

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)