summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_write.cpp2
-rw-r--r--tests/writer_string.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_write.cpp b/tests/test_write.cpp
index ca230c3..da83745 100644
--- a/tests/test_write.cpp
+++ b/tests/test_write.cpp
@@ -171,7 +171,7 @@ struct test_writer: xml_writer
virtual void write(const void* data, size_t size)
{
CHECK(size % sizeof(pugi::char_t) == 0);
- contents += std::basic_string<pugi::char_t>(static_cast<const pugi::char_t*>(data), static_cast<const pugi::char_t*>(data) + size / sizeof(pugi::char_t));
+ contents.append(static_cast<const pugi::char_t*>(data), size / sizeof(pugi::char_t));
}
};
diff --git a/tests/writer_string.cpp b/tests/writer_string.cpp
index a09678b..661c792 100644
--- a/tests/writer_string.cpp
+++ b/tests/writer_string.cpp
@@ -15,7 +15,7 @@ static bool test_narrow(const std::string& result, const char* expected, size_t
void xml_writer_string::write(const void* data, size_t size)
{
- contents += std::string(static_cast<const char*>(data), size);
+ contents.append(static_cast<const char*>(data), size);
}
std::string xml_writer_string::as_narrow() const