Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Replace ostringstream with ReusableStringStream in ConsoleReporter

Commit
81aa2d5582444ff79eedec7c098c096b6f8aa0cf
Author
Martin Hořeňovský ·
Parents
9d591f19ff6b

Files · Download .tar.gz

Changes

 src/catch2/reporters/catch_reporter_console.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/catch2/reporters/catch_reporter_console.cpp b/src/catch2/reporters/catch_reporter_console.cpp
index 3169d95a..afceede4 100644
--- a/src/catch2/reporters/catch_reporter_console.cpp
+++ b/src/catch2/reporters/catch_reporter_console.cpp
@@ -18,6 +18,8 @@
 #include <catch2/internal/catch_stream.hpp>
 #include <catch2/internal/catch_stringref.hpp>
 #include <catch2/catch_test_case_info.hpp>
+#include <catch2/internal/catch_console_width.hpp>
+#include <catch2/internal/catch_stream.hpp>
 
 #include <cfloat>
 #include <cstdio>
@@ -277,7 +279,7 @@ public:
 class TablePrinter {
     std::ostream& m_os;
     std::vector<ColumnInfo> m_columnInfos;
-    std::ostringstream m_oss;
+    ReusableStringStream m_oss;
     int m_currentColumn = -1;
     bool m_isOpen = false;