diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2024-10-03 11:40:13 +0500 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2024-10-05 10:06:44 +0200 |
commit | a6a69211230226ac8b6c17d016fc19eb8ee11261 (patch) | |
tree | 321a5c4a7657baa966185d3757595ff6107d820a /sfx2/qa/cppunit | |
parent | 95e2bdf97d987c845927bd44210547fd3c2f2387 (diff) |
Use good old string literals in assertXPath and friends
These are only sent to an external API expecting char*-like strings,
or for comparison. Having every assertXPath having three of _[ou]str
is too much syntactic noise, making the unit tests almost unreadable.
Change-Id: Ic004a36ea75e7bfe0b96f405c40f926a957b51cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174416
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sfx2/qa/cppunit')
-rw-r--r-- | sfx2/qa/cppunit/test_misc.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sfx2/qa/cppunit/test_misc.cxx b/sfx2/qa/cppunit/test_misc.cxx index c32fee011900..019490d2c352 100644 --- a/sfx2/qa/cppunit/test_misc.cxx +++ b/sfx2/qa/cppunit/test_misc.cxx @@ -106,11 +106,11 @@ CPPUNIT_TEST_FIXTURE(MiscTest, testODFCustomMetadata) // check that custom metadata is preserved xmlDocUniquePtr pXmlDoc = parseExport(u"meta.xml"_ustr); - assertXPathContent(pXmlDoc, "/office:document-meta/office:meta/bork"_ostr, u"bork"_ustr); - assertXPath(pXmlDoc, "/office:document-meta/office:meta/foo:bar"_ostr, 1); - assertXPath(pXmlDoc, "/office:document-meta/office:meta/foo:bar/baz:foo"_ostr, 1); - assertXPath(pXmlDoc, "/office:document-meta/office:meta/foo:bar/baz:foo[@baz:bar='foo']"_ostr); - assertXPathContent(pXmlDoc, "/office:document-meta/office:meta/foo:bar/foo:baz"_ostr, u"bar"_ustr); + assertXPathContent(pXmlDoc, "/office:document-meta/office:meta/bork", u"bork"); + assertXPath(pXmlDoc, "/office:document-meta/office:meta/foo:bar", 1); + assertXPath(pXmlDoc, "/office:document-meta/office:meta/foo:bar/baz:foo", 1); + assertXPath(pXmlDoc, "/office:document-meta/office:meta/foo:bar/baz:foo[@baz:bar='foo']"); + assertXPathContent(pXmlDoc, "/office:document-meta/office:meta/foo:bar/foo:baz", u"bar"); } /** |