From 8ba44af07f77bfab86fb49d079b649b23f0f9de8 Mon Sep 17 00:00:00 2001 From: qicosmos Date: Sun, 25 Jun 2023 18:58:56 +0800 Subject: [PATCH] add log --- src/coro_file/tests/test_corofile.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/coro_file/tests/test_corofile.cpp b/src/coro_file/tests/test_corofile.cpp index d1fa6c9ac..8957bd944 100644 --- a/src/coro_file/tests/test_corofile.cpp +++ b/src/coro_file/tests/test_corofile.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include "asio/io_context.hpp" @@ -138,8 +139,12 @@ TEST_CASE("multithread for balance") { async_simple::coro::syncAwait(wait_read_func()); + std::error_code ec; for (auto& filename : filenames) { - fs::remove(fs::path(filename)); + fs::remove(fs::path(filename), ec); + if (ec) { + std::cout << "remove file error: " << ec.message() << "\n"; + } } }