diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-10-13 11:59:29 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-10-13 17:39:32 +0200 |
commit | 03c474c640d63f54d520712693e2f47976d8d531 (patch) | |
tree | 5cc255f9ee7a61d18fecb80743787378b6150b74 /tools/qa | |
parent | c89f0cd9f6a4b3f77440dd7ea9da08f9cd327711 (diff) |
Unify JsonWriter::put and putRaw a bit
In the process, it turned out that there was unnecessary conversion
of OStringBuffer to OString and back to OStringBuffer when using
putRaw, which is avoided now.
Change-Id: I1e3ee685679df0b025bee8f4430624ee5bc9ccb3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123547
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'tools/qa')
-rw-r--r-- | tools/qa/cppunit/test_json_writer.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/qa/cppunit/test_json_writer.cxx b/tools/qa/cppunit/test_json_writer.cxx index d5c037801067..fe3019e91b0a 100644 --- a/tools/qa/cppunit/test_json_writer.cxx +++ b/tools/qa/cppunit/test_json_writer.cxx @@ -46,14 +46,13 @@ void JsonWriterTest::test1() { auto testNode = aJson.startNode("node"); aJson.put("oustring", OUString("val1")); - aJson.put("ostring", OString("val2")); aJson.put("charptr", "val3"); aJson.put("int", static_cast<sal_Int32>(12)); } std::unique_ptr<char, o3tl::free_delete> result(aJson.extractData()); - CPPUNIT_ASSERT_EQUAL(std::string("{ \"node\": { \"oustring\": \"val1\", \"ostring\": \"val2\", " + CPPUNIT_ASSERT_EQUAL(std::string("{ \"node\": { \"oustring\": \"val1\", " "\"charptr\": \"val3\", \"int\": 12}}"), std::string(result.get())); } |