diff options
author | nat-goodspeed <nat@lindenlab.com> | 2024-06-04 14:53:57 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-04 14:53:57 -0400 |
commit | b0f5401adb755b305669b16d6589639f79721626 (patch) | |
tree | d38f28d6d45835a7889438bb1fe1035049d8bedb /indra/llmath/tests/mathmisc_test.cpp | |
parent | 316bc0bdf30514a0c6894ef7c2859e79bf02a546 (diff) | |
parent | 9e6cf32add0a857b4e28c638bd378a8d3f70fcdb (diff) |
Merge pull request #1555 from secondlife/lua-timers
Add timer support to the Lua viewer
Diffstat (limited to 'indra/llmath/tests/mathmisc_test.cpp')
-rw-r--r-- | indra/llmath/tests/mathmisc_test.cpp | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/indra/llmath/tests/mathmisc_test.cpp b/indra/llmath/tests/mathmisc_test.cpp index 163cf02350..5ffe1d6e4f 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; + } } } } |