Kaydet (Commit) 0257f763 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

no need to catch exceptions in cppunit tests

The framework already catches exceptions and will fail the test.

Change-Id: I8adfb5033fe11f6fefb1799c044b0a5a0acf2cbb
üst 05400646
...@@ -117,27 +117,19 @@ uno::Reference< uno::XInterface > ScCellRangeObj::getXCellRangeData() ...@@ -117,27 +117,19 @@ uno::Reference< uno::XInterface > ScCellRangeObj::getXCellRangeData()
void ScCellRangeObj::testSortOOB() void ScCellRangeObj::testSortOOB()
{ {
uno::Reference<util::XSortable> xSortable(init(),UNO_QUERY_THROW); uno::Reference<util::XSortable> xSortable(init(),UNO_QUERY_THROW);
try { uno::Sequence<beans::PropertyValue> aEmptyDescriptor;
uno::Sequence<beans::PropertyValue> aEmptyDescriptor; xSortable->sort(aEmptyDescriptor);
xSortable->sort(aEmptyDescriptor);
} catch (const uno::Exception &) {
CPPUNIT_FAIL("exception thrown during empty sort");
}
try { uno::Sequence<beans::PropertyValue> aProps(1);
uno::Sequence<beans::PropertyValue> aProps(1); uno::Sequence<util::SortField> aSort(1);
uno::Sequence<util::SortField> aSort(1);
aSort[0].Field = 0xffffff; aSort[0].Field = 0xffffff;
aSort[0].SortAscending = true; aSort[0].SortAscending = true;
aProps[0].Name = "SortFields"; aProps[0].Name = "SortFields";
aProps[0].Value = uno::makeAny(aSort); aProps[0].Value = uno::makeAny(aSort);
xSortable->sort(aProps); xSortable->sort(aProps);
} catch (const uno::Exception &) {
CPPUNIT_FAIL("exception thrown during OOB sort");
}
} }
void ScCellRangeObj::setUp() void ScCellRangeObj::setUp()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment