summaryrefslogtreecommitdiff
path: root/indra/llmath
diff options
context:
space:
mode:
authornat-goodspeed <nat@lindenlab.com>2024-09-24 07:28:44 -0400
committerGitHub <noreply@github.com>2024-09-24 07:28:44 -0400
commit1175288a3c685310dbbf7fdd46d7deae0b0bf92d (patch)
tree84fd4d186169807c4da1c0c352d9be92f1e63227 /indra/llmath
parent0ee1106faccf90c883d8b9ffc522a341659742ed (diff)
parent9036e4582cec1893016bd692293ec1c0135f7112 (diff)
Merge pull request #2534 from secondlife/release/luau-scripting
Add Lua scripting to develop, behind feature flag
Diffstat (limited to 'indra/llmath')
-rw-r--r--indra/llmath/tests/mathmisc_test.cpp32
1 files changed, 26 insertions, 6 deletions
diff --git a/indra/llmath/tests/mathmisc_test.cpp b/indra/llmath/tests/mathmisc_test.cpp
index ff0899e975..2b23987616 100644
--- a/indra/llmath/tests/mathmisc_test.cpp
+++ b/indra/llmath/tests/mathmisc_test.cpp
@@ -709,14 +709,34 @@ namespace tut
first_plane,
second_plane);
- ensure("plane intersection should succeed", success);
+ try
+ {
+ ensure("plane intersection should succeed", success);
- F32 dot = fabs(known_intersection.getDirection() * measured_intersection.getDirection());
- ensure("measured intersection should be parallel to known intersection",
- dot > ALMOST_PARALLEL);
+ F32 dot = fabs(known_intersection.getDirection() * measured_intersection.getDirection());
+ ensure("measured intersection should be parallel to known intersection",
+ dot > ALMOST_PARALLEL);
- ensure("measured intersection should pass near known point",
- measured_intersection.intersects(some_point, LARGE_RADIUS * allowable_relative_error));
+ ensure("measured intersection should pass near known point",
+ measured_intersection.intersects(some_point, LARGE_RADIUS * allowable_relative_error));
+ }
+ catch (const failure&)
+ {
+ // If any of these assertions fail, since the values involved
+ // are randomly generated, unless we report them, we have no
+ // hope of diagnosing the problem.
+ LL_INFOS() << "some_point = " << some_point << '\n'
+ << "another_point = " << another_point << '\n'
+ << "known_intersection = " << known_intersection << '\n'
+ << "point_on_plane = " << point_on_plane << '\n'
+ << "plane_normal = " << plane_normal << '\n'
+ << "first_plane = " << first_plane << '\n'
+ << "point_on_different_plane = " << point_on_different_plane << '\n'
+ << "different_plane_normal = " << different_plane_normal << '\n'
+ << "second_plane = " << second_plane << '\n'
+ << "measured_intersection = " << measured_intersection << LL_ENDL;
+ throw;
+ }
}
}
}