diff --git a/src/run.cpp b/src/run.cpp index 19c92a8..ac5cfb8 100644 --- a/src/run.cpp +++ b/src/run.cpp @@ -6,9 +6,10 @@ namespace fuc2 { int run(const Set& test_set) { int fail_count = 0; std::vector errors; + std::string file_name = test_set.location.file_name(); fmt::println("################# {} \"{}\" ###############", - test_set.location.file_name(), test_set.name); + file_name, test_set.name); for(const auto& [name, test] : test_set.tests) { bool did_fail = false; @@ -28,17 +29,17 @@ namespace fuc2 { } std::string pass_fail = did_fail ? "🔴" : "🟢"; - fmt::println("{} {}\n==========", pass_fail, name); + fmt::println("{} {}:{}\n==========", pass_fail, file_name, name); } if(fail_count > 0) { - fmt::println("🚨🚨🚨🚨🚨 FAIL COUNT: {} in {}", fail_count, test_set.location.file_name()); + fmt::println("🚨🚨🚨🚨🚨 FAIL COUNT: {} in {}", fail_count, file_name); for(auto& msg : errors) { fmt::println("---------\n{}", msg); } } else { - fmt::println("👍 ALL PASS: {}", test_set.location.file_name()); + fmt::println("👍 ALL PASS: {}", file_name); } return fail_count; diff --git a/tests/sample1.cpp b/tests/sample1.cpp index 543d8ba..855a87e 100644 --- a/tests/sample1.cpp +++ b/tests/sample1.cpp @@ -59,9 +59,9 @@ namespace sample1 { .name="std::deque basic operations", .options={ .fail_fast=false }, .tests={ - {"push_pop_back", test_push_pop_back}, - {"push_pop_front", test_push_pop_front}, - {"push_blows_up", test_push_blows_up}, + {"test_push_pop_back", test_push_pop_back}, + {"test_push_pop_front", test_push_pop_front}, + {"test_push_blows_up", test_push_blows_up}, } }; } diff --git a/tests/sample_failing.cpp b/tests/sample_failing.cpp index 3d68c7d..7a134f8 100644 --- a/tests/sample_failing.cpp +++ b/tests/sample_failing.cpp @@ -39,7 +39,7 @@ namespace sample_failing { .name="std::deque failing ops", .options={ .fail_fast=false }, .tests={ - {"fail_pop_back", fail_push_pop_back}, + {"fail_push_pop_back", fail_push_pop_back}, {"fail_blows_up", fail_blows_up}, } };