diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-03-20 10:48:44 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-03-20 12:07:16 +0100 |
commit | d833ab988bab6ca1a239c045eb236cafddda0e73 (patch) | |
tree | dd47d9e90ddaebd0b5cfb1c493881220d70e1a57 /sw/qa/api/SwXTextTable.cxx | |
parent | f7efe5a7fe8ade48fe376eb817017b26892f95b3 (diff) |
Extract testDisposedByDesktopTerminate from CppunitTest_sw_apitests
It is not guaranteed that SwXTextTable runs last during CppunitTest_sw_apitests,
and e.g. building with --enable-lto on Linux caused SwXTextField to be run after
SwXTextTable. But then testDisposedByDesktopTerminate had already shut down all
the relevant global state, so the SwXTextField tests would fail.
TerminateTest is a faithful copy of the original SwXTextTable
testDisposedByDesktopTerminate behavior, but I do not know how much of that (if
anything at all) is actually test-worthy. (For example, parts of
TerminateTest::init may not be relevant, or the original SwXTextTable
testDisposedByDesktopTerminate may even only have been there to clean up after
other tests and not to actually test anything by itself, cf.
20ed81fd42cf8079c11c2b18973b9504a679e49c "Make individual tests clean up after
themselves".)
Change-Id: Ib95b7fa6888f55a27236a779c453a6d04122a527
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90774
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw/qa/api/SwXTextTable.cxx')
-rw-r--r-- | sw/qa/api/SwXTextTable.cxx | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/sw/qa/api/SwXTextTable.cxx b/sw/qa/api/SwXTextTable.cxx index ed1bc0670251..37c8600653a4 100644 --- a/sw/qa/api/SwXTextTable.cxx +++ b/sw/qa/api/SwXTextTable.cxx @@ -44,7 +44,6 @@ struct SwXTextTable final : public test::BootstrapFixture, CPPUNIT_TEST_SUITE(SwXTextTable); CPPUNIT_TEST(testAddEventListener); CPPUNIT_TEST(testRemoveEventListener); - CPPUNIT_TEST(testDisposedByDesktopTerminate); CPPUNIT_TEST_SUITE_END(); private: @@ -62,13 +61,7 @@ void SwXTextTable::tearDown() { if (component_.is()) { - try - { - component_->dispose(); - } - catch (css::lang::DisposedException&) // thrown by testDisposedByDesktopTerminate - { - } + component_->dispose(); } } |