diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2010-03-08 13:50:44 -0500 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2010-03-08 13:50:44 -0500 |
commit | dcfc28890ba06c9bfad47b640dd93b106105e15a (patch) | |
tree | 753009d2005933ea1b5d8eed1482725b7e9ef92c /indra/newview/llexpandabletextbox.h | |
parent | 18687a365245122fd74829fc0b735931d2d7d0e0 (diff) |
Fix breaking indra/test/llpermissions_tut.cpp tests.
Certain tests of allowModifyBy(), allowCopyBy() and allowMoveBy() were
computing a bit-shifted S32 value and testing that the method return value
matched that specific bit. Whoever originally coded the test probably started
with allowModifyBy() == TRUE, but observed that it didn't work. Instead of
just testing for nonzero, in the spirit of BOOL, he then determined the
specific BOOL value (typedef for 'int') returned by each test so he could
still compare for equality. In other words, the tests were far too
knowledgeable about the method implementation. At some point these methods
were changed to return C++ standard 'bool' instead, so the internal
bit-masking operations got mapped to 'true' and 'false' anyway, making it
impossible for the original equality comparison to succeed. Fix tests
accordingly.
Use ensure_equals("msg", expr1, expr2) instead of ensure("msg", expr1 == expr2).
On failure, the former will report the actual mismatched values.
Remove other extraneous Microsoft-style "BOOL" usage (e.g. expr == TRUE).
Diffstat (limited to 'indra/newview/llexpandabletextbox.h')
0 files changed, 0 insertions, 0 deletions