Skip to content
Snippets Groups Projects
Commit ee5cc8bf authored by Pascal Potvin's avatar Pascal Potvin Committed by Tristan Matthews
Browse files

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: default avatarPascal Potvin <pascal.potvin@extenway.com>
parent 265c5b74
No related branches found
No related tags found
No related merge requests found
...@@ -389,7 +389,9 @@ void SIPTest::testParseDisplayName() ...@@ -389,7 +389,9 @@ void SIPTest::testParseDisplayName()
for (const auto &t : test_set) { for (const auto &t : test_set) {
const std::string str(sip_utils::parseDisplayName(t[0])); 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]);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment