diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-12-21 15:20:38 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-12-22 01:17:44 +0100 |
commit | 0257f7638b266302af1fb5f8afa8c13a745d3da8 (patch) | |
tree | 93424f90cf8b1906bbbd484b27681fd50ddef71a | |
parent | 0540064629e974b0569379988936989701159fdb (diff) |
no need to catch exceptions in cppunit tests
The framework already catches exceptions and will fail the test.
Change-Id: I8adfb5033fe11f6fefb1799c044b0a5a0acf2cbb
-rw-r--r-- | sc/qa/extras/sccellrangeobj.cxx | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/sc/qa/extras/sccellrangeobj.cxx b/sc/qa/extras/sccellrangeobj.cxx index 12e2864212a5..3f619726f90c 100644 --- a/sc/qa/extras/sccellrangeobj.cxx +++ b/sc/qa/extras/sccellrangeobj.cxx @@ -117,27 +117,19 @@ uno::Reference< uno::XInterface > ScCellRangeObj::getXCellRangeData() void ScCellRangeObj::testSortOOB() { uno::Reference<util::XSortable> xSortable(init(),UNO_QUERY_THROW); - try { - uno::Sequence<beans::PropertyValue> aEmptyDescriptor; - xSortable->sort(aEmptyDescriptor); - } catch (const uno::Exception &) { - CPPUNIT_FAIL("exception thrown during empty sort"); - } + uno::Sequence<beans::PropertyValue> aEmptyDescriptor; + xSortable->sort(aEmptyDescriptor); - try { - uno::Sequence<beans::PropertyValue> aProps(1); - uno::Sequence<util::SortField> aSort(1); + uno::Sequence<beans::PropertyValue> aProps(1); + uno::Sequence<util::SortField> aSort(1); - aSort[0].Field = 0xffffff; - aSort[0].SortAscending = true; + aSort[0].Field = 0xffffff; + aSort[0].SortAscending = true; - aProps[0].Name = "SortFields"; - aProps[0].Value = uno::makeAny(aSort); + aProps[0].Name = "SortFields"; + aProps[0].Value = uno::makeAny(aSort); - xSortable->sort(aProps); - } catch (const uno::Exception &) { - CPPUNIT_FAIL("exception thrown during OOB sort"); - } + xSortable->sort(aProps); } void ScCellRangeObj::setUp() |