[Libreoffice-commits] core.git: testtools/source
testtools/source/bridgetest/bridgetest.cxx|6 +++--- testtools/source/bridgetest/cppobj.cxx|4 ++-- testtools/source/bridgetest/currentcontextchecker.cxx |6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) New commits: commit e7cf25437e590dd74a1f119b2942b2122cdff1aa Author: Stephan Bergmann AuthorDate: Thu Oct 19 10:30:34 2023 +0200 Commit: Stephan Bergmann CommitDate: Fri Oct 20 16:13:38 2023 +0200 Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: testtools Change-Id: Idc0de002b7ca4e370add311f91576adaaf354764 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158243 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/testtools/source/bridgetest/bridgetest.cxx b/testtools/source/bridgetest/bridgetest.cxx index 6e09923dcaac..9d2a6b1832e7 100644 --- a/testtools/source/bridgetest/bridgetest.cxx +++ b/testtools/source/bridgetest/bridgetest.cxx @@ -67,10 +67,10 @@ using namespace com::sun::star::bridge; using namespace test::testtools::bridgetest; -constexpr OUStringLiteral SERVICENAME = u"com.sun.star.test.bridge.BridgeTest"; -constexpr OUStringLiteral IMPLNAME = u"com.sun.star.comp.bridge.BridgeTest"; +constexpr OUString SERVICENAME = u"com.sun.star.test.bridge.BridgeTest"_ustr; +constexpr OUString IMPLNAME = u"com.sun.star.comp.bridge.BridgeTest"_ustr; -constexpr OUStringLiteral STRING_TEST_CONSTANT = u"\" paco\' chorizo\\\' \"\'"; +constexpr OUString STRING_TEST_CONSTANT = u"\" paco\' chorizo\\\' \"\'"_ustr; namespace bridge_test { diff --git a/testtools/source/bridgetest/cppobj.cxx b/testtools/source/bridgetest/cppobj.cxx index 1e0029939c06..e77a582a0907 100644 --- a/testtools/source/bridgetest/cppobj.cxx +++ b/testtools/source/bridgetest/cppobj.cxx @@ -61,8 +61,8 @@ using namespace test::testtools::bridgetest; #pragma warning (disable : 4503) // irrelevant for test code #endif -constexpr OUStringLiteral SERVICENAME = u"com.sun.star.test.bridge.CppTestObject"; -constexpr OUStringLiteral IMPLNAME = u"com.sun.star.comp.bridge.CppTestObject"; +constexpr OUString SERVICENAME = u"com.sun.star.test.bridge.CppTestObject"_ustr; +constexpr OUString IMPLNAME = u"com.sun.star.comp.bridge.CppTestObject"_ustr; namespace bridge_object { diff --git a/testtools/source/bridgetest/currentcontextchecker.cxx b/testtools/source/bridgetest/currentcontextchecker.cxx index 5852f85b9cbe..8d41a40427d5 100644 --- a/testtools/source/bridgetest/currentcontextchecker.cxx +++ b/testtools/source/bridgetest/currentcontextchecker.cxx @@ -36,8 +36,8 @@ namespace { -constexpr OUStringLiteral KEY = u"testtools.bridgetest.Key"; -constexpr OUStringLiteral VALUE = u"good"; +constexpr OUString KEY = u"testtools.bridgetest.Key"_ustr; +constexpr OUString VALUE = u"good"_ustr; class CurrentContext: public ::osl::DebugBase< CurrentContext >, @@ -56,7 +56,7 @@ CurrentContext::CurrentContext() {} css::uno::Any CurrentContext::getValueByName(OUString const & Name) { -return Name == KEY ? css::uno::Any(OUString(VALUE)) : css::uno::Any(); +return Name == KEY ? css::uno::Any(VALUE) : css::uno::Any(); } }
[Libreoffice-commits] core.git: testtools/source
testtools/source/bridgetest/bridgetest.cxx |3 +-- testtools/source/bridgetest/constructors.cxx |4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) New commits: commit 42a5f14edcea5d2fd2e92955cd70a163a1a27804 Author: Mike Kaganski AuthorDate: Sun Apr 23 20:15:11 2023 +0300 Commit: Mike Kaganski CommitDate: Sat May 27 20:14:56 2023 +0200 Use getXWeak in testtools Change-Id: Iee8f1314fc3d924376b5b6ad6c683c7d451ab900 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150876 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/testtools/source/bridgetest/bridgetest.cxx b/testtools/source/bridgetest/bridgetest.cxx index 7de0ee794720..9e3eb90c1de9 100644 --- a/testtools/source/bridgetest/bridgetest.cxx +++ b/testtools/source/bridgetest/bridgetest.cxx @@ -1303,8 +1303,7 @@ Sequence< OUString > TestBridgeImpl::getSupportedServiceNames() static Reference< XInterface > TestBridgeImpl_create( const Reference< XComponentContext > & xContext ) { -return Reference< XInterface >( -static_cast< OWeakObject * >( new TestBridgeImpl( xContext ) ) ); +return getXWeak( new TestBridgeImpl( xContext ) ); } } diff --git a/testtools/source/bridgetest/constructors.cxx b/testtools/source/bridgetest/constructors.cxx index 04b953fff0e2..47be30649a42 100644 --- a/testtools/source/bridgetest/constructors.cxx +++ b/testtools/source/bridgetest/constructors.cxx @@ -407,7 +407,7 @@ css::uno::Reference< css::uno::XInterface > create( SAL_UNUSED_PARAMETER css::uno::Reference< css::uno::XComponentContext > const &) { -return static_cast< ::cppu::OWeakObject * >(new Impl); +return getXWeak(new Impl); } OUString getImplementationName() { @@ -423,7 +423,7 @@ css::uno::Reference< css::uno::XInterface > create2( SAL_UNUSED_PARAMETER css::uno::Reference< css::uno::XComponentContext > const &) { -return static_cast< ::cppu::OWeakObject * >(new Impl2); +return getXWeak(new Impl2); } OUString getImplementationName2() {
[Libreoffice-commits] core.git: testtools/source
testtools/source/bridgetest/cppobj.cxx|8 testtools/source/bridgetest/currentcontextchecker.cxx |2 +- 2 files changed, 5 insertions(+), 5 deletions(-) New commits: commit 82b9af26a64cd91173dbec43c1805bc069dd9f71 Author: Stephan Bergmann AuthorDate: Tue May 3 16:05:47 2022 +0200 Commit: Stephan Bergmann CommitDate: Tue May 3 20:02:54 2022 +0200 Just use Any ctor instead of makeAny in testtools Change-Id: Ib895b2269805656a23a93c7e794e097a712bd401 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133762 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/testtools/source/bridgetest/cppobj.cxx b/testtools/source/bridgetest/cppobj.cxx index 5bb4a3084ad8..13eb1e6440aa 100644 --- a/testtools/source/bridgetest/cppobj.cxx +++ b/testtools/source/bridgetest/cppobj.cxx @@ -747,7 +747,7 @@ void Test_Impl::setRuntimeException( sal_Int32 ) RuntimeException aExc; aExc.Message = _aData.String; aExc.Context = _aData.Interface; -throwException( makeAny( aExc ) ); +throwException( Any( aExc ) ); } // XBridgeTest2 - @@ -989,7 +989,7 @@ void Test_Impl::testConstructorsService( 'X', "test", UnoType< Any >::get(), -makeAny(true), +Any(true), arg14, arg15, arg16, @@ -1014,7 +1014,7 @@ void Test_Impl::testConstructorsService( TestEnum_TWO, TestStruct(10), TestPolyStruct< sal_Bool >(true), -TestPolyStruct< Any >(makeAny(true)), +TestPolyStruct< Any >(Any(true)), Reference< XInterface >(nullptr)); Sequence< Any > args{ Any(true), @@ -1055,7 +1055,7 @@ void Test_Impl::testConstructorsService( Any(TestEnum_TWO), Any(TestStruct(10)), Any(TestPolyStruct< sal_Bool >(true)), -Any(TestPolyStruct< Any >(makeAny(true))), +Any(TestPolyStruct< Any >(Any(true))), Any(Reference< XInterface >(nullptr)) }; assert(args.getLength() == 40); diff --git a/testtools/source/bridgetest/currentcontextchecker.cxx b/testtools/source/bridgetest/currentcontextchecker.cxx index c00e8b76ee84..5852f85b9cbe 100644 --- a/testtools/source/bridgetest/currentcontextchecker.cxx +++ b/testtools/source/bridgetest/currentcontextchecker.cxx @@ -56,7 +56,7 @@ CurrentContext::CurrentContext() {} css::uno::Any CurrentContext::getValueByName(OUString const & Name) { -return Name == KEY ? css::uno::makeAny(OUString(VALUE)) : css::uno::Any(); +return Name == KEY ? css::uno::Any(OUString(VALUE)) : css::uno::Any(); } }
[Libreoffice-commits] core.git: testtools/source
testtools/source/bridgetest/bridgetest.cxx | 14 - testtools/source/bridgetest/cppobj.cxx | 213 ++--- 2 files changed, 109 insertions(+), 118 deletions(-) New commits: commit e25be4fb3aa5e8ebc25d7685d83abac765f9e644 Author: Mike Kaganski AuthorDate: Fri Oct 29 10:17:38 2021 +0300 Commit: Mike Kaganski CommitDate: Wed Nov 3 06:29:37 2021 +0100 Prepare for removal of non-const operator[] from Sequence in testtools Change-Id: If67f845a0350766c7d098a399bd2fae6048c9100 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124400 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/testtools/source/bridgetest/bridgetest.cxx b/testtools/source/bridgetest/bridgetest.cxx index 6228d9423411..bb1c3af497f2 100644 --- a/testtools/source/bridgetest/bridgetest.cxx +++ b/testtools/source/bridgetest/bridgetest.cxx @@ -56,6 +56,7 @@ #include "currentcontextchecker.hxx" #include "multi.hxx" #include +#include using namespace osl; using namespace cppu; @@ -381,7 +382,7 @@ static bool performTest( bRet &= check(aData.Any == xI, "### unexpected any!"); bRet &= check(!(aData.Any != xI), "### unexpected any!"); aData.Sequence.realloc(2); -aData.Sequence[0] = *static_cast(&aData); +aData.Sequence.getArray()[0] = *static_cast(&aData); // aData.Sequence[1] is empty // aSetData is a manually copy of aData for first setting: TestData aSetData; @@ -391,7 +392,7 @@ static bool performTest( aData.Hyper, aData.UHyper, aData.Float, aData.Double, aData.Enum, aData.String, aData.Byte2, aData.Short2, xI, Any(&xI, cppu::UnoType::get())); aSetData.Sequence.realloc(2); -aSetData.Sequence[0] = *static_cast(&aSetData); +aSetData.Sequence.getArray()[0] = *static_cast(&aSetData); // aSetData.Sequence[1] is empty xLBT->setValues( aSetData.Bool, @@ -462,9 +463,8 @@ static bool performTest( aRet2)); // Check inout sequence order (=> inout sequence parameter was // switched by test objects): -TestElement temp(aRet.Sequence[0]); -aRet.Sequence[0] = aRet.Sequence[1]; -aRet.Sequence[1] = temp; +auto pRetSequence = aRet.Sequence.getArray(); +std::swap(pRetSequence[0], pRetSequence[1]); bRet &= check( equals(aData, aSV2ret) && equals(aData, aRet2), "getValues2 test"); @@ -648,9 +648,7 @@ static bool performTest( TestPolyStruct< sal_Int64 > tps1(12345); xLBT->transportPolyHyper(tps1); bRet &= check(tps1.member == 12345, "transportPolyHyper"); -Sequence< Any > seq(2); -seq[0] <<= static_cast< sal_uInt32 >(33); -seq[1] <<= OUString("ABC"); +Sequence< Any > seq{ Any(static_cast< sal_uInt32 >(33)), Any(OUString("ABC")) }; TestPolyStruct< Sequence< Any > > tps2(seq); TestPolyStruct< Sequence< Any > > tps3; xLBT->transportPolySequence(tps2, tps3); diff --git a/testtools/source/bridgetest/cppobj.cxx b/testtools/source/bridgetest/cppobj.cxx index e4666c4d22a3..f8cfb521351e 100644 --- a/testtools/source/bridgetest/cppobj.cxx +++ b/testtools/source/bridgetest/cppobj.cxx @@ -18,6 +18,7 @@ */ #include +#include #include #include @@ -631,9 +632,8 @@ void Test_Impl::setValues( sal_Bool bBool, eEnum, rStr, nByte2, nShort2, xTest, rAny, rSequence ); _aStructData = rStruct; -TestElement elem = rSequence[ 0 ]; -rSequence[ 0 ] = rSequence[ 1 ]; -rSequence[ 1 ] = elem; +auto pSequence = rSequence.getArray(); +std::swap(pSequence[ 0 ], pSequence[ 1 ]); return _aStructData; } @@ -955,28 +955,26 @@ void SAL_CALL Test_Impl::setSequencesOut( Sequence< sal_Bool >& aSeqBoolean, void Test_Impl::testConstructorsService( Reference< XComponentContext > const & context) { -Sequence< sal_Bool > arg14(1); arg14[0] = true; -Sequence< sal_Int8 > arg15(1); arg15[0] = SAL_MIN_INT8; -Sequence< sal_Int16 > arg16(1); arg16[0] = SAL_MIN_INT16; -Sequence< sal_uInt16 > arg17(1); arg17[0] = SAL_MAX_UINT16; -Sequence< sal_Int32 > arg18(1); arg18[0] = SAL_MIN_INT32; -Sequence< sal_uInt32 > arg19(1); arg19[0] = SAL_MAX_UINT32; -Sequence< sal_Int64 > arg20(1); arg20[0] = SAL_MIN_INT64; -Sequence< sal_uInt64 > arg21(1); arg21[0] = SAL_MAX_UINT64; -Sequence< float > arg22(1); arg22[0] = 0.123f; -Sequence< double > arg23(1); arg23[0] = 0.456; -Sequence< sal_Unicode > arg24(1); arg24[0] = 'X'; +Sequence< sal_Bool > arg14{ true }; +Sequence< sal_Int8 > arg15{ SAL_MIN_INT8 }; +Sequence< sal_Int16 > arg16{ SAL_MIN_INT16 }; +Sequence< sal_uInt16 > arg17{ SAL_MAX_UINT16 }; +Sequence< sal_Int32 > arg18{ SAL_MIN_INT32 }; +Sequence<
[Libreoffice-commits] core.git: testtools/source
testtools/source/bridgetest/bridgetest.cxx | 85 +++-- testtools/source/bridgetest/cli/cli_cpp_bridgetest.cxx | 82 +++-- testtools/source/bridgetest/cli/cli_cs_bridgetest.cs | 84 +++-- testtools/source/bridgetest/cli/cli_cs_testobj.cs | 30 +-- testtools/source/bridgetest/cli/cli_vb_bridgetest.vb | 92 +++--- testtools/source/bridgetest/cppobj.cxx | 148 ++--- testtools/source/bridgetest/idl/bridgetest.idl | 70 +--- testtools/source/bridgetest/pyuno/samplecomponent.py | 58 +- 8 files changed, 479 insertions(+), 170 deletions(-) New commits: commit e4dbf6f6b9fde8d2e4843028c309d62245d78031 Author: Tor Lillqvist AuthorDate: Thu Nov 12 11:35:57 2020 +0200 Commit: Tor Lillqvist CommitDate: Thu Nov 12 18:17:22 2020 +0100 Cosmetic change to make it easier to see which parameter is the nth Consequently put each parameter/argument on a separate line for the get/setValues methods. Will make it easier to add more parameters of such types and at such positions that they catch errors in the C++/UNO bridge on more platforms (specifically, the one for macOS on Apple Silicon). Change-Id: I68578d0401358317f3baf913ef4d53009c8f5f2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105633 Tested-by: Jenkins Reviewed-by: Tor Lillqvist diff --git a/testtools/source/bridgetest/bridgetest.cxx b/testtools/source/bridgetest/bridgetest.cxx index 45aa2715ab33..13271d90c9cb 100644 --- a/testtools/source/bridgetest/bridgetest.cxx +++ b/testtools/source/bridgetest/bridgetest.cxx @@ -383,28 +383,66 @@ static bool performTest( aSetData.Sequence[0] = *static_cast(&aSetData); // aSetData.Sequence[1] is empty xLBT->setValues( -aSetData.Bool, aSetData.Char, aSetData.Byte, aSetData.Short, -aSetData.UShort, aSetData.Long, aSetData.ULong, aSetData.Hyper, -aSetData.UHyper, aSetData.Float, aSetData.Double, aSetData.Enum, -aSetData.String, aSetData.Interface, aSetData.Any, -aSetData.Sequence, aSetData); +aSetData.Bool, +aSetData.Char, +aSetData.Byte, +aSetData.Short, +aSetData.UShort, +aSetData.Long, +aSetData.ULong, +aSetData.Hyper, +aSetData.UHyper, +aSetData.Float, +aSetData.Double, +aSetData.Enum, +aSetData.String, +aSetData.Interface, +aSetData.Any, +aSetData.Sequence, +aSetData); { TestData aRet; TestData aRet2; xLBT->getValues( -aRet.Bool, aRet.Char, aRet.Byte, aRet.Short, aRet.UShort, -aRet.Long, aRet.ULong, aRet.Hyper, aRet.UHyper, aRet.Float, -aRet.Double, aRet.Enum, aRet.String, aRet.Interface, aRet.Any, -aRet.Sequence, aRet2); +aRet.Bool, +aRet.Char, +aRet.Byte, +aRet.Short, +aRet.UShort, +aRet.Long, +aRet.ULong, +aRet.Hyper, +aRet.UHyper, +aRet.Float, +aRet.Double, +aRet.Enum, +aRet.String, +aRet.Interface, +aRet.Any, +aRet.Sequence, +aRet2); bRet &= check( equals(aData, aRet) && equals(aData, aRet2), "getValues test"); // Set last retrieved values: TestData aSV2ret( xLBT->setValues2( -aRet.Bool, aRet.Char, aRet.Byte, aRet.Short, aRet.UShort, -aRet.Long, aRet.ULong, aRet.Hyper, aRet.UHyper, aRet.Float, -aRet.Double, aRet.Enum, aRet.String, aRet.Interface, -aRet.Any, aRet.Sequence, aRet2)); +aRet.Bool, +aRet.Char, +aRet.Byte, +aRet.Short, +aRet.UShort, +aRet.Long, +aRet.ULong, +aRet.Hyper, +aRet.UHyper, +aRet.Float, +aRet.Double, +aRet.Enum, +aRet.String, +aRet.Interface, +aRet.Any, +aRet.Sequence, +aRet2)); // Check inout sequence order (=> inout sequence parameter was // switched by test objects): TestElement temp(aRet.Sequence[0]); @@ -439,10 +477,23 @@ static bool performTest( TestData aRet2; TestData aGVret( xLBT->getValues( -aRet.Bool, aRet.Char, aRet.Byte, aRet.Short, aRet.UShort, -aRet.Long,
[Libreoffice-commits] core.git: testtools/source
testtools/source/bridgetest/cli/cli_cpp_bridgetest.cxx |4 ++-- testtools/source/bridgetest/cli/cli_cs_bridgetest.cs |4 ++-- testtools/source/bridgetest/cli/cli_vb_bridgetest.vb |4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) New commits: commit efd7bf1afb2dd43e6d913326ef09d004a4b35fa9 Author: Andrea Gelmini AuthorDate: Mon Aug 31 14:56:56 2020 +0200 Commit: Julien Nabet CommitDate: Wed Sep 2 08:59:16 2020 +0200 Fix typo in code It passed "make check" on Linux Change-Id: I58e196515614aad309c9df8784b08fa86415549d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101783 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/testtools/source/bridgetest/cli/cli_cpp_bridgetest.cxx b/testtools/source/bridgetest/cli/cli_cpp_bridgetest.cxx index 5deddf4005fb..b1246f6518e4 100644 --- a/testtools/source/bridgetest/cli/cli_cpp_bridgetest.cxx +++ b/testtools/source/bridgetest/cli/cli_cpp_bridgetest.cxx @@ -679,7 +679,7 @@ static bool performSequenceTest(XBridgeTest* xBT) } /** Test the System::Object method on the proxy object */ -static bool testObjectMethodsImplemention(XBridgeTest* xLBT) +static bool testObjectMethodsImplementation(XBridgeTest* xLBT) { bool ret = false; Object* obj = new Object(); @@ -788,7 +788,7 @@ static bool raiseException(XBridgeTest* xLBT ) bRet = check( performTest( xLBT ), "standard test" ) && bRet; bRet = check( raiseException( xLBT ) , "exception test" )&& bRet; bRet = check( raiseOnewayException( xLBT ), "oneway exception test" ) && bRet; - bRet = check( testObjectMethodsImplemention(xLBT), "object methods test") && bRet; + bRet = check( testObjectMethodsImplementation(xLBT), "object methods test") && bRet; bRet = performQueryForUnknownType( xLBT ) && bRet; if (! bRet) { diff --git a/testtools/source/bridgetest/cli/cli_cs_bridgetest.cs b/testtools/source/bridgetest/cli/cli_cs_bridgetest.cs index 9d629e062c49..42c90743a2e8 100644 --- a/testtools/source/bridgetest/cli/cli_cs_bridgetest.cs +++ b/testtools/source/bridgetest/cli/cli_cs_bridgetest.cs @@ -855,7 +855,7 @@ static bool performSequenceTest(XBridgeTest xBT) } /** Test the System::Object method on the proxy object */ -static bool testObjectMethodsImplemention(XBridgeTest xLBT) +static bool testObjectMethodsImplementetion(XBridgeTest xLBT) { bool ret = false; Object obj = new Object(); @@ -970,7 +970,7 @@ static bool raiseException(XBridgeTest xLBT ) bRet = check( performTest( xLBT ), "standard test" ) && bRet; bRet = check( raiseException( xLBT ) , "exception test" )&& bRet; bRet = check( raiseOnewayException( xLBT ), "oneway exception test" ) && bRet; - bRet = check( testObjectMethodsImplemention(xLBT), "object methods test") && bRet; + bRet = check( testObjectMethodsImplementetion(xLBT), "object methods test") && bRet; bRet = performQueryForUnknownType( xLBT ) && bRet; if ( ! bRet) { diff --git a/testtools/source/bridgetest/cli/cli_vb_bridgetest.vb b/testtools/source/bridgetest/cli/cli_vb_bridgetest.vb index 9b55cad6ee16..ab5505485a82 100644 --- a/testtools/source/bridgetest/cli/cli_vb_bridgetest.vb +++ b/testtools/source/bridgetest/cli/cli_vb_bridgetest.vb @@ -766,7 +766,7 @@ Public Class BridgeTest 'Test the System::Object method on the proxy object ' -Private Shared Function testObjectMethodsImplemention(xLBT As XBridgeTest) As Boolean +Private Shared Function testObjectMethodsImplementation(xLBT As XBridgeTest) As Boolean Dim ret As Boolean = False Dim obj As Object = New Object Dim xInt As Object = DirectCast(xLBT, Object) @@ -807,7 +807,7 @@ Public Class BridgeTest bRet = check( raiseException( xLBT ) , "exception test" ) And bRet bRet = check( raiseOnewayException( xLBT ), "oneway exception test" ) _ And bRet -bRet = check( testObjectMethodsImplemention(xLBT), _ +bRet = check( testObjectMethodsImplementation(xLBT), _ "object methods test") And bRet bRet = performQueryForUnknownType( xLBT ) And bRet If Not bRet ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: testtools/source
testtools/source/bridgetest/currentcontextchecker.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit b32e5bbdc620ac9cf8b241ada47640f9e1d5d408 Author: Stephan Bergmann AuthorDate: Thu Jul 2 08:50:35 2020 +0200 Commit: Stephan Bergmann CommitDate: Thu Jul 2 10:06:47 2020 +0200 Upcoming improved loplugin:staticanonymous -> redundantstatic: testtools Change-Id: I14913564c7dbb453a761b5e37fec4f9eb331417d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97705 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/testtools/source/bridgetest/currentcontextchecker.cxx b/testtools/source/bridgetest/currentcontextchecker.cxx index 27de3c5e7d42..4fda634e91f1 100644 --- a/testtools/source/bridgetest/currentcontextchecker.cxx +++ b/testtools/source/bridgetest/currentcontextchecker.cxx @@ -38,8 +38,8 @@ namespace { -static char const KEY[] = "testtools.bridgetest.Key"; -static char const VALUE[] = "good"; +char const KEY[] = "testtools.bridgetest.Key"; +char const VALUE[] = "good"; class CurrentContext: public ::osl::DebugBase< CurrentContext >, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: testtools/source
testtools/source/bridgetest/bridgetest.cxx |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) New commits: commit 3bc5057f9689e024957cfa898a221ee2c4c4afe7 Author: Stephan Bergmann AuthorDate: Fri Jun 5 12:01:38 2020 +0200 Commit: Stephan Bergmann 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 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 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 ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: testtools/source
testtools/source/bridgetest/cli/cli_cpp_bridgetest.cxx |6 +- 1 file changed, 1 insertion(+), 5 deletions(-) New commits: commit ce6434c44a9f820275908ff0ee4166427f481d6d Author: Muhammet Kara AuthorDate: Sun Feb 16 20:53:15 2020 +0300 Commit: Noel Grandin CommitDate: Mon Feb 17 15:36:04 2020 +0100 Remove never-executed else-block And the always-tru if-check Change-Id: I674d65506e1791fadab7d2871010528fd5dd94d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88816 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/testtools/source/bridgetest/cli/cli_cpp_bridgetest.cxx b/testtools/source/bridgetest/cli/cli_cpp_bridgetest.cxx index abb082e3fd24..5deddf4005fb 100644 --- a/testtools/source/bridgetest/cli/cli_cpp_bridgetest.cxx +++ b/testtools/source/bridgetest/cli/cli_cpp_bridgetest.cxx @@ -112,15 +112,11 @@ public __gc class BridgeTest : public WeakBase, public XMain Any a2 = (Any) val2; ret = a1.Type == a2.Type && compareData(a1.Value, a2.Value); } -else if (t1->IsValueType) +else { //Any, enum, int, bool char, float, double etc. ret = val1->Equals(val2); } -else -{ -Debug::Assert(false); -} return ret; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: testtools/source uitest/packaging
testtools/source/bridgetest/pyuno/samplecomponent.py | 122 +-- uitest/packaging/setup.py| 46 +++ 2 files changed, 84 insertions(+), 84 deletions(-) New commits: commit de077efae8265661905a47abb63dbfd6a69e1563 Author: Jens Carl AuthorDate: Sat Nov 23 23:22:05 2019 -0800 Commit: Jens Carl CommitDate: Tue Dec 10 08:43:13 2019 +0100 Fix IdentationError and mixture of spaces and tabs Fix IdentationError and mixture of spaces and tabs found by python -m py_compile . Change-Id: I1dc99196410d736ca33ead5deadfc61bc6584428 Reviewed-on: https://gerrit.libreoffice.org/83594 Tested-by: Jenkins Reviewed-by: Jens Carl diff --git a/testtools/source/bridgetest/pyuno/samplecomponent.py b/testtools/source/bridgetest/pyuno/samplecomponent.py index 736af9bee858..a434cd0b479c 100644 --- a/testtools/source/bridgetest/pyuno/samplecomponent.py +++ b/testtools/source/bridgetest/pyuno/samplecomponent.py @@ -28,10 +28,10 @@ g_implName = "org.openoffice.comp.pyuno.PythonTestObject" g_attribs = "RuntimeException", "Bool", "Char", "Byte", "Short", "UShort", \ "Long", "ULong", "Hyper", "UHyper", "Float", "Double", "Enum", \ - "String", "Interface", "Any" , "Sequence" , "Struct" +"String", "Interface", "Any" , "Sequence" , "Struct" def assign( rData, bBool, cChar, nByte, nShort, nUShort, nLong, nULong, nHyper,\ - nUHyper, fFloat, fDouble, eEnum, rStr, xTest, rAny ): + nUHyper, fFloat, fDouble, eEnum, rStr, xTest, rAny ): rData.Bool = bBool; rData.Char = cChar; rData.Byte = nByte; @@ -50,96 +50,96 @@ def assign( rData, bBool, cChar, nByte, nShort, nUShort, nLong, nULong, nHyper,\ class MyRecursiveCall( XRecursiveCall, unohelper.Base ): def callRecursivly( xCall, nToCall ): - if nToCall: -xCall.callRecursivly( self, nToCall -1 ) - + if nToCall: + xCall.callRecursivly( self, nToCall -1 ) + class SampleUnoComponent( XBridgeTestBase,XServiceInfo ): def __init__(self,ctx): - self.__dict__["callid"] = 0 - self.__dict__["sequenceBroken"] = 0 + self.__dict__["callid"] = 0 + self.__dict__["sequenceBroken"] = 0 def transportAny( self, value ): - return value + return value def raiseException( self, ArgumentPosition, Message, Context ): - raise IllegalArgumentException( Message, Context, ArgumentPosition ) - + raise IllegalArgumentException( Message, Context, ArgumentPosition ) + def raiseRuntimeExceptionOneway(self, Message, Context ): - raise RuntimeException( Message, Context ) + raise RuntimeException( Message, Context ) def setValues( self, bBool, cChar, nByte, nShort, nUShort, nLong,\ -nULong, nHyper, nUHyper, fFloat, fDouble, eEnum, \ -aString, xInterface, aAny, aSequence, aStruct ): + nULong, nHyper, nUHyper, fFloat, fDouble, eEnum, \ + aString, xInterface, aAny, aSequence, aStruct ): self.__dict__["data"] = TestDataElements( bBool, cChar, nByte, nShort, nUShort, nLong, - nULong, nHyper, nUHyper, fFloat, fDouble, eEnum, aStruct, xInterface, - aAny, aSequence ) - self.__dict__["Struct"] = aStruct + nULong, nHyper, nUHyper, fFloat, fDouble, eEnum, aStruct, xInterface, + aAny, aSequence ) + self.__dict__["Struct"] = aStruct def setValues2( self, bBool, cChar, nByte, nShort, nUShort, nLong, nULong,\ - nHyper, nUHyper, fFloat, fDouble, eEnum, \ - aString, xInterface, aAny, aSequence, aStruct ): + nHyper, nUHyper, fFloat, fDouble, eEnum, \ + aString, xInterface, aAny, aSequence, aStruct ): self.__dict__["Struct"] = TestData( cChar, nByte, nShort, nUShort, nLong, nULong, nHyper,\ - nUHyper, fFloat, fDouble, eEnum, aStruct, xInterface,\ - aAny, aSequence ) + nUHyper, fFloat, fDouble, eEnum, aStruct, xInterface,\ + aAny, aSequence ) self.__dict__["Struct"] = aStruct - return bBool, cChar, nByte, nShort, nUShort, nLong, nULong, nHyper, nUHyper, nULong, \ -nHyper, nUHyper, fFloat, fDouble, eEnum, aStruct, xInterface, aAny, \ -(aSequence[1],aSequence[0]), aStruct - + return bBool, cChar, nByte, nShort, nUShort, nLong, nULong, nHyper, nUHyper, nULong, \ + nHyper, nUHyper, fFloat, fDouble, eEnum, aStruct, xInter
[Libreoffice-commits] core.git: testtools/source
testtools/source/bridgetest/bridgetest.cxx |8 ++ testtools/source/bridgetest/constructors.cxx | 33 ++- 2 files changed, 11 insertions(+), 30 deletions(-) New commits: commit f474952b9e0e85ea71d26c18351d27b00711ff84 Author: Stephan Bergmann Date: Mon Jun 27 12:36:28 2016 +0200 Clean up uses of Any::getValue() in testtools Change-Id: I3440328371abfc223f39c6bd2994423bb9b38cf0 diff --git a/testtools/source/bridgetest/bridgetest.cxx b/testtools/source/bridgetest/bridgetest.cxx index 207e1e3..e9a5641 100644 --- a/testtools/source/bridgetest/bridgetest.cxx +++ b/testtools/source/bridgetest/bridgetest.cxx @@ -20,6 +20,7 @@ #include #include +#include #include #include "osl/diagnose.hxx" #include @@ -592,12 +593,9 @@ static bool performTest( xLBT->getNullPolyType().member == Type(), "getNullPolyType"); Any nullAny(xLBT->getNullPolyAny().member); +auto ifc = o3tl::tryAccess>(nullAny); bRet &= check( -(((nullAny.getValueTypeName() == - "com.sun.star.uno.XInterface") && - !static_cast< Reference< XInterface > const * >( - nullAny.getValue())->is()) - || nullAny == Any()), +!nullAny.hasValue() || (ifc && !ifc->is()), "getNullPolyAny"); bRet &= check( xLBT->getNullPolySequence().member.getLength() == 0, diff --git a/testtools/source/bridgetest/constructors.cxx b/testtools/source/bridgetest/constructors.cxx index 17ab92e..7653b8a 100644 --- a/testtools/source/bridgetest/constructors.cxx +++ b/testtools/source/bridgetest/constructors.cxx @@ -77,6 +77,7 @@ void Impl::initialize(css::uno::Sequence< css::uno::Any > const & arguments) ::sal_uInt64 arg7 = sal_uInt64(); float arg8 = float(); double arg9 = double(); +sal_Unicode arg10 = sal_Unicode(); OUString arg11; css::uno::Type arg12; bool arg13; @@ -90,6 +91,7 @@ void Impl::initialize(css::uno::Sequence< css::uno::Any > const & arguments) css::uno::Sequence< ::sal_uInt64 > arg21; css::uno::Sequence< float > arg22; css::uno::Sequence< double > arg23; +css::uno::Sequence< sal_Unicode > arg24; css::uno::Sequence< OUString > arg25; css::uno::Sequence< css::uno::Type > arg26; css::uno::Sequence< css::uno::Any > arg27; @@ -115,8 +117,6 @@ void Impl::initialize(css::uno::Sequence< css::uno::Any > const & arguments) && (arguments[0] >>= arg0) && arg0 && (arguments[1] >>= arg1) && arg1 == SAL_MIN_INT8 && (arguments[2] >>= arg2) && arg2 == SAL_MIN_INT16 - && (arguments[3].getValueType() - == ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get()) && (arguments[3] >>= arg3) && arg3 == SAL_MAX_UINT16 && (arguments[4] >>= arg4) && arg4 == SAL_MIN_INT32 && (arguments[5] >>= arg5) && arg5 == SAL_MAX_UINT32 @@ -124,10 +124,7 @@ void Impl::initialize(css::uno::Sequence< css::uno::Any > const & arguments) && (arguments[7] >>= arg7) && arg7 == SAL_MAX_UINT64 && (arguments[8] >>= arg8) && arg8 == 0.123f && (arguments[9] >>= arg9) && arg9 == 0.456 - && (arguments[10].getValueType() - == ::cppu::UnoType< ::cppu::UnoCharType >::get()) - && (*static_cast< ::sal_Unicode const * >(arguments[10].getValue()) - == 'X') + && (arguments[10] >>= arg10) && arg10 == 'X' && (arguments[11] >>= arg11) && arg11 == "test" && (arguments[12] >>= arg12) @@ -138,10 +135,6 @@ void Impl::initialize(css::uno::Sequence< css::uno::Any > const & arguments) && arg15[0] == SAL_MIN_INT8 && (arguments[16] >>= arg16) && arg16.getLength() == 1 && arg16[0] == SAL_MIN_INT16 - && (arguments[17].getValueType() - == ::cppu::UnoType< - ::cppu::UnoSequenceType < - ::cppu::UnoUnsignedShortType > >::get()) && (arguments[17] >>= arg17) && arg17.getLength() == 1 && arg17[0] == SAL_MAX_UINT16 && (arguments[18] >>= arg18) && arg18.getLength() == 1 @@ -156,15 +149,8 @@ void Impl::initialize(css::uno::Sequence< css::uno::Any > const & arguments) && arg22[0] == 0.123f && (arguments[23] >>= arg23) && arg23.getLength() == 1 && arg23[0] == 0.456 - && (arguments[24].getValueType() - == ::cppu::UnoType< - ::cppu::UnoSequenceType< ::cppu::UnoCharType > >::get()) - && (static_cast< css::uno::Sequence< ::sal_Unicode > const * >( - arguments[24].getValue())->getLength() - == 1) - && ((*static_cast< css::uno::Sequence< ::sal_Unicode > const * >( - arguments[24].getValue()))[
[Libreoffice-commits] core.git: testtools/source
testtools/source/performance/pseudo.cxx |2 +- testtools/source/performance/ubtest.cxx |3 --- 2 files changed, 1 insertion(+), 4 deletions(-) New commits: commit 96e44b3b510bc97ddda6caf937d031ae6a656d58 Author: Rohan Kumar Date: Wed Mar 9 17:13:25 2016 +0530 tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals I replaced the OSL_DEBUG_LEVEL > 1 to OSL_DEBUG_LEVEL > 0 conditionals. At some places i removed the logs containing OSL_DEBUG_LEVEL > 1 as OSL_DEBUG_LEVEL > 0 is compiled in production code Change-Id: I4466e7a2025b055f89fc525d7412f10bd4d8a07f Reviewed-on: https://gerrit.libreoffice.org/23067 Tested-by: Jenkins Reviewed-by: Björn Michaelsen diff --git a/testtools/source/performance/pseudo.cxx b/testtools/source/performance/pseudo.cxx index a23ea01..bff6e99 100644 --- a/testtools/source/performance/pseudo.cxx +++ b/testtools/source/performance/pseudo.cxx @@ -84,7 +84,7 @@ static void SAL_CALL pseudo_unoInterfaceProxy_free( uno_ExtEnvironment * pEnv, v typelib_typedescription_release( (typelib_TypeDescription *)pThis->pTypeDescr ); (*pThis->pPseudoMapping->release)( pThis->pPseudoMapping ); -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 *(int *)pProxy = 0xdeadbabe; #endif delete pThis; diff --git a/testtools/source/performance/ubtest.cxx b/testtools/source/performance/ubtest.cxx index f135113..abc532f 100644 --- a/testtools/source/performance/ubtest.cxx +++ b/testtools/source/performance/ubtest.cxx @@ -1161,9 +1161,6 @@ sal_Int32 TestImpl::run( const Sequence< OUString > & rArgs ) // dump out tables out( "\nTimes( ratio to direct in process )", stream ); -#if OSL_DEBUG_LEVEL > 1 -out ("; compiled with OSL_DEBUG_LEVEL > 1", stream ); -#endif out( ":", stream ); sal_Int32 nPos = 60; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: testtools/source
testtools/source/bridgetest/cppobj.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit 5021f01e240399498a02a72ab1d4be766f38c2ef Author: Michael Stahl Date: Fri Jan 29 16:12:26 2016 +0100 testtools: disable MSVC warning C4503 This was disabled by boost/config/compiler/visualc.hpp before commit 110d55cc11033d72bce908e65bbb6a9506ab39e5 Change-Id: Ic4757b0ab74c14fb49d7a0ec502253b667fae033 diff --git a/testtools/source/bridgetest/cppobj.cxx b/testtools/source/bridgetest/cppobj.cxx index fca1fe4..3412ae4 100644 --- a/testtools/source/bridgetest/cppobj.cxx +++ b/testtools/source/bridgetest/cppobj.cxx @@ -54,6 +54,9 @@ using namespace com::sun::star::lang; using namespace com::sun::star::registry; using namespace test::testtools::bridgetest; +#ifdef _MSC_VER +#pragma warning (disable : 4503) // irrelevant for test code +#endif #define SERVICENAME "com.sun.star.test.bridge.CppTestObject" #define IMPLNAME"com.sun.star.comp.bridge.CppTestObject" ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: testtools/source
testtools/source/bridgetest/bridgetest.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit 24dd1b32a669a70baadb7055892930cfe8f11bc0 Author: Stephan Bergmann Date: Wed Jul 8 23:14:57 2015 +0200 loplugin:stringconstant Change-Id: Ia3275dc10ef18fd5978c7422b33012a5b1e4696c diff --git a/testtools/source/bridgetest/bridgetest.cxx b/testtools/source/bridgetest/bridgetest.cxx index 6255349..52e337f 100644 --- a/testtools/source/bridgetest/bridgetest.cxx +++ b/testtools/source/bridgetest/bridgetest.cxx @@ -967,7 +967,7 @@ static bool raiseException( const Reference< XBridgeTest > & xLBT ) if (rExc.ArgumentPosition == 5 && #if OSL_DEBUG_LEVEL == 0 // java stack traces trash Message -rExc.Message.equalsAscii( STRING_TEST_CONSTANT ) && +rExc.Message == STRING_TEST_CONSTANT && #endif rExc.Context == xLBT->getInterface()) { @@ -994,7 +994,7 @@ static bool raiseException( const Reference< XBridgeTest > & xLBT ) if (rExc.Context == xLBT->getInterface() #if OSL_DEBUG_LEVEL == 0 // java stack traces trash Message -&& rExc.Message.equalsAscii( STRING_TEST_CONSTANT ) +&& rExc.Message == STRING_TEST_CONSTANT #endif ) { @@ -1014,7 +1014,7 @@ static bool raiseException( const Reference< XBridgeTest > & xLBT ) if (rExc.Context == xLBT->getInterface() #if OSL_DEBUG_LEVEL == 0 // java stack traces trash Message -&& rExc.Message.equalsAscii( STRING_TEST_CONSTANT ) +&& rExc.Message == STRING_TEST_CONSTANT #endif ) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: testtools/source
testtools/source/bridgetest/currentcontextchecker.hxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 0ee5a79a280dcacc326aafffb0a109ee63016c59 Author: Michael Stahl Date: Fri Feb 27 16:27:41 2015 +0100 testtools: mark CurrentContextChecker as DLLPRIVATE The problem is that currentcontextchecker.cxx is linked statically into 2 dynamic libraries, and with clang now using -fvisibility-ms-compat since commit f0aa1a78fb209310e8baef53c02f365fca518d11 the ASAN complains about ODR violation in testttols uno_test: ==1818==ERROR: AddressSanitizer: odr-violation (0x2aef08e9c600): [1] size=192 'vtable for testtools::bridgetest::CurrentContextChecker' testtools/source/bridgetest/currentcontextchecker.cxx [2] size=192 'vtable for testtools::bridgetest::CurrentContextChecker' testtools/source/bridgetest/currentcontextchecker.cxx Change-Id: Ie705788dbf035f7a9f64878c6dcf3cec9b7e7ba1 diff --git a/testtools/source/bridgetest/currentcontextchecker.hxx b/testtools/source/bridgetest/currentcontextchecker.hxx index cd4feef..3c728c9 100644 --- a/testtools/source/bridgetest/currentcontextchecker.hxx +++ b/testtools/source/bridgetest/currentcontextchecker.hxx @@ -30,7 +30,7 @@ namespace testtools { namespace bridgetest { -class CurrentContextChecker: +class SAL_DLLPRIVATE CurrentContextChecker : public ::osl::DebugBase< CurrentContextChecker >, public ::cppu::WeakImplHelper1< ::test::testtools::bridgetest::XCurrentContextChecker > ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: testtools/source
testtools/source/bridgetest/bridgetest.cxx |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit b0ce8ea909cc61710e73ddfa0d03c6fe34aab4cb Author: Stephan Bergmann Date: Tue Jan 20 10:22:49 2015 +0100 Some more loplugin:cstylecast: testtools Change-Id: I28bce2f4bdbadef2d68130adc6fdc09c9840a005 diff --git a/testtools/source/bridgetest/bridgetest.cxx b/testtools/source/bridgetest/bridgetest.cxx index 6bd4a92..80e601b 100644 --- a/testtools/source/bridgetest/bridgetest.cxx +++ b/testtools/source/bridgetest/bridgetest.cxx @@ -1037,7 +1037,7 @@ uno_Sequence* cloneSequence(const uno_Sequence* val, const Type& type) td.makeComplete(); typelib_TypeDescription* pTdRaw = td.get(); typelib_IndirectTypeDescription* pIndirectTd = -(typelib_IndirectTypeDescription*) pTdRaw; +reinterpret_cast(pTdRaw); typelib_TypeDescription* pTdElem = pIndirectTd->pType->pType; sal_Int8* buf = new sal_Int8[pTdElem->nSize * val->nElements]; @@ -1051,12 +1051,12 @@ uno_Sequence* cloneSequence(const uno_Sequence* val, const Type& type) Type _tElem(pTdElem->pWeakRef); for (int i = 0; i < val->nElements; i++) { -sal_Int8 *pValBuf = (sal_Int8 *)(&val->elements + i * pTdElem->nSize); +sal_Int8 const *pValBuf = reinterpret_cast(&val->elements + i * pTdElem->nSize); uno_Sequence* seq = cloneSequence( -*(uno_Sequence**) (pValBuf), +reinterpret_cast(pValBuf), _tElem); -*((uno_Sequence**) pBufCur) = seq; +*reinterpret_cast(pBufCur) = seq; pBufCur += pTdElem->nSize; } break; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: testtools/source
testtools/source/bridgetest/bridgetest.cxx | 20 - testtools/source/bridgetest/cli/cli_bridgetest_inprocess.cs |2 testtools/source/bridgetest/cli/cli_cpp_bridgetest.cxx |6 +- testtools/source/bridgetest/cli/cli_cs_bridgetest.cs|6 +- testtools/source/bridgetest/cppobj.cxx | 10 ++-- testtools/source/cliversioning/version.cs | 12 ++--- testtools/source/performance/pseudo.cxx |8 +-- testtools/source/performance/ubobject.cxx | 16 +++ testtools/source/performance/ubtest.cxx | 26 ++-- 9 files changed, 53 insertions(+), 53 deletions(-) New commits: commit a9311d6b1a8528d009bc25a4f1c80c7d9db58e49 Author: Alexander Wilms Date: Tue Feb 25 22:27:51 2014 +0100 Remove visual noise from testtools Change-Id: Idbf31a46a9e174b96b3cac76be6a01a6ada0abde Reviewed-on: https://gerrit.libreoffice.org/8325 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/testtools/source/bridgetest/bridgetest.cxx b/testtools/source/bridgetest/bridgetest.cxx index 3bc84e2..c647b1c 100644 --- a/testtools/source/bridgetest/bridgetest.cxx +++ b/testtools/source/bridgetest/bridgetest.cxx @@ -100,7 +100,7 @@ bool checkEmpty(OUString const & string, char const * message) { } -//== + class TestBridgeImpl : public osl::DebugBase, public WeakImplHelper2< XMain, XServiceInfo > { @@ -123,7 +123,7 @@ public: virtual sal_Int32 SAL_CALL run( const Sequence< OUString > & rArgs ) throw (RuntimeException, std::exception); }; -//== + static sal_Bool equals( const TestElement & rData1, const TestElement & rData2 ) { check( rData1.Bool == rData2.Bool, "### bool does not match!" ); @@ -158,7 +158,7 @@ static sal_Bool equals( const TestElement & rData1, const TestElement & rData2 ) rData1.Interface == rData2.Interface && rData1.Any == rData2.Any); } -//== + static sal_Bool equals( const TestData & rData1, const TestData & rData2 ) { sal_Int32 nLen; @@ -182,7 +182,7 @@ static sal_Bool equals( const TestData & rData1, const TestData & rData2 ) } return sal_False; } -//== + static void assign( TestElement & rData, sal_Bool bBool, sal_Unicode cChar, sal_Int8 nByte, sal_Int16 nShort, sal_uInt16 nUShort, @@ -363,7 +363,7 @@ void MyClass::release() throw () OWeakObject::release(); } -//== + static sal_Bool performTest( const Reference & xContext, const Reference & xLBT, @@ -948,7 +948,7 @@ static sal_Bool raiseOnewayException( const Reference < XBridgeTest > & xLBT ) return bReturn; } -//== + static sal_Bool raiseException( const Reference< XBridgeTest > & xLBT ) { sal_Int32 nCount = 0; @@ -1138,7 +1138,7 @@ inline bool makeSurrogate( return rOut.is(); } -//== + sal_Int32 TestBridgeImpl::run( const Sequence< OUString > & rArgs ) throw (RuntimeException, std::exception) { @@ -1253,9 +1253,9 @@ Sequence< OUString > TestBridgeImpl::getSupportedServiceNames() return bridge_test::getSupportedServiceNames(); } -// ... -//== + + static Reference< XInterface > SAL_CALL TestBridgeImpl_create( const Reference< XComponentContext > & xContext ) { @@ -1267,7 +1267,7 @@ static Reference< XInterface > SAL_CALL TestBridgeImpl_create( extern "C" { -//== + SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, SAL_UNUSED_PARAMETER void * ) diff --git a/testtools/source/bridgetest/cli/cli_bridgetest_inprocess.cs b/testtools/source/bridgetest/cli/cli_bridgetest_inprocess.cs index c90b75c..1cb4f31 100644 --- a/testtools/source/bridgetest/cli/cli_bridgetest_inprocess.cs +++ b/testtools/source/bridgetest/cli/cli_bridgetest_inprocess.cs @@ -25,7 +25,7 @@ using unoidl.com.sun.star.lang; using unoidl.com.sun.star.container; -//== + internal class Factory : Weak
[Libreoffice-commits] core.git: testtools/source
testtools/source/bridgetest/cli/cli_cpp_bridgetest.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit 42b733539179547a4030dfe54655b26985936717 Author: Stephan Bergmann Date: Wed Dec 4 11:35:57 2013 +0100 Revert "throw new ..." fix in Managed C++ code ...where it is correct and 336353a87e6003e685aab87ea74a158546e1f297 "Related rhbz#867808: More apparently bogus 'throw new ...' in C++ code" had changed it by accident. Change-Id: Id7fc1adf8c0068a3b59794d156b21f68b5ac7e72 diff --git a/testtools/source/bridgetest/cli/cli_cpp_bridgetest.cxx b/testtools/source/bridgetest/cli/cli_cpp_bridgetest.cxx index 7d08eab..c2e7bda 100644 --- a/testtools/source/bridgetest/cli/cli_cpp_bridgetest.cxx +++ b/testtools/source/bridgetest/cli/cli_cpp_bridgetest.cxx @@ -799,7 +799,7 @@ static bool raiseException(XBridgeTest* xLBT ) bRet = performQueryForUnknownType( xLBT ) && bRet; if (! bRet) { -throw unoidl::com::sun::star::uno::RuntimeException( +throw new unoidl::com::sun::star::uno::RuntimeException( new String("error: test failed!"), 0); } } @@ -819,7 +819,7 @@ static bool raiseException(XBridgeTest* xLBT ) { if (args->Length < 1) { -throw RuntimeException( +throw new RuntimeException( "missing argument for bridgetest!", this ); } Object* test_obj = @@ -846,7 +846,7 @@ static bool raiseException(XBridgeTest* xLBT ) s->Append(exc->GetType()->Name); s->Append(S"\n Message: "); s->Append(exc->Message); -throw unoidl::com::sun::star::uno::RuntimeException( +throw new unoidl::com::sun::star::uno::RuntimeException( s->ToString(), 0); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits