mirror of
https://github.com/catchorg/Catch2.git
synced 2024-12-22 19:33:29 +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/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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user