Compare commits

..

No commits in common. "c4b9bd835904fb08b1d4c5d0cd38a0c982fce43e" and "61c898f47fec7278c75348d628d2e3cc71105a03" have entirely different histories.

2 changed files with 5 additions and 17 deletions

View file

@ -46,10 +46,10 @@ public:
test(); test();
} }
std::cout << "_________________________[TEST RESULTS]_________________________\n"; std::cout << "_________________________[TEST RESULTS]_________________________";
std::cout << "Ran " << instance().m_failed_count + instance().m_pasesed_count << " tests:\n" std::cout << "Ran " << instance().m_failed_count + instance().m_pasesed_count << " tests:\n"
<< "\tpassed: " << instance().m_pasesed_count << '\n' << "Passed: " << instance().m_pasesed_count << '\n'
<< "\tfailed: " << instance().m_failed_count << '\n'; << "Failed: " << instance().m_failed_count << '\n';
return instance().m_failed_count; return instance().m_failed_count;
} }
@ -100,7 +100,6 @@ struct Case
return; // TODO(Light): Should we run the remaining tests after a failure? return; // TODO(Light): Should we run the remaining tests after a failure?
} }
details::Registry::increment_passed_count();
std::cout << " --> SUCCESS :D" << "\n"; std::cout << " --> SUCCESS :D" << "\n";
} }

View file

@ -2,7 +2,6 @@
lt::test::Suite meta = []() { lt::test::Suite meta = []() {
using lt::test::expect_eq; using lt::test::expect_eq;
using lt::test::expect_true;
lt::test::Case { "test_1" } = [] { lt::test::Case { "test_1" } = [] {
expect_eq(5, 5); expect_eq(5, 5);
@ -13,18 +12,7 @@ lt::test::Suite meta = []() {
}; };
lt::test::Case { "test_3" } = [] { lt::test::Case { "test_3" } = [] {
auto exception_thrown = false; expect_eq(true, false);
try
{
expect_eq(true, false);
}
catch (const std::exception &exp)
{
exception_thrown = true;
}
expect_true(exception_thrown);
}; };
lt::test::Case { "test_4" } = [] { lt::test::Case { "test_4" } = [] {
@ -32,5 +20,6 @@ lt::test::Suite meta = []() {
}; };
lt::test::Case { "test_5" } = [] { lt::test::Case { "test_5" } = [] {
throw std::runtime_error("Uncaught std exception!");
}; };
}; };