summaryrefslogtreecommitdiff
path: root/asl/testing
diff options
context:
space:
mode:
authorSteven Le Rouzic <steven.lerouzic@gmail.com>2025-01-01 19:18:19 +0100
committerSteven Le Rouzic <steven.lerouzic@gmail.com>2025-01-01 19:18:19 +0100
commit22131693e1892c5477c998ab63bf476d152b17cb (patch)
tree8cd7fbf85aa7a24db3da3d2ac1a86ec6d4c4f0f9 /asl/testing
parentb2eddfabffeb78fc5b49f9c17d70175d2dfed2e0 (diff)
Implement move constructor for buffer
Diffstat (limited to 'asl/testing')
-rw-r--r--asl/testing/testing.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/asl/testing/testing.cpp b/asl/testing/testing.cpp
index 405df34..aff6a74 100644
--- a/asl/testing/testing.cpp
+++ b/asl/testing/testing.cpp
@@ -38,6 +38,8 @@ int main([[maybe_unused]] int argc, [[maybe_unused]] char* argv[])
{
int fail = 0;
int pass = 0;
+
+ asl::testing::Test* failed_head = nullptr;
for (auto* it = g_head; it != nullptr; it = it->m_next)
{
@@ -55,6 +57,8 @@ int main([[maybe_unused]] int argc, [[maybe_unused]] char* argv[])
{
asl::eprint(RED("[ FAILED ]") " {}\n", it->m_case_name);
fail += 1;
+
+ it->m_next = asl::exchange(failed_head, it);
}
}
@@ -67,6 +71,10 @@ int main([[maybe_unused]] int argc, [[maybe_unused]] char* argv[])
else
{
asl::eprint(RED("[ FAILED ]") " {} test(s) failed\n", fail);
+ for (auto* it = failed_head; it != nullptr; it = it->m_next)
+ {
+ asl::eprint(RED("[ FAILED ]") " {}\n", it->m_case_name);
+ }
}
return fail;