diff options
author | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2025-01-01 19:18:19 +0100 |
---|---|---|
committer | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2025-01-01 19:18:19 +0100 |
commit | 22131693e1892c5477c998ab63bf476d152b17cb (patch) | |
tree | 8cd7fbf85aa7a24db3da3d2ac1a86ec6d4c4f0f9 /asl/testing | |
parent | b2eddfabffeb78fc5b49f9c17d70175d2dfed2e0 (diff) |
Implement move constructor for buffer
Diffstat (limited to 'asl/testing')
-rw-r--r-- | asl/testing/testing.cpp | 8 |
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;
|