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

Make XmlEncoding tests slightly more efficient

Commit
f16be402f77eaea8996b60299f670bfa557cee52
Author
Martin Hořeňovský ·
Parents
e418e75c7427

Files · Download .tar.gz

Changes

 tests/SelfTest/IntrospectiveTests/Xml.tests.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/SelfTest/IntrospectiveTests/Xml.tests.cpp b/tests/SelfTest/IntrospectiveTests/Xml.tests.cpp
index 519c3d40..74f42383 100644
--- a/tests/SelfTest/IntrospectiveTests/Xml.tests.cpp
+++ b/tests/SelfTest/IntrospectiveTests/Xml.tests.cpp
@@ -1,10 +1,10 @@
 #include <catch2/catch_test_macros.hpp>
 #include <catch2/internal/catch_xmlwriter.hpp>
 
-#include <sstream>
+#include <catch2/internal/catch_stream.hpp>
 
-inline std::string encode( std::string const& str, Catch::XmlEncode::ForWhat forWhat = Catch::XmlEncode::ForTextNodes ) {
-    std::ostringstream oss;
+static std::string encode( std::string const& str, Catch::XmlEncode::ForWhat forWhat = Catch::XmlEncode::ForTextNodes ) {
+    Catch::ReusableStringStream oss;
     oss << Catch::XmlEncode( str, forWhat );
     return oss.str();
 }