Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/tests/SelfTest/IntrospectiveTests/Xml.tests.cpp
diff options
context:
space:
mode:
authorMartin Hořeňovský2020-08-18 13:47:58 +0200
committerMartin Hořeňovský2020-08-18 21:02:31 +0200
commitf16be402f77eaea8996b60299f670bfa557cee52 (patch)
treeceddeec701615d6452f6bcdc399fa0569b80dc2f /tests/SelfTest/IntrospectiveTests/Xml.tests.cpp
parente418e75c74274354b4c2c7597d919929426d89c8 (diff)
downloadcatch3-f16be402f77eaea8996b60299f670bfa557cee52.tar.gz
Make XmlEncoding tests slightly more efficient
Diffstat (limited to 'tests/SelfTest/IntrospectiveTests/Xml.tests.cpp')
-rw-r--r--tests/SelfTest/IntrospectiveTests/Xml.tests.cpp6
1 files 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();
}