diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-02-26 08:53:43 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-02-26 08:53:43 +0100 |
commit | b5c1485ac9a1c8bd65c12ee579f05cd140dc1219 (patch) | |
tree | ae1765d8ee7a8b9cbb56466095379e2741193d5c /xmlsecurity | |
parent | 6d4eb665825db37d735d5906af691fd31345a1e0 (diff) |
Improve failure output
Change-Id: Ia542ab0644611ff8e36c8b52138e1ef064972606
Diffstat (limited to 'xmlsecurity')
-rw-r--r-- | xmlsecurity/qa/unit/signing/signing.cxx | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/xmlsecurity/qa/unit/signing/signing.cxx b/xmlsecurity/qa/unit/signing/signing.cxx index ce69d2701b05..033e7b9f3d73 100644 --- a/xmlsecurity/qa/unit/signing/signing.cxx +++ b/xmlsecurity/qa/unit/signing/signing.cxx @@ -7,6 +7,10 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include <sal/config.h> + +#include <type_traits> + #include <test/bootstrapfixture.hxx> #include <unotest/macros_test.hxx> @@ -196,8 +200,14 @@ void SigningTest::testOOXMLPartial() CPPUNIT_ASSERT(pObjectShell); // This was SignatureState::BROKEN due to missing RelationshipTransform and SHA-256 support. // We expect NOTVALIDATED in case the root CA is not imported on the system, and PARTIAL_OK otherwise, so accept both. - int nActual = static_cast<int>(pObjectShell->GetDocumentSignatureState()); - CPPUNIT_ASSERT(nActual == static_cast<int>(SignatureState::NOTVALIDATED) || nActual == static_cast<int>(SignatureState::PARTIAL_OK)); + SignatureState nActual = pObjectShell->GetDocumentSignatureState(); + CPPUNIT_ASSERT_MESSAGE( + (OString::number( + static_cast<typename std::underlying_type<SignatureState>::type>( + nActual)) + .getStr()), + (nActual == SignatureState::NOTVALIDATED + || nActual == SignatureState::PARTIAL_OK)); } void SigningTest::testOOXMLBroken() |