summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpragat-pandya <pragat.pandya@gmail.com>2022-02-06 16:50:05 +0530
committerMike Kaganski <mike.kaganski@collabora.com>2022-02-28 22:21:28 +0100
commit73ef2f6f615b88ef25366f9073c5fb3db5e76687 (patch)
treea2a87219b802c8c3d5a8195bde6d6e7b115e483b
parent393e8d622e1ebea0eb2ac59274e7216819b7022b (diff)
tdf#139734 removing redundant asserts after MacrosTest::loadFromDesktop
Change-Id: I89ffa387464ce7cc43c1884b031d6fade5b85078 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129581 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r--dbaccess/qa/extras/rowsetclones.cxx3
-rw-r--r--dbaccess/qa/unit/dbtest_base.cxx4
-rw-r--r--sccomp/qa/unit/SwarmSolverTest.cxx10
3 files changed, 2 insertions, 15 deletions
diff --git a/dbaccess/qa/extras/rowsetclones.cxx b/dbaccess/qa/extras/rowsetclones.cxx
index 21a30636961b..d83d160ca132 100644
--- a/dbaccess/qa/extras/rowsetclones.cxx
+++ b/dbaccess/qa/extras/rowsetclones.cxx
@@ -51,8 +51,7 @@ void RowSetClones::test()
const OUString sFilePath(m_directories.getURLFromWorkdir(u"CppunitTest/RowSetClones.odb"));
uno::Reference< lang::XComponent > xComponent (loadFromDesktop(sFilePath));
- uno::Reference< XOfficeDatabaseDocument > xDocument(xComponent, UNO_QUERY);
- CPPUNIT_ASSERT(xDocument.is());
+ uno::Reference< XOfficeDatabaseDocument > xDocument(xComponent, UNO_QUERY_THROW);
uno::Reference< XDataSource > xDataSource = xDocument->getDataSource();
CPPUNIT_ASSERT(xDataSource.is());
diff --git a/dbaccess/qa/unit/dbtest_base.cxx b/dbaccess/qa/unit/dbtest_base.cxx
index c7992288cdbd..b5a3bd31cf90 100644
--- a/dbaccess/qa/unit/dbtest_base.cxx
+++ b/dbaccess/qa/unit/dbtest_base.cxx
@@ -67,9 +67,7 @@ uno::Reference< XOfficeDatabaseDocument >
uno::Reference<XOfficeDatabaseDocument> DBTestBase::getDocumentForUrl(OUString const & url) {
uno::Reference< lang::XComponent > xComponent (loadFromDesktop(url));
- uno::Reference< XOfficeDatabaseDocument > xDocument(xComponent, UNO_QUERY);
- CPPUNIT_ASSERT(xDocument.is());
-
+ uno::Reference< XOfficeDatabaseDocument > xDocument(xComponent, UNO_QUERY_THROW);
return xDocument;
}
diff --git a/sccomp/qa/unit/SwarmSolverTest.cxx b/sccomp/qa/unit/SwarmSolverTest.cxx
index 030822b9cdb4..966f9c673fc5 100644
--- a/sccomp/qa/unit/SwarmSolverTest.cxx
+++ b/sccomp/qa/unit/SwarmSolverTest.cxx
@@ -60,8 +60,6 @@ void SwarmSolverTest::testUnconstrained()
createFileURL(u"Simple.ods", aFileURL);
mxComponent = loadFromDesktop(aFileURL);
- CPPUNIT_ASSERT_MESSAGE("Component not loaded", mxComponent.is());
-
uno::Reference<sheet::XSpreadsheetDocument> xDocument(mxComponent, uno::UNO_QUERY_THROW);
uno::Reference<container::XIndexAccess> xIndex(xDocument->getSheets(), uno::UNO_QUERY_THROW);
uno::Reference<sheet::XSpreadsheet> xSheet(xIndex->getByIndex(0), uno::UNO_QUERY_THROW);
@@ -109,8 +107,6 @@ void SwarmSolverTest::testVariableBounded()
createFileURL(u"Simple.ods", aFileURL);
mxComponent = loadFromDesktop(aFileURL);
- CPPUNIT_ASSERT_MESSAGE("Component not loaded", mxComponent.is());
-
uno::Reference<sheet::XSpreadsheetDocument> xDocument(mxComponent, uno::UNO_QUERY_THROW);
uno::Reference<container::XIndexAccess> xIndex(xDocument->getSheets(), uno::UNO_QUERY_THROW);
uno::Reference<sheet::XSpreadsheet> xSheet(xIndex->getByIndex(0), uno::UNO_QUERY_THROW);
@@ -160,8 +156,6 @@ void SwarmSolverTest::testVariableConstrained()
createFileURL(u"Simple.ods", aFileURL);
mxComponent = loadFromDesktop(aFileURL);
- CPPUNIT_ASSERT_MESSAGE("Component not loaded", mxComponent.is());
-
uno::Reference<sheet::XSpreadsheetDocument> xDocument(mxComponent, uno::UNO_QUERY_THROW);
uno::Reference<container::XIndexAccess> xIndex(xDocument->getSheets(), uno::UNO_QUERY_THROW);
uno::Reference<sheet::XSpreadsheet> xSheet(xIndex->getByIndex(0), uno::UNO_QUERY_THROW);
@@ -214,8 +208,6 @@ void SwarmSolverTest::testTwoVariables()
createFileURL(u"TwoVariables.ods", aFileURL);
mxComponent = loadFromDesktop(aFileURL);
- CPPUNIT_ASSERT_MESSAGE("Component not loaded", mxComponent.is());
-
uno::Reference<sheet::XSpreadsheetDocument> xDocument(mxComponent, uno::UNO_QUERY_THROW);
uno::Reference<container::XIndexAccess> xIndex(xDocument->getSheets(), uno::UNO_QUERY_THROW);
uno::Reference<sheet::XSpreadsheet> xSheet(xIndex->getByIndex(0), uno::UNO_QUERY_THROW);
@@ -272,8 +264,6 @@ void SwarmSolverTest::testMultipleVariables()
createFileURL(u"MultiVariable.ods", aFileURL);
mxComponent = loadFromDesktop(aFileURL);
- CPPUNIT_ASSERT_MESSAGE("Component not loaded", mxComponent.is());
-
uno::Reference<sheet::XSpreadsheetDocument> xDocument(mxComponent, uno::UNO_QUERY_THROW);
uno::Reference<container::XIndexAccess> xIndex(xDocument->getSheets(), uno::UNO_QUERY_THROW);
uno::Reference<sheet::XSpreadsheet> xSheet(xIndex->getByIndex(0), uno::UNO_QUERY_THROW);