diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-04-29 11:18:21 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-04-30 08:43:51 +0200 |
commit | dd8d5e5795358d732a9f7a8af7c35f662321e332 (patch) | |
tree | 9983c2a5f0bc3f2c29133aa57e4ceb510eb68a11 /tools/qa/cppunit | |
parent | 22f2cf3ccc6d0c9ba2c2860735e789d6b3a25f72 (diff) |
improve loplugin:stringconstant
to find more places we can elide the OUString() constructor at call
sites
Change-Id: Ie09f3c61f2c4b4959c97dc98ebcbaf7c51d5d713
Reviewed-on: https://gerrit.libreoffice.org/71514
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'tools/qa/cppunit')
-rw-r--r-- | tools/qa/cppunit/test_config.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tools/qa/cppunit/test_config.cxx b/tools/qa/cppunit/test_config.cxx index eeb1391ab6b8..8002ff99dff7 100644 --- a/tools/qa/cppunit/test_config.cxx +++ b/tools/qa/cppunit/test_config.cxx @@ -107,14 +107,14 @@ public: { Config aConfig(maConfigFile); aConfig.SetGroup("TestGroup"); - CPPUNIT_ASSERT_EQUAL(OString("testvalue"), aConfig.ReadKey(OString("testkey"))); - CPPUNIT_ASSERT_EQUAL(OString(), aConfig.ReadKey(OString("nonexistenttestkey"))); + CPPUNIT_ASSERT_EQUAL(OString("testvalue"), aConfig.ReadKey("testkey")); + CPPUNIT_ASSERT_EQUAL(OString(), aConfig.ReadKey("nonexistenttestkey")); CPPUNIT_ASSERT_EQUAL(OString("notexists"), aConfig.ReadKey("nonexistenttestkey", "notexists")); aConfig.SetGroup("TestGroup2"); - CPPUNIT_ASSERT_EQUAL(OString("testvalue"), aConfig.ReadKey(OString("testkey2"))); - CPPUNIT_ASSERT_EQUAL(OString(), aConfig.ReadKey(OString("nonexistenttestkey"))); + CPPUNIT_ASSERT_EQUAL(OString("testvalue"), aConfig.ReadKey("testkey2")); + CPPUNIT_ASSERT_EQUAL(OString(), aConfig.ReadKey("nonexistenttestkey")); CPPUNIT_ASSERT_EQUAL(OString("notexists"), aConfig.ReadKey("nonexistenttestkey", "notexists")); } @@ -138,14 +138,14 @@ public: sal_uInt16 nExpected = 2; sal_uInt16 nActual = aConfig.GetKeyCount(); CPPUNIT_ASSERT_EQUAL(nExpected, nActual); - CPPUNIT_ASSERT_EQUAL(OString("testvalue"), aConfig.ReadKey(OString("testkey_new"))); + CPPUNIT_ASSERT_EQUAL(OString("testvalue"), aConfig.ReadKey("testkey_new")); aConfig.DeleteKey("testkey_new"); nExpected = 1; nActual = aConfig.GetKeyCount(); CPPUNIT_ASSERT_EQUAL(nExpected, nActual); - CPPUNIT_ASSERT_EQUAL(OString(), aConfig.ReadKey(OString("testkey_new"))); + CPPUNIT_ASSERT_EQUAL(OString(), aConfig.ReadKey("testkey_new")); aConfig.SetGroup("TestGroup2"); aConfig.WriteKey("testkey_new", "testvalue"); @@ -153,14 +153,14 @@ public: nActual = aConfig.GetKeyCount(); nExpected = 2; CPPUNIT_ASSERT_EQUAL(nExpected, nActual); - CPPUNIT_ASSERT_EQUAL(OString("testvalue"), aConfig.ReadKey(OString("testkey_new"))); + CPPUNIT_ASSERT_EQUAL(OString("testvalue"), aConfig.ReadKey("testkey_new")); aConfig.DeleteKey("testkey_new"); nActual = aConfig.GetKeyCount(); nExpected = 1; CPPUNIT_ASSERT_EQUAL(nExpected, nActual); - CPPUNIT_ASSERT_EQUAL(OString(), aConfig.ReadKey(OString("testkey_new"))); + CPPUNIT_ASSERT_EQUAL(OString(), aConfig.ReadKey("testkey_new")); aConfig.SetGroup("TestGroup3"); aConfig.WriteKey("testkey_new_group3", "testvalue"); @@ -168,7 +168,7 @@ public: nActual = aConfig.GetKeyCount(); nExpected = 1; CPPUNIT_ASSERT_EQUAL(nExpected, nActual); - CPPUNIT_ASSERT_EQUAL(OString("testvalue"), aConfig.ReadKey(OString("testkey_new_group3"))); + CPPUNIT_ASSERT_EQUAL(OString("testvalue"), aConfig.ReadKey("testkey_new_group3")); nExpected = 3; CPPUNIT_ASSERT_EQUAL(nExpected, aConfig.GetGroupCount()); |