diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2020-02-03 15:18:34 +0200 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2020-02-03 15:18:34 +0200 |
commit | e0727702ea00c975361cf94b4d2903a9fec6f6f8 (patch) | |
tree | d64f1cf4ebf58a08fb7fc197206ce31fab2aa115 /indra/llcommon/tests/llleap_test.cpp | |
parent | c5195905b8c9b30a2b3aab652aa9828e9825c42f (diff) | |
parent | e58b5263598368b6dec4a836c72c69b50d701911 (diff) |
Merge branch 'DRTVWR-501' into trunk
Diffstat (limited to 'indra/llcommon/tests/llleap_test.cpp')
-rw-r--r-- | indra/llcommon/tests/llleap_test.cpp | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/indra/llcommon/tests/llleap_test.cpp b/indra/llcommon/tests/llleap_test.cpp index 45648536c4..bf0a74d10d 100644 --- a/indra/llcommon/tests/llleap_test.cpp +++ b/indra/llcommon/tests/llleap_test.cpp @@ -23,7 +23,7 @@ #include "../test/lltut.h" #include "../test/namedtempfile.h" #include "../test/catch_and_store_what_in.h" -#include "wrapllerrs.h" +#include "wrapllerrs.h" // CaptureLog #include "llevents.h" #include "llprocess.h" #include "llstring.h" @@ -290,12 +290,9 @@ namespace tut void object::test<6>() { set_test_name("empty plugin vector"); - std::string threw; - try - { - LLLeap::create("empty", StringVec()); - } - CATCH_AND_STORE_WHAT_IN(threw, LLLeap::Error) + std::string threw = catch_what<LLLeap::Error>([](){ + LLLeap::create("empty", StringVec()); + }); ensure_contains("LLLeap::Error", threw, "no plugin"); // try the suppress-exception variant ensure("bad launch returned non-NULL", ! LLLeap::create("empty", StringVec(), false)); @@ -308,12 +305,9 @@ namespace tut // Synthesize bogus executable name std::string BADPYTHON(PYTHON.substr(0, PYTHON.length()-1) + "x"); CaptureLog log; - std::string threw; - try - { - LLLeap::create("bad exe", BADPYTHON); - } - CATCH_AND_STORE_WHAT_IN(threw, LLLeap::Error) + std::string threw = catch_what<LLLeap::Error>([&BADPYTHON](){ + LLLeap::create("bad exe", BADPYTHON); + }); ensure_contains("LLLeap::create() didn't throw", threw, "failed"); log.messageWith("failed"); log.messageWith(BADPYTHON); |