From b5c1485ac9a1c8bd65c12ee579f05cd140dc1219 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 26 Feb 2016 08:53:43 +0100 Subject: Improve failure output Change-Id: Ia542ab0644611ff8e36c8b52138e1ef064972606 --- xmlsecurity/qa/unit/signing/signing.cxx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'xmlsecurity') 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 + +#include + #include #include @@ -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(pObjectShell->GetDocumentSignatureState()); - CPPUNIT_ASSERT(nActual == static_cast(SignatureState::NOTVALIDATED) || nActual == static_cast(SignatureState::PARTIAL_OK)); + SignatureState nActual = pObjectShell->GetDocumentSignatureState(); + CPPUNIT_ASSERT_MESSAGE( + (OString::number( + static_cast::type>( + nActual)) + .getStr()), + (nActual == SignatureState::NOTVALIDATED + || nActual == SignatureState::PARTIAL_OK)); } void SigningTest::testOOXMLBroken() -- cgit