llerror_tut.cpp File Reference

error unit tests More...

#include "linden_common.h"
#include "llerror.h"
#include <tut/tut.h>
#include "lltut.h"
#include <vector>
#include "llerrorcontrol.h"
#include "llsd.h"

Include dependency graph for llerror_tut.cpp:

Go to the source code of this file.

Namespaces

namespace  tut
namespace  Foo

Classes

struct  tut::ErrorTestData
class  TestAlpha
class  TestBeta

Typedefs

typedef std::vector< std::string > MessageVector
typedef test_group< ErrorTestData > tut::ErrorTestGroup
typedef ErrorTestGroup::object tut::ErrorTestObject
typedef std::string(*) LogFromFunction (bool)

Functions

void test_that_error_h_includes_enough_things_to_compile_a_message ()
void fatalCall (const std::string &)
ErrorTestGroup tut::errorTestGroup ("error")
void writeSome ()
std::string locationString (int line)
std::string writeReturningLocation ()
std::string writeReturningLocationAndFunction ()
std::string errorReturningLocation ()
std::string logFromGlobal (bool id)
static std::string logFromStatic (bool id)
std::string logFromAnon (bool id)
std::string Foo::logFromNamespace (bool id)
std::string logFromNamespace (bool id)
std::string logFromClassWithNoLogTypeMember (bool id)
std::string logFromClassWithNoLogTypeStatic (bool id)
std::string logFromClassWithLogTypeMember (bool id)
std::string logFromClassWithLogTypeStatic (bool id)
void ensure_has_once (const std::string &message, const std::string &actual, const std::string &expected)
void testLogNameOnce (TestRecorder &recorder, LogFromFunction f, const std::string &class_name="")
std::string innerLogger ()
std::string outerLogger ()
void uberLogger ()
std::ostream & operator<< (std::ostream &out, const LogWhileLogging &l)
void metaLogger ()
std::string roswell ()
void ufoSighting ()

Variables

static bool fatalWasCalled
MessageVector mMessages
bool mWantsTime


Detailed Description

error unit tests

Date:
December 2006
LicenseInfo
firstyear=2006&license=viewergpl

Copyright (c) 2006-2007, Linden Research, Inc.

Second Life Viewer Source Code The source code in this file ("Source Code") is provided by Linden Lab to you under the terms of the GNU General Public License, version 2.0 ("GPL"), unless you have obtained a separate licensing agreement ("Other License"), formally executed by you and Linden Lab. Terms of the GPL can be found in doc/GPL-license.txt in this distribution, or online at http://secondlife.com/developers/opensource/gplv2

There are special exceptions to the terms and conditions of the GPL as it is applied to this Source Code. View the full text of the exception in the file doc/FLOSS-exception.txt in this software distribution, or online at http://secondlife.com/developers/opensource/flossexception

By copying, modifying or distributing this software, you acknowledge that you have read and understood your obligations described above, and agree to abide by those obligations.

ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, COMPLETENESS OR PERFORMANCE. $/LicenseInfo$

Definition in file llerror_tut.cpp.


Typedef Documentation

typedef std::string(*) LogFromFunction(bool) [static]

Definition at line 394 of file llerror_tut.cpp.

typedef std::vector<std::string> MessageVector

Definition at line 85 of file llerror_tut.cpp.


Function Documentation

void @144::ensure_has_once ( const std::string &  message,
const std::string &  actual,
const std::string &  expected 
) [static]

Definition at line 375 of file llerror_tut.cpp.

Referenced by testLogNameOnce().

std::string @142::errorReturningLocation (  )  [static]

Definition at line 271 of file llerror_tut.cpp.

References llendl, llerrs, and locationString().

void @140::fatalCall ( const std::string &   )  [static]

Definition at line 55 of file llerror_tut.cpp.

Referenced by tut::ErrorTestData::ErrorTestData().

std::string @145::innerLogger (  )  [static]

Definition at line 440 of file llerror_tut.cpp.

References llendl, and llinfos.

Referenced by outerLogger(), and uberLogger().

std::string @142::locationString ( int  line  )  [static]

Definition at line 250 of file llerror_tut.cpp.

References LLError::abbreviateFile().

Referenced by errorReturningLocation(), LLURLDispatcherImpl::regionHandleCallback(), writeReturningLocation(), and writeReturningLocationAndFunction().

std::string @143::logFromAnon ( bool  id  )  [static]

Definition at line 320 of file llerror_tut.cpp.

References llendl, and llinfos.

std::string @144::logFromClassWithLogTypeMember ( bool  id  )  [static]

Definition at line 372 of file llerror_tut.cpp.

References c.

std::string @144::logFromClassWithLogTypeStatic ( bool  id  )  [static]

Definition at line 373 of file llerror_tut.cpp.

References logFromStatic().

std::string @144::logFromClassWithNoLogTypeMember ( bool  id  )  [static]

Definition at line 370 of file llerror_tut.cpp.

References c.

std::string @144::logFromClassWithNoLogTypeStatic ( bool  id  )  [static]

Definition at line 371 of file llerror_tut.cpp.

References logFromStatic().

std::string logFromGlobal ( bool  id  ) 

Definition at line 306 of file llerror_tut.cpp.

References llendl, and llinfos.

std::string @144::logFromNamespace ( bool  id  )  [static]

Definition at line 369 of file llerror_tut.cpp.

References Foo::logFromNamespace().

static std::string logFromStatic ( bool  id  )  [static]

Definition at line 312 of file llerror_tut.cpp.

References llendl, and llinfos.

Referenced by logFromClassWithLogTypeStatic(), and logFromClassWithNoLogTypeStatic().

void @145::metaLogger (  )  [static]

Definition at line 470 of file llerror_tut.cpp.

References llendl, and llinfos.

std::ostream& @145::operator<< ( std::ostream &  out,
const LogWhileLogging &  l 
) [static]

Definition at line 467 of file llerror_tut.cpp.

std::string @145::outerLogger (  )  [static]

Definition at line 446 of file llerror_tut.cpp.

References innerLogger(), llendl, and llinfos.

Referenced by uberLogger().

std::string @146::roswell (  )  [static]

Definition at line 519 of file llerror_tut.cpp.

void @139::test_that_error_h_includes_enough_things_to_compile_a_message (  )  [static]

Definition at line 38 of file llerror_tut.cpp.

References llendl, and llinfos.

void @144::testLogNameOnce ( TestRecorder &  recorder,
LogFromFunction  f,
const std::string &  class_name = "" 
) [static]

Definition at line 395 of file llerror_tut.cpp.

References ensure_has_once(), and f.

void @145::uberLogger (  )  [static]

Definition at line 452 of file llerror_tut.cpp.

References innerLogger(), llendl, llinfos, and outerLogger().

void @146::ufoSighting (  )  [static]

Definition at line 524 of file llerror_tut.cpp.

References llendl, and llinfos.

std::string @142::writeReturningLocation (  )  [static]

Definition at line 259 of file llerror_tut.cpp.

References llendl, llinfos, and locationString().

std::string @142::writeReturningLocationAndFunction (  )  [static]

Definition at line 265 of file llerror_tut.cpp.

References llendl, llinfos, and locationString().

void @141::writeSome (  )  [static]

Definition at line 156 of file llerror_tut.cpp.

References lldebugs, llendl, llerrs, llinfos, and llwarns.


Variable Documentation

bool fatalWasCalled [static]

Definition at line 54 of file llerror_tut.cpp.

MessageVector mMessages

Definition at line 86 of file llerror_tut.cpp.

bool mWantsTime

Definition at line 88 of file llerror_tut.cpp.


Generated on Thu Jul 1 06:10:12 2010 for Second Life Viewer by  doxygen 1.4.7