summaryrefslogtreecommitdiff
path: root/indra/llcommon/tests/llerror_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcommon/tests/llerror_test.cpp')
-rw-r--r--indra/llcommon/tests/llerror_test.cpp25
1 files changed, 16 insertions, 9 deletions
diff --git a/indra/llcommon/tests/llerror_test.cpp b/indra/llcommon/tests/llerror_test.cpp
index 8e1f4c14ac..cdc2bf8c87 100644
--- a/indra/llcommon/tests/llerror_test.cpp
+++ b/indra/llcommon/tests/llerror_test.cpp
@@ -70,7 +70,11 @@ namespace
namespace
{
static bool fatalWasCalled;
- void fatalCall(const std::string&) { fatalWasCalled = true; }
+ LLError::ErrFatalHookResult fatalHook(const std::string&)
+ {
+ fatalWasCalled = true;
+ return LLError::ERR_DO_NOT_CRASH;
+ }
}
namespace tut
@@ -120,7 +124,7 @@ namespace tut
mPriorErrorSettings = LLError::saveAndResetSettings();
LLError::setDefaultLevel(LLError::LEVEL_DEBUG);
- LLError::setFatalFunction(fatalCall);
+ LLError::setFatalHook(fatalHook);
LLError::addRecorder(mRecorder);
}
@@ -777,30 +781,33 @@ namespace tut
// proper cached, efficient lookup of filtering
void ErrorTestObject::test<15>()
{
- LLError::setDefaultLevel(LLError::LEVEL_NONE);
+ LLError::setDefaultLevel(LLError::LEVEL_NONE);
+
+ // Note that the setFatalHook in the ErrorTestData constructor
+ // increments the shouldLogCallCount
TestAlpha::doInfo();
ensure_message_count(0);
- ensure_equals("first check", LLError::shouldLogCallCount(), 1);
+ ensure_equals("first check", LLError::shouldLogCallCount(), 2);
TestAlpha::doInfo();
ensure_message_count(0);
- ensure_equals("second check", LLError::shouldLogCallCount(), 1);
+ ensure_equals("second check", LLError::shouldLogCallCount(), 2);
LLError::setClassLevel("TestAlpha", LLError::LEVEL_DEBUG);
TestAlpha::doInfo();
ensure_message_count(1);
- ensure_equals("third check", LLError::shouldLogCallCount(), 2);
+ ensure_equals("third check", LLError::shouldLogCallCount(), 3);
TestAlpha::doInfo();
ensure_message_count(2);
- ensure_equals("fourth check", LLError::shouldLogCallCount(), 2);
+ ensure_equals("fourth check", LLError::shouldLogCallCount(), 3);
LLError::setClassLevel("TestAlpha", LLError::LEVEL_WARN);
TestAlpha::doInfo();
ensure_message_count(2);
- ensure_equals("fifth check", LLError::shouldLogCallCount(), 3);
+ ensure_equals("fifth check", LLError::shouldLogCallCount(), 4);
TestAlpha::doInfo();
ensure_message_count(2);
- ensure_equals("sixth check", LLError::shouldLogCallCount(), 3);
+ ensure_equals("sixth check", LLError::shouldLogCallCount(), 4);
}
template<> template<>