aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/test/lltut.h
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/test/lltut.h')
-rw-r--r--linden/indra/test/lltut.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/linden/indra/test/lltut.h b/linden/indra/test/lltut.h
index e5c2419..4e4af73 100644
--- a/linden/indra/test/lltut.h
+++ b/linden/indra/test/lltut.h
@@ -44,6 +44,16 @@ class LLSD;
44 44
45namespace tut 45namespace tut
46{ 46{
47 inline void ensure_approximately_equals(const char* msg, F64 actual, F64 expected, U32 frac_bits)
48 {
49 if(!is_approx_equal_fraction(actual, expected, frac_bits))
50 {
51 std::stringstream ss;
52 ss << (msg?msg:"") << (msg?": ":"") << "not equal actual: " << actual << " expected: " << expected;
53 throw tut::failure(ss.str().c_str());
54 }
55 }
56
47 inline void ensure_approximately_equals(const char* msg, F32 actual, F32 expected, U32 frac_bits) 57 inline void ensure_approximately_equals(const char* msg, F32 actual, F32 expected, U32 frac_bits)
48 { 58 {
49 if(!is_approx_equal_fraction(actual, expected, frac_bits)) 59 if(!is_approx_equal_fraction(actual, expected, frac_bits))