General refactoring of beast framework classes

This commit is contained in:
Vinnie Falco
2013-09-12 08:26:25 -07:00
parent 84ef06e35c
commit 02acf7d6d0
26 changed files with 514 additions and 306 deletions

View File

@@ -296,19 +296,65 @@ String commandLineToString (const String& commandLine)
//------------------------------------------------------------------------------
// A simple unit test to determine the diagnostic settings in a build.
//
class DebugTests : public UnitTest
{
public:
DebugTests () : UnitTest ("Debug", "beast", runManual)
static int envDebug ()
{
#ifdef _DEBUG
return 1;
#else
return 0;
#endif
}
static int beastDebug ()
{
#ifdef BEAST_DEBUG
return BEAST_DEBUG;
#else
return 0;
#endif
}
static int beastForceDebug ()
{
#ifdef BEAST_FORCE_DEBUG
return BEAST_FORCE_DEBUG;
#else
return 0;
#endif
}
static int beastCatchExceptions ()
{
#ifdef BEAST_CATCH_UNHANDLED_EXCEPTIONS
return BEAST_CATCH_UNHANDLED_EXCEPTIONS;
#else
return 0;
#endif
}
void runTest ()
{
beginTestCase ("bassert");
beginTestCase ("diagnostics");
logMessage ("operatingSystemName = '" + SystemStats::getOperatingSystemName () + "'");
logMessage ("_DEBUG = " + String::fromNumber (envDebug ()));
logMessage ("BEAST_DEBUG = " + String::fromNumber (beastDebug ()));
logMessage ("BEAST_FORCE_DEBUG = " + String::fromNumber (beastForceDebug ()));
logMessage ("BEAST_CATCH_UNHANDLED_EXCEPTIONS = " + String::fromNumber (beastCatchExceptions ()));
bassertfalse;
fail ();
}
DebugTests () : UnitTest ("Debug", "beast", runManual)
{
}
};
static DebugTests debugTests;