diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2009-12-03 14:57:20 -0800 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2009-12-03 14:57:20 -0800 |
commit | 3370a87ff5c6da41c4fad992efa4b3f1b4a9a462 (patch) | |
tree | c645d5ddde25a9c6b9bb49c244222085c304c4db /indra/llmessage | |
parent | 4535fd64fbee1ee0dd3bfe54c090cfa9c56a11b6 (diff) | |
parent | 3d463ec43ee87faa05281e1a62dee002b4ec6c61 (diff) |
Automated merge with ssh://hg.lindenlab.com/viewer/viewer-2-0/
Diffstat (limited to 'indra/llmessage')
-rw-r--r-- | indra/llmessage/tests/llsdmessage_test.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/indra/llmessage/tests/llsdmessage_test.cpp b/indra/llmessage/tests/llsdmessage_test.cpp index 9b018d685b..de2c7e00c8 100644 --- a/indra/llmessage/tests/llsdmessage_test.cpp +++ b/indra/llmessage/tests/llsdmessage_test.cpp @@ -21,6 +21,7 @@ #include <iostream> // std headers #include <stdexcept> +#include <typeinfo> // external library headers // other Linden headers #include "../test/lltut.h" @@ -63,6 +64,32 @@ namespace tut { threw = true; } + catch (const std::runtime_error& ex) + { + // This clause is because on Linux, on the viewer side, for this + // one test program (though not others!), the + // LLEventPump::DupPumpName exception isn't caught by the clause + // above. Warn the user... + std::cerr << "Failed to catch " << typeid(ex).name() << std::endl; + // But if the expected exception was thrown, allow the test to + // succeed anyway. Not sure how else to handle this odd case. + if (std::string(typeid(ex).name()) == typeid(LLEventPump::DupPumpName).name()) + { + threw = true; + } + else + { + // We don't even recognize this exception. Let it propagate + // out to TUT to fail the test. + throw; + } + } + catch (...) + { + std::cerr << "Utterly failed to catch expected exception!" << std::endl; + // This case is full of fail. We HAVE to address it. + throw; + } ensure("second LLSDMessage should throw", threw); } |