No longer include llerrorlegacy.h. Updated llstl to include deletion utilites.

This commit is contained in:
Shyotl
2015-06-19 03:54:20 -05:00
parent 283f5298d5
commit 1c627317ec
634 changed files with 8200 additions and 12214 deletions

View File

@@ -342,7 +342,7 @@ namespace tut
/*
if(actual != expected)
{
llwarns << "iteration " << i << llendl;
LL_WARNS() << "iteration " << i << LL_ENDL;
std::ostringstream e_str;
std::string::iterator iter = expected.begin();
std::string::iterator end = expected.end();
@@ -352,8 +352,8 @@ namespace tut
}
e_str << std::endl;
llsd_serialize_string(e_str, expected);
llwarns << "expected size: " << expected.size() << llendl;
llwarns << "expected: " << e_str.str() << llendl;
LL_WARNS() << "expected size: " << expected.size() << LL_ENDL;
LL_WARNS() << "expected: " << e_str.str() << LL_ENDL;
std::ostringstream a_str;
iter = actual.begin();
@@ -364,8 +364,8 @@ namespace tut
}
a_str << std::endl;
llsd_serialize_string(a_str, actual);
llwarns << "actual size: " << actual.size() << llendl;
llwarns << "actual: " << a_str.str() << llendl;
LL_WARNS() << "actual size: " << actual.size() << LL_ENDL;
LL_WARNS() << "actual: " << a_str.str() << LL_ENDL;
}
*/
ensure_equals("string value", actual, expected);

View File

@@ -156,7 +156,7 @@ namespace tut
{
LLPointer<LLInventoryItem> src = create_random_inventory_item();
LLSD sd = ll_create_sd_from_inventory_item(src);
//llinfos << "sd: " << *sd << llendl;
//LL_INFOS() << "sd: " << *sd << LL_ENDL;
LLPointer<LLInventoryItem> dst = ll_create_item_from_sd(sd);
ensure_equals("1.item id::getUUID() failed", dst->getUUID(), src->getUUID());
ensure_equals("2.parent::getParentUUID() failed", dst->getParentUUID(), src->getParentUUID());
@@ -220,7 +220,7 @@ namespace tut
src->setCreationDate(new_creation);
sd = ll_create_sd_from_inventory_item(src);
//llinfos << "sd: " << *sd << llendl;
//LL_INFOS() << "sd: " << *sd << LL_ENDL;
dst = ll_create_item_from_sd(sd);
ensure_equals("13.item id::getUUID() failed", dst->getUUID(), src->getUUID());
ensure_equals("14.parent::getParentUUID() failed", dst->getParentUUID(), src->getParentUUID());
@@ -338,7 +338,7 @@ namespace tut
LLFILE* fp = LLFile::fopen("linden_file.dat","w+");
if(!fp)
{
llerrs << "file could not be opened\n" << llendl;
LL_ERRS() << "file could not be opened\n" << LL_ENDL;
return;
}
@@ -350,7 +350,7 @@ namespace tut
fp = LLFile::fopen("linden_file.dat","r+");
if(!fp)
{
llerrs << "file could not be opened\n" << llendl;
LL_ERRS() << "file could not be opened\n" << LL_ENDL;
return;
}
@@ -491,7 +491,7 @@ namespace tut
LLFILE* fp = LLFile::fopen("linden_file.dat","w");
if(!fp)
{
llerrs << "file coudnt be opened\n" << llendl;
LL_ERRS() << "file coudnt be opened\n" << LL_ENDL;
return;
}
@@ -503,7 +503,7 @@ namespace tut
fp = LLFile::fopen("linden_file.dat","r");
if(!fp)
{
llerrs << "file coudnt be opened\n" << llendl;
LL_ERRS() << "file coudnt be opened\n" << LL_ENDL;
return;
}

View File

@@ -71,14 +71,14 @@ namespace tut
}
if (!fp)
{
llwarns << "unabled to open " << filename << llendl;
LL_WARNS() << "unabled to open " << filename << LL_ENDL;
return false;
}
std::string good;
good.resize(256);
size_t got = fread(&good[0], 1, 256, fp);
lldebugs << "matchFile read " << got << llendl;
LL_DEBUGS() << "matchFile read " << got << LL_ENDL;
fclose(fp);
good.resize(got);

View File

@@ -355,7 +355,7 @@ namespace tut
LLFILE* fp = LLFile::fopen(TEST_FILE_NAME, "w+");
if(!fp)
{
llerrs << "File couldnt be open" <<llendl;
LL_ERRS() << "File couldnt be open" <<LL_ENDL;
return;
}
@@ -410,7 +410,7 @@ namespace tut
LLFILE* fp = LLFile::fopen(TEST_FILE_NAME,"w+");
if(!fp)
{
llerrs << "File couldnt be open" <<llendl;
LL_ERRS() << "File couldnt be open" <<LL_ENDL;
return;
}

View File

@@ -38,7 +38,7 @@ namespace
{
void test_that_error_h_includes_enough_things_to_compile_a_message()
{
llinfos << "!" << llendl;
LL_INFOS() << "!" << LL_ENDL;
}
}
@@ -144,8 +144,8 @@ namespace tut
void ErrorTestObject::test<1>()
// basic test of output
{
llinfos << "test" << llendl;
llinfos << "bob" << llendl;
LL_INFOS() << "test" << LL_ENDL;
LL_INFOS() << "bob" << LL_ENDL;
ensure_message_contains(0, "test");
ensure_message_contains(1, "bob");
@@ -156,10 +156,10 @@ namespace
{
void writeSome()
{
lldebugs << "one" << llendl;
llinfos << "two" << llendl;
llwarns << "three" << llendl;
llerrs << "four" << llendl;
LL_DEBUGS() << "one" << LL_ENDL;
LL_INFOS() << "two" << LL_ENDL;
LL_WARNS() << "three" << LL_ENDL;
LL_ERRS() << "four" << LL_ENDL;
// fatal messages write out and addtional "error" message
}
};
@@ -259,19 +259,19 @@ namespace
std::string writeReturningLocation()
{
llinfos << "apple" << llendl; int this_line = __LINE__;
LL_INFOS() << "apple" << LL_ENDL; int this_line = __LINE__;
return locationString(this_line);
}
std::string writeReturningLocationAndFunction()
{
llinfos << "apple" << llendl; int this_line = __LINE__;
LL_INFOS() << "apple" << LL_ENDL; int this_line = __LINE__;
return locationString(this_line) + __FUNCTION__;
}
std::string errorReturningLocation()
{
llerrs << "die" << llendl; int this_line = __LINE__;
LL_ERRS() << "die" << LL_ENDL; int this_line = __LINE__;
return locationString(this_line);
}
}
@@ -306,13 +306,13 @@ namespace tut
std::string logFromGlobal(bool id)
{
llinfos << (id ? "logFromGlobal: " : "") << "hi" << llendl;
LL_INFOS() << (id ? "logFromGlobal: " : "") << "hi" << LL_ENDL;
return "logFromGlobal";
}
static std::string logFromStatic(bool id)
{
llinfos << (id ? "logFromStatic: " : "") << "hi" << llendl;
LL_INFOS() << (id ? "logFromStatic: " : "") << "hi" << LL_ENDL;
return "logFromStatic";
}
@@ -320,7 +320,7 @@ namespace
{
std::string logFromAnon(bool id)
{
llinfos << (id ? "logFromAnon: " : "") << "hi" << llendl;
LL_INFOS() << (id ? "logFromAnon: " : "") << "hi" << LL_ENDL;
return "logFromAnon";
}
}
@@ -328,7 +328,7 @@ namespace
namespace Foo {
std::string logFromNamespace(bool id)
{
llinfos << (id ? "Foo::logFromNamespace: " : "") << "hi" << llendl;
LL_INFOS() << (id ? "Foo::logFromNamespace: " : "") << "hi" << LL_ENDL;
//return "Foo::logFromNamespace";
// there is no standard way to get the namespace name, hence
// we won't be testing for it
@@ -342,12 +342,12 @@ namespace
public:
std::string logFromMember(bool id)
{
llinfos << (id ? "ClassWithNoLogType::logFromMember: " : "") << "hi" << llendl;
LL_INFOS() << (id ? "ClassWithNoLogType::logFromMember: " : "") << "hi" << LL_ENDL;
return "ClassWithNoLogType::logFromMember";
}
static std::string logFromStatic(bool id)
{
llinfos << (id ? "ClassWithNoLogType::logFromStatic: " : "") << "hi" << llendl;
LL_INFOS() << (id ? "ClassWithNoLogType::logFromStatic: " : "") << "hi" << LL_ENDL;
return "ClassWithNoLogType::logFromStatic";
}
};
@@ -357,12 +357,12 @@ namespace
public:
std::string logFromMember(bool id)
{
llinfos << (id ? "ClassWithLogType::logFromMember: " : "") << "hi" << llendl;
LL_INFOS() << (id ? "ClassWithLogType::logFromMember: " : "") << "hi" << LL_ENDL;
return "ClassWithLogType::logFromMember";
}
static std::string logFromStatic(bool id)
{
llinfos << (id ? "ClassWithLogType::logFromStatic: " : "") << "hi" << llendl;
LL_INFOS() << (id ? "ClassWithLogType::logFromStatic: " : "") << "hi" << LL_ENDL;
return "ClassWithLogType::logFromStatic";
}
};
@@ -434,19 +434,19 @@ namespace
{
std::string innerLogger()
{
llinfos << "inside" << llendl;
LL_INFOS() << "inside" << LL_ENDL;
return "moo";
}
std::string outerLogger()
{
llinfos << "outside(" << innerLogger() << ")" << llendl;
LL_INFOS() << "outside(" << innerLogger() << ")" << LL_ENDL;
return "bar";
}
void uberLogger()
{
llinfos << "uber(" << outerLogger() << "," << innerLogger() << ")" << llendl;
LL_INFOS() << "uber(" << outerLogger() << "," << innerLogger() << ")" << LL_ENDL;
}
class LogWhileLogging
@@ -454,7 +454,7 @@ namespace
public:
void print(std::ostream& out) const
{
llinfos << "logging" << llendl;
LL_INFOS() << "logging" << LL_ENDL;
out << "baz";
}
};
@@ -465,7 +465,7 @@ namespace
void metaLogger()
{
LogWhileLogging l;
llinfos << "meta(" << l << ")" << llendl;
LL_INFOS() << "meta(" << l << ")" << LL_ENDL;
}
}
@@ -518,7 +518,7 @@ namespace
void ufoSighting()
{
llinfos << "ufo" << llendl;
LL_INFOS() << "ufo" << LL_ENDL;
}
}
@@ -562,7 +562,7 @@ namespace tut
TestRecorder altRecorder;
LLError::addRecorder(&altRecorder);
llinfos << "boo" << llendl;
LL_INFOS() << "boo" << LL_ENDL;
ensure_message_contains(0, "boo");
ensure_equals("alt recorder count", altRecorder.countMessages(), 1);
@@ -574,7 +574,7 @@ namespace tut
anotherRecorder.setWantsTime(true);
LLError::addRecorder(&anotherRecorder);
llinfos << "baz" << llendl;
LL_INFOS() << "baz" << LL_ENDL;
std::string when = roswell();
@@ -590,10 +590,10 @@ class TestAlpha
{
LOG_CLASS(TestAlpha);
public:
static void doDebug() { lldebugs << "add dice" << llendl; }
static void doInfo() { llinfos << "any idea" << llendl; }
static void doWarn() { llwarns << "aim west" << llendl; }
static void doError() { llerrs << "ate eels" << llendl; }
static void doDebug() { LL_DEBUGS() << "add dice" << LL_ENDL; }
static void doInfo() { llinfos << "any idea" << LL_ENDL; }
static void doWarn() { llwarns << "aim west" << LL_ENDL; }
static void doError() { llerrs << "ate eels" << LL_ENDL; }
static void doAll() { doDebug(); doInfo(); doWarn(); doError(); }
};
@@ -601,10 +601,10 @@ class TestBeta
{
LOG_CLASS(TestBeta);
public:
static void doDebug() { lldebugs << "bed down" << llendl; }
static void doInfo() { llinfos << "buy iron" << llendl; }
static void doWarn() { llwarns << "bad word" << llendl; }
static void doError() { llerrs << "big easy" << llendl; }
static void doDebug() { LL_DEBUGS() << "bed down" << LL_ENDL; }
static void doInfo() { llinfos << "buy iron" << LL_ENDL; }
static void doWarn() { llwarns << "bad word" << LL_ENDL; }
static void doError() { llerrs << "big easy" << LL_ENDL; }
static void doAll() { doDebug(); doInfo(); doWarn(); doError(); }
};

View File

@@ -322,8 +322,8 @@ namespace tut
stream << "<integer>42</integer>";
}
stream << "</array></llsd>";
llinfos << "HTTPServiceTestObject::test<7>"
<< stream.str().length() << llendl;
LL_INFOS() << "HTTPServiceTestObject::test<7>"
<< stream.str().length() << LL_ENDL;
std::string result = httpPOST("web/echo", stream.str());
ensure_starts_with("large echo status", result, "HTTP/1.0 200 OK\r\n");
}

View File

@@ -86,8 +86,8 @@ namespace tut
headers["Content-Length"] = MULTI_CONTENT_LENGTH;
headers["Content-Type"] = MULTI_CONTENT_TYPE;
LLMimeIndex mime(headers, MULTI_CONTENT_OFFSET);
llinfos << "headers: " << LLSDOStreamer<LLSDNotationFormatter>(headers)
<< llendl;
LL_INFOS() << "headers: " << LLSDOStreamer<LLSDNotationFormatter>(headers)
<< LL_ENDL;
const S32 META_CONTENT_LENGTH = 700;

View File

@@ -425,7 +425,7 @@ namespace tut
LLFILE* fp = LLFile::fopen("linden_file.dat","w+");
if(!fp)
{
llerrs << "file coudnt be opened\n" << llendl;
LL_ERRS() << "file coudnt be opened\n" << LL_ENDL;
return;
}
LLPermissions perm,perm1;
@@ -448,7 +448,7 @@ namespace tut
fp = LLFile::fopen("linden_file.dat","r+");
if(!fp)
{
llerrs << "file coudnt be opened\n" << llendl;
LL_ERRS() << "file coudnt be opened\n" << LL_ENDL;
return;
}
perm1.importFile(fp);

View File

@@ -176,13 +176,13 @@ LLIOPipe::EStatus LLIOSleeper::process_impl(
{
if(!mRespond)
{
lldebugs << "LLIOSleeper::process_impl() sleeping." << llendl;
LL_DEBUGS() << "LLIOSleeper::process_impl() sleeping." << LL_ENDL;
mRespond = true;
static const F64 SLEEP_TIME = 2.0;
pump->sleepChain(SLEEP_TIME);
return STATUS_BREAK;
}
lldebugs << "LLIOSleeper::process_impl() responding." << llendl;
LL_DEBUGS() << "LLIOSleeper::process_impl() responding." << LL_ENDL;
LLBufferStream ostr(channels, buffer.get());
ostr << "huh? sorry, I was sleeping." << std::endl;
return STATUS_DONE;

View File

@@ -117,7 +117,7 @@ namespace tut
LLFILE* fp = LLFile::fopen("linden_file.dat","w+");
if(!fp)
{
llerrs << "file could not be opened\n" << llendl;
LL_ERRS() << "file could not be opened\n" << LL_ENDL;
return;
}
@@ -134,7 +134,7 @@ namespace tut
if(!fp)
{
llerrs << "file coudnt be opened\n" << llendl;
LL_ERRS() << "file coudnt be opened\n" << LL_ENDL;
return;
}

View File

@@ -236,7 +236,7 @@ namespace tut
{
std::stringstream stream;
mFormatter->format(v, stream);
//llinfos << "checkRoundTrip: length " << stream.str().length() << llendl;
//LL_INFOS() << "checkRoundTrip: length " << stream.str().length() << LL_ENDL;
LLSD w;
mParser->reset(); // reset() call is needed since test code re-uses mParser
mParser->parse(stream, w, stream.str().size());