summaryrefslogtreecommitdiff
path: root/testtools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-02-14 16:09:48 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-02-15 14:17:00 +0000
commitc68b5c36cdadeedd47dfb68aee10c5df8513dbdc (patch)
tree9bb34709c316115a438694cacec6f1cb6b9753b4 /testtools
parent223bb798f6f1917b926aa2fb293709ef63725a64 (diff)
Some simplifications, using UNO_QUERY_THROW
Change-Id: Iaf7b4695e7930b8e7fa5dd3736d19744afb52fa3 Reviewed-on: https://gerrit.libreoffice.org/34254 Tested-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'testtools')
-rw-r--r--testtools/source/bridgetest/bridgetest.cxx6
-rw-r--r--testtools/source/performance/ubtest.cxx4
2 files changed, 2 insertions, 8 deletions
diff --git a/testtools/source/bridgetest/bridgetest.cxx b/testtools/source/bridgetest/bridgetest.cxx
index bc238c68be32..fede2dbfe426 100644
--- a/testtools/source/bridgetest/bridgetest.cxx
+++ b/testtools/source/bridgetest/bridgetest.cxx
@@ -1155,11 +1155,7 @@ sal_Int32 TestBridgeImpl::run( const Sequence< OUString > & rArgs )
{
throw RuntimeException( "cannot get test object!" );
}
- Reference< XBridgeTest > xTest( xOriginal, UNO_QUERY );
- if (! xTest.is())
- {
- throw RuntimeException( "test object does not implement XBridgeTest!" );
- }
+ Reference< XBridgeTest > xTest( xOriginal, UNO_QUERY_THROW );
Reference<XBridgeTest > xLBT;
bRet = check( makeSurrogate( xLBT, xTest ), "makeSurrogate" );
diff --git a/testtools/source/performance/ubtest.cxx b/testtools/source/performance/ubtest.cxx
index 5b1ebeed6d0d..acf09694c873 100644
--- a/testtools/source/performance/ubtest.cxx
+++ b/testtools/source/performance/ubtest.cxx
@@ -554,9 +554,7 @@ static void benchmark(
TimingSheet & rSheet, const Reference< XInterface > & xInstance, sal_Int64 nLoop )
throw (Exception)
{
- Reference< XPerformanceTest > xBench( xInstance, UNO_QUERY );
- if (! xBench.is())
- throw RuntimeException("illegal test object!" );
+ Reference< XPerformanceTest > xBench( xInstance, UNO_QUERY_THROW );
sal_Int64 i;
sal_uInt32 tStart, tEnd;