Skip to content

Commit

Permalink
Decrease tolerance for comparing results
Browse files Browse the repository at this point in the history
  • Loading branch information
adayton1 committed Apr 20, 2024
1 parent 83f0dac commit bdfa229
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/axom/primal/tests/primal_closest_point.cpp
Expand Up @@ -255,7 +255,7 @@ TEST(primal_closest_point, triangle_test_degenerate)
QPoint closestPoint = primal::closest_point(queryPoint, tri, &loc, EPS);

for (int i = 0; i < DIM; ++i) {
EXPECT_NEAR(closestPoint[i], queryPoint[i], 1.1e-14);
EXPECT_NEAR(closestPoint[i], queryPoint[i], 1.0e-16);
}

EXPECT_EQ(loc, -1);
Expand All @@ -266,7 +266,7 @@ TEST(primal_closest_point, triangle_test_degenerate)
QPoint expectedClosestPoint({0.0, 0.0, 1.0e-14});

for (int i = 0; i < DIM; ++i) {
EXPECT_NEAR(closestPoint[i], expectedClosestPoint[i], 1.1e-14);
EXPECT_NEAR(closestPoint[i], expectedClosestPoint[i], 1.0e-16);
}

EXPECT_EQ(loc, -1);
Expand All @@ -276,7 +276,7 @@ TEST(primal_closest_point, triangle_test_degenerate)
closestPoint = primal::closest_point(queryPoint, tri, &loc, EPS);

for (int i = 0; i < DIM; ++i) {
EXPECT_NEAR(closestPoint[i], queryPoint[i], 1.1e-14);
EXPECT_NEAR(closestPoint[i], queryPoint[i], 1.0e-16);
}

EXPECT_EQ(loc, -2);
Expand All @@ -287,7 +287,7 @@ TEST(primal_closest_point, triangle_test_degenerate)
expectedClosestPoint = QPoint({0.0, 0.5, 5.0e-14});

for (int i = 0; i < DIM; ++i) {
EXPECT_NEAR(closestPoint[i], expectedClosestPoint[i], 1.1e-14);
EXPECT_NEAR(closestPoint[i], expectedClosestPoint[i], 1.0e-16);
}

EXPECT_EQ(loc, -2);
Expand All @@ -297,7 +297,7 @@ TEST(primal_closest_point, triangle_test_degenerate)
closestPoint = primal::closest_point(queryPoint, tri, &loc, EPS);

for (int i = 0; i < DIM; ++i) {
EXPECT_NEAR(closestPoint[i], queryPoint[i], 1.1e-14);
EXPECT_NEAR(closestPoint[i], queryPoint[i], 1.0e-16);
}

EXPECT_EQ(loc, -3);
Expand All @@ -308,7 +308,7 @@ TEST(primal_closest_point, triangle_test_degenerate)
expectedClosestPoint = QPoint({0.0, 0.75, 0.0});

for (int i = 0; i < DIM; ++i) {
EXPECT_NEAR(closestPoint[i], expectedClosestPoint[i], 1.1e-14);
EXPECT_NEAR(closestPoint[i], expectedClosestPoint[i], 1.0e-16);
}

EXPECT_EQ(loc, -3);
Expand All @@ -318,7 +318,7 @@ TEST(primal_closest_point, triangle_test_degenerate)
closestPoint = primal::closest_point(queryPoint, tri, &loc, EPS);

for (int i = 0; i < DIM; ++i) {
EXPECT_NEAR(closestPoint[i], queryPoint[i], 1.1e-14);
EXPECT_NEAR(closestPoint[i], queryPoint[i], 1.0e-16);
}

EXPECT_EQ(loc, 3);
Expand All @@ -329,7 +329,7 @@ TEST(primal_closest_point, triangle_test_degenerate)
expectedClosestPoint = QPoint({0.0, 1.0/3.0, 1.0e-13/3.0});

for (int i = 0; i < DIM; ++i) {
EXPECT_NEAR(closestPoint[i], expectedClosestPoint[i], 1.1e-14);
EXPECT_NEAR(closestPoint[i], expectedClosestPoint[i], 1.0e-16);
}

EXPECT_EQ(loc, 3);
Expand Down

0 comments on commit bdfa229

Please sign in to comment.