sencha-lang/Sencha-lang/Tests/TestSuite.cpp

45 lines
797 B
C++

/*
* TestSuite.cpp
*
* Created on: Nov 4, 2012
* Author: attero
*/
#include "TestSuite.h"
TestSuite::TestSuite() {
tests_passed = 0;
tests_failed = 0;
tests = 0;
}
TestSuite::~TestSuite() {
// TODO Auto-generated destructor stub
}
std::string TestSuite::all_tests()
{
return "";
}
void TestSuite::run_tests()
{
std::string result = all_tests();
if(result != "")
{
std::cout << "\x1b[00;31mSOME TESTS DIDN\'T PASS\x1b[00;00m" << std::endl; //Sets color to red
std::cout << result << std::endl;
}
else
{
std::cout << "\x1b[00;32mALL TESTS PASSED\x1b[00;00m\n" << std::endl; //Sets color to green
}
std::cout << tests_passed << " TESTS PASSED\n";
std::cout << tests_failed << " TESTS FAILED\n";
std::cout << "ALL TESTS: " << tests << std::endl;
}