aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/test/lltut.h
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:56 -0500
committerJacek Antonelli2008-08-15 23:44:56 -0500
commitc07901e29ed545bbb02e3bddf148fe1104b94e9f (patch)
treef1ada64ce834acd7d92a425efb96c4b86bcf16b1 /linden/indra/test/lltut.h
parentSecond Life viewer sources 1.15.0.2 (diff)
downloadmeta-impy-c07901e29ed545bbb02e3bddf148fe1104b94e9f.zip
meta-impy-c07901e29ed545bbb02e3bddf148fe1104b94e9f.tar.gz
meta-impy-c07901e29ed545bbb02e3bddf148fe1104b94e9f.tar.bz2
meta-impy-c07901e29ed545bbb02e3bddf148fe1104b94e9f.tar.xz
Second Life viewer sources 1.15.1.3
Diffstat (limited to 'linden/indra/test/lltut.h')
-rw-r--r--linden/indra/test/lltut.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/linden/indra/test/lltut.h b/linden/indra/test/lltut.h
index 3e43df8..626ff60 100644
--- a/linden/indra/test/lltut.h
+++ b/linden/indra/test/lltut.h
@@ -41,11 +41,27 @@
41 41
42#include "lldate.h" 42#include "lldate.h"
43#include "lluri.h" 43#include "lluri.h"
44#include "llmath.h"
44 45
45class LLSD; 46class LLSD;
46 47
47namespace tut 48namespace tut
48{ 49{
50 inline void ensure_approximately_equals(const char* msg, F32 actual, F32 expected, U32 frac_bits)
51 {
52 if(!is_approx_equal_fraction(actual, expected, frac_bits))
53 {
54 std::stringstream ss;
55 ss << (msg?msg:"") << (msg?": ":"") << "not equal actual: " << actual << " expected: " << expected;
56 throw tut::failure(ss.str().c_str());
57 }
58 }
59
60 inline void ensure_approximately_equals(F32 actual, F32 expected, U32 frac_bits)
61 {
62 ensure_approximately_equals(NULL, actual, expected, frac_bits);
63 }
64
49 inline void ensure_memory_matches(const char* msg,const void* actual, U32 actual_len, const void* expected,U32 expected_len) 65 inline void ensure_memory_matches(const char* msg,const void* actual, U32 actual_len, const void* expected,U32 expected_len)
50 { 66 {
51 if((expected_len != actual_len) || 67 if((expected_len != actual_len) ||