diff options
author | Merov Linden <merov@lindenlab.com> | 2014-05-30 15:29:27 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2014-05-30 15:29:27 -0700 |
commit | c780f730fed7ed90bf7228fd42e9ea46b8bce1cc (patch) | |
tree | 9a617520758cc01fcf0792a8bde24f3fee3e8612 /indra/test/lltut.h | |
parent | 68b62747edb7073dd3f4975e2b38388ae80d801c (diff) | |
parent | 4885c122eaf1b4e304ce598f308d806322efacfc (diff) |
DD-92 : pull merge lindenlab/sunshine-external to get AISv3 work
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) || |