From f016f9016f5139791d544b5e5aa2ac438227b735 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Wed, 5 Aug 2020 21:12:44 +0200 Subject: unotest: one Resetter is enough It seems all 3 places derive from unotest::MacrosTest, so extract the common code there. Change-Id: I71a2474a7d6b1623f50575f9e9c43580ba076330 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100185 Tested-by: Jenkins Reviewed-by: Miklos Vajna --- xmlsecurity/qa/unit/signing/signing.cxx | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'xmlsecurity') diff --git a/xmlsecurity/qa/unit/signing/signing.cxx b/xmlsecurity/qa/unit/signing/signing.cxx index ec17d7a82d78..a62dbd096aa0 100644 --- a/xmlsecurity/qa/unit/signing/signing.cxx +++ b/xmlsecurity/qa/unit/signing/signing.cxx @@ -1221,33 +1221,6 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testDropMacroTemplateSignature) SignatureState::NOSIGNATURES, ODFVER_013_TEXT); } -namespace -{ -class Resetter -{ -private: - std::function m_Func; - -public: - Resetter(std::function const& rFunc) - : m_Func(rFunc) - { - } - ~Resetter() - { - try - { - m_Func(); - } - catch (...) // has to be reliable - { - fprintf(stderr, "resetter failed with exception\n"); - abort(); - } - } -}; -} - /// Test if a macro signature from a OTT 1.0 template is preserved for ODT 1.0 CPPUNIT_TEST_FIXTURE(SigningTest, testPreserveMacroTemplateSignature10) { -- cgit