Decent testbed for further iteration
This commit is contained in:
@@ -20,10 +20,11 @@ namespace jtest {
|
||||
{
|
||||
try {
|
||||
callback();
|
||||
} catch(...) {
|
||||
} catch(const std::exception& e) {
|
||||
jlog::log({
|
||||
{.content = std::format("{}:{}", file, line)},
|
||||
{.colorCode = jlog::ansi_escape_codes::FG_RED, .content = testname},
|
||||
{.content = "Failed!"}
|
||||
{.content = "Failed:", .delimiter = ""}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
@@ -31,7 +32,7 @@ namespace jtest {
|
||||
jlog::log({
|
||||
{.content = std::format("{}:{}", file, line)},
|
||||
{.colorCode = jlog::ansi_escape_codes::FG_GREEN, .content = testname},
|
||||
{.content = "Passed!", .delimiter = ""}
|
||||
{.content = "Passed:", .delimiter = ""}
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
2
main.cpp
2
main.cpp
@@ -9,8 +9,6 @@
|
||||
// Look into a different mechanism more similar to gtest wherein we have a TEST macro
|
||||
// that declares and "registers" a test, and then inside our main block we call RUN_ALL_TESTS(argc, argv);
|
||||
|
||||
// Running into a suituation in which we can't catch assertations or "checks"
|
||||
// Additionally, The tests appear to run out-of-order, but lambda functions shouldn't be asynchronous on their own?!!
|
||||
int main()
|
||||
{
|
||||
|
||||
|
Reference in New Issue
Block a user