diff options
author | Jacek Antonelli | 2008-08-15 23:45:42 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:42 -0500 |
commit | ce28e056c20bf2723f565bbf464b87781ec248a2 (patch) | |
tree | ef7b0501c4de4b631a916305cbc2a5fdc125e52d /linden/indra/test/lltut.h | |
parent | Second Life viewer sources 1.19.1.4b (diff) | |
download | meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.zip meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.gz meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.bz2 meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.xz |
Second Life viewer sources 1.20.2
Diffstat (limited to '')
-rw-r--r-- | linden/indra/test/lltut.h | 10 |
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 | ||
45 | namespace tut | 45 | namespace 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)) |