summaryrefslogtreecommitdiff
path: root/indra/llcommon/tests/llleap_test.cpp
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2019-11-27 22:58:52 +0200
committerAndreyL ProductEngine <alihatskiy@productengine.com>2019-11-27 22:58:52 +0200
commitbc496f5f17a446af27b47cbe227e7e85089bab8d (patch)
treeb7c90fee48d1f48e21c5f62fe84abaca16f8bb81 /indra/llcommon/tests/llleap_test.cpp
parent91c311dd7beb8d723a00efac8e61019eeb8af17b (diff)
parentf89c9e9b20a13acd8f6af76699259cab4c74d5db (diff)
Downstream merge from lindenlab/viewer-lynx
Diffstat (limited to 'indra/llcommon/tests/llleap_test.cpp')
-rw-r--r--indra/llcommon/tests/llleap_test.cpp20
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);