summaryrefslogtreecommitdiffstats
path: root/Sencha-lang/Tests/TestSuite.cpp
blob: a23181d72db1fe1f6ae1a99394b7489a4ae15019 (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
/*
 * 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
}


void TestSuite::run_tests()
{
	std::string result = all_tests();
		if(result != "")
		{
			std::cout << "\n\x1b[00;31mSOME TESTS DIDN\'T PASS\x1b[00;00m" << std::endl; //Sets color to red

			std::cout << result << std::endl;
		}
		else
		{
			std::cout << "\n\x1b[00;32mALL TESTS PASSED\x1b[00;00m" << 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 <<  std::endl;
}