[Libreoffice-commits] core.git: testtools/source

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Fri Jun 5 14:05:45 UTC 2020


 testtools/source/bridgetest/bridgetest.cxx |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 3bc5057f9689e024957cfa898a221ee2c4c4afe7
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Fri Jun 5 12:01:38 2020 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Fri Jun 5 16:05:08 2020 +0200

    Upcoming loplugin:elidestringvar: testtools
    
    Change-Id: I097ecd5c781b35dc792f613a2f5be19919c3f1cc
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95581
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/testtools/source/bridgetest/bridgetest.cxx b/testtools/source/bridgetest/bridgetest.cxx
index 5ce8a687d5f8..45aa2715ab33 100644
--- a/testtools/source/bridgetest/bridgetest.cxx
+++ b/testtools/source/bridgetest/bridgetest.cxx
@@ -900,20 +900,19 @@ static bool performTest(
 static bool raiseOnewayException( const Reference < XBridgeTest > & xLBT )
 {
     bool bReturn = true;
-    OUString sCompare = STRING_TEST_CONSTANT;
     Reference<XInterface> const x(xLBT->getInterface());
     try
     {
         // Note : the exception may fly or not (e.g. remote scenario).
         //        When it flies, it must contain the correct elements.
-        xLBT->raiseRuntimeExceptionOneway( sCompare, x );
+        xLBT->raiseRuntimeExceptionOneway( STRING_TEST_CONSTANT, x );
     }
     catch( const RuntimeException & e )
     {
         bReturn = (
 #if OSL_DEBUG_LEVEL == 0
             // java stack traces trash Message
-            e.Message == sCompare &&
+            e.Message == STRING_TEST_CONSTANT &&
 #endif
             xLBT->getInterface() == e.Context &&
             x == e.Context );


More information about the Libreoffice-commits mailing list