summaryrefslogtreecommitdiffstats
path: root/Sencha-lang/Tests/TestSuite.cpp
blob: 3c37b25c1b95825b1dba851ee173c8a47eb6e81f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
 * TestSuite.cpp
 *
 *  Created on: Nov 4, 2012
 *      Author: attero
 */

#include "TestSuite.h"


TestSuite::TestSuite() {
	tests_passed = 0;
	tests_failed = 0;
	tests = 0;

}


TestSuite::~TestSuite() {
	//Do nothing
}

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;
}