diff options
author | Oz Linden <oz@lindenlab.com> | 2014-06-16 11:42:37 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2014-06-16 11:42:37 -0400 |
commit | e15002a11cf5081e0697065cb017ba0af6c4b32d (patch) | |
tree | d60ac6d3a85d114b7860e42be5d9ff3338a6a169 /indra/test/lltut.h | |
parent | 78be5c3aa5f7263698bec5bcbccb24c150f78d09 (diff) | |
parent | 977476171ddcc057d7c28b6c14ae988b8189ed75 (diff) |
merge changes for 3.7.9-release
Diffstat (limited to 'indra/test/lltut.h')
-rwxr-xr-x | indra/test/lltut.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/indra/test/lltut.h b/indra/test/lltut.h index 55d84bcaca..243e869be7 100755 --- a/indra/test/lltut.h +++ b/indra/test/lltut.h @@ -65,6 +65,16 @@ namespace tut ensure_approximately_equals(NULL, actual, expected, frac_bits); } + inline void ensure_approximately_equals_range(const char *msg, F32 actual, F32 expected, F32 delta) + { + if (fabs(actual-expected)>delta) + { + std::stringstream ss; + ss << (msg?msg:"") << (msg?": ":"") << "not equal actual: " << actual << " expected: " << expected << " tolerance: " << delta; + throw tut::failure(ss.str().c_str()); + } + } + inline void ensure_memory_matches(const char* msg,const void* actual, U32 actual_len, const void* expected,U32 expected_len) { if((expected_len != actual_len) || |