gcc/linux compile/tests

This commit is contained in:
Aleksandar Fabijanic
2012-09-30 13:10:51 +00:00
parent f70ac1ca07
commit 8f747fabdc
5 changed files with 80 additions and 60 deletions

View File

@@ -11,6 +11,7 @@
#include "CppUnit/TestResult.h"
#include "CppUnit/estring.h"
#include <typeinfo>
#include <iostream>
using namespace std;
@@ -94,12 +95,18 @@ void TestCase::assertNull(const void* pointer, const std::string& pointerExpress
}
void TestCase::fail (const std::string& message, long lineNumber, const std::string& fileName)
void TestCase::fail(const std::string& message, long lineNumber, const std::string& fileName)
{
throw CppUnitException(std::string("fail: ") + message, lineNumber, fileName);
}
void TestCase::warn(const std::string& message, long lineNumber, const std::string& fileName)
{
std::cout << "Warning [" << fileName << ':' << lineNumber << "]: " << message << std::endl;
}
// Run the test and catch any exceptions that are triggered by it
void TestCase::run(TestResult *result)
{