#include "Config.h"
#include "Test.h"
#include "TestList.h"
#include "TestResults.h"
#include "AssertException.h"
#include "MemoryOutStream.h"
#include "ExecuteTest.h"
#include <cstdio>

#ifdef UNITTEST_POSIX
#include "Posix/SignalTranslator.h"
#endif

namespace UnitTest {

TestList& Test::GetTestList() {
	static TestList s_list;
	return s_list;
}

Test::Test ( char const* testName, char const* suiteName, char const* filename, int lineNumber )
		: m_details ( testName, suiteName, filename, lineNumber )
		, next ( 0 )
		, m_timeConstraintExempt ( false ) {
}

Test::~Test() {
}

void Test::Run() {
	// made more chatty; presumes the only used test reporter is
	// TestReporterStdout
	std::printf ( "running %s...\n", m_details.testName );

	ExecuteTest ( *this, m_details );
}

void Test::RunImpl() const {
}

}
