diff options
| author | Martin Hořeňovský | 2020-08-18 13:47:58 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2020-08-18 21:02:31 +0200 |
| commit | f16be402f77eaea8996b60299f670bfa557cee52 (patch) | |
| tree | ceddeec701615d6452f6bcdc399fa0569b80dc2f /tests/SelfTest/IntrospectiveTests | |
| parent | e418e75c74274354b4c2c7597d919929426d89c8 (diff) | |
| download | catch3-f16be402f77eaea8996b60299f670bfa557cee52.tar.gz | |
Make XmlEncoding tests slightly more efficient
Diffstat (limited to 'tests/SelfTest/IntrospectiveTests')
| -rw-r--r-- | tests/SelfTest/IntrospectiveTests/Xml.tests.cpp | 6 |
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(); } |