mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 13:26:10 +01:00
Make XmlEncoding tests slightly more efficient
This commit is contained in:
parent
e418e75c74
commit
f16be402f7
@ -1,10 +1,10 @@
|
|||||||
#include <catch2/catch_test_macros.hpp>
|
#include <catch2/catch_test_macros.hpp>
|
||||||
#include <catch2/internal/catch_xmlwriter.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 ) {
|
static std::string encode( std::string const& str, Catch::XmlEncode::ForWhat forWhat = Catch::XmlEncode::ForTextNodes ) {
|
||||||
std::ostringstream oss;
|
Catch::ReusableStringStream oss;
|
||||||
oss << Catch::XmlEncode( str, forWhat );
|
oss << Catch::XmlEncode( str, forWhat );
|
||||||
return oss.str();
|
return oss.str();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user