summaryrefslogtreecommitdiff
path: root/indra/test/test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/test/test.cpp')
-rw-r--r--indra/test/test.cpp22
1 files changed, 8 insertions, 14 deletions
diff --git a/indra/test/test.cpp b/indra/test/test.cpp
index b14c2eb255..9d327ff3be 100644
--- a/indra/test/test.cpp
+++ b/indra/test/test.cpp
@@ -57,16 +57,11 @@
#include <gtest/gtest.h>
#endif
-#if LL_MSVC
-#pragma warning (push)
+#if LL_WINDOWS
#pragma warning (disable : 4702) // warning C4702: unreachable code
#endif
#include <boost/iostreams/tee.hpp>
#include <boost/iostreams/stream.hpp>
-#if LL_MSVC
-#pragma warning (pop)
-#endif
-
#include <boost/scoped_ptr.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/make_shared.hpp>
@@ -75,7 +70,11 @@
#include <fstream>
-void wouldHaveCrashed(const std::string& message);
+LLError::ErrFatalHookResult wouldHaveCrashed(const std::string& message)
+{
+ tut::fail("fatal error message: " + message);
+ return LLError::ERR_DO_NOT_CRASH;
+}
namespace tut
{
@@ -146,7 +145,7 @@ public:
mOldSettings(LLError::saveAndResetSettings()),
mRecorder(new RecordToTempFile(pool))
{
- LLError::setFatalFunction(wouldHaveCrashed);
+ LLError::setFatalHook(wouldHaveCrashed);
LLError::setDefaultLevel(level);
LLError::addRecorder(mRecorder);
}
@@ -506,11 +505,6 @@ void stream_groups(std::ostream& s, const char* app)
}
}
-void wouldHaveCrashed(const std::string& message)
-{
- tut::fail("llerrs message: " + message);
-}
-
static LLTrace::ThreadRecorder* sMasterThreadRecorder = NULL;
int main(int argc, char **argv)
@@ -532,7 +526,7 @@ int main(int argc, char **argv)
LLError::initForApplication(".", ".", false /* do not log to stderr */);
LLError::setDefaultLevel(LLError::LEVEL_DEBUG);
}
- LLError::setFatalFunction(wouldHaveCrashed);
+ LLError::setFatalHook(wouldHaveCrashed);
std::string test_app_name(argv[0]);
std::string test_log = test_app_name + ".log";
LLFile::remove(test_log);