summaryrefslogtreecommitdiffstats
path: root/Sencha-lang/Tests/TestSuite.cpp
diff options
context:
space:
mode:
authorJustyna Att Ilczuk <justyna.ilczuk@gmail.com>2012-11-04 13:18:26 +0100
committerJustyna Att Ilczuk <justyna.ilczuk@gmail.com>2012-11-04 13:18:26 +0100
commit924f957a7e05a838bf4053f6f95455069f776543 (patch)
treeb3c90e2ac37ce2f2fa654718c576756f8c11ed2f /Sencha-lang/Tests/TestSuite.cpp
parente8018808e184818ccb1e99593d674d79ceaac2e6 (diff)
downloadsencha-lang-924f957a7e05a838bf4053f6f95455069f776543.tar.gz
sencha-lang-924f957a7e05a838bf4053f6f95455069f776543.tar.bz2
sencha-lang-924f957a7e05a838bf4053f6f95455069f776543.tar.xz
sencha-lang-924f957a7e05a838bf4053f6f95455069f776543.zip
Test framework - strongly modified by myself... some (actually little) tests.
Diffstat (limited to 'Sencha-lang/Tests/TestSuite.cpp')
-rw-r--r--Sencha-lang/Tests/TestSuite.cpp45
1 files changed, 45 insertions, 0 deletions
diff --git a/Sencha-lang/Tests/TestSuite.cpp b/Sencha-lang/Tests/TestSuite.cpp
new file mode 100644
index 0000000..81a0f27
--- /dev/null
+++ b/Sencha-lang/Tests/TestSuite.cpp
@@ -0,0 +1,45 @@
+/*
+ * TestSuite.cpp
+ *
+ * Created on: Nov 4, 2012
+ * Author: attero
+ */
+
+#include "TestSuite.h"
+
+
+TestSuite::TestSuite() {
+ // TODO Auto-generated constructor stub
+ 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;
+}