From ee5cc8bf8b5fc71abde85f8fb255146637fd6e11 Mon Sep 17 00:00:00 2001 From: Pascal Potvin <pascal.potvin@extenway.com> Date: Mon, 9 Jun 2014 16:17:10 -0400 Subject: [PATCH] daemon/test: give a message when testParseDisplayName fails When one instance of the testParseDisplayName testcase failed, the following generic message would be shown: str == t[1] This generic message makes it impossible to know which of the test strings triggered the failure. CPPUNIT_ASSERT_MESSAGE is now used instead of CCPUNIT_ASSERT to provide a more verbose message. Refs #49115 Change-Id: I136ab2bc83f1103a95dc6f42ca545d7bf9edf244 Signed-off-by: Pascal Potvin <pascal.potvin@extenway.com> --- daemon/test/siptest.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/daemon/test/siptest.cpp b/daemon/test/siptest.cpp index 07607b4eb8..2ff65f971c 100644 --- a/daemon/test/siptest.cpp +++ b/daemon/test/siptest.cpp @@ -389,7 +389,9 @@ void SIPTest::testParseDisplayName() for (const auto &t : test_set) { const std::string str(sip_utils::parseDisplayName(t[0])); - CPPUNIT_ASSERT(str == t[1]); + CPPUNIT_ASSERT_MESSAGE(std::string("\"") + str + "\" should be \"" + + t[1] + "\", input on next line: " + t[0], + str == t[1]); } } -- GitLab