Change some cppunit assertion messages to match what is actually being asserted

If you can't come up with a meaningful message to use in a
CPPUNIT_ASSERT_MESSAGE(), just use CPPUNIT_ASSERT() instead. These
messages aren't intended for end-users but for developers, so it is
pointless to make them high-level and dumbed-down.
This commit is contained in:
Tor Lillqvist 2016-04-13 09:56:14 +03:00
parent 8f9d812806
commit 8f3ec463b8

View file

@ -593,7 +593,7 @@ void HTTPWSTest::testPasswordProtectedDocumentWithoutPassword()
std::string response;
getResponseMessage(socket, "error:", response, true);
CPPUNIT_ASSERT_MESSAGE("failed command load: ", !response.empty());
CPPUNIT_ASSERT_MESSAGE("did not receive an error: message as expected", !response.empty());
{
Poco::StringTokenizer tokens(response, " ", Poco::StringTokenizer::TOK_IGNORE_EMPTY | Poco::StringTokenizer::TOK_TRIM);
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(2), tokens.count());
@ -634,7 +634,7 @@ void HTTPWSTest::testPasswordProtectedDocumentWithWrongPassword()
std::string response;
getResponseMessage(socket, "error:", response, true);
CPPUNIT_ASSERT_MESSAGE("failed command load: ", !response.empty());
CPPUNIT_ASSERT_MESSAGE("did not receive an error: message as expected", !response.empty());
{
Poco::StringTokenizer tokens(response, " ", Poco::StringTokenizer::TOK_IGNORE_EMPTY | Poco::StringTokenizer::TOK_TRIM);
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(2), tokens.count());
@ -713,7 +713,7 @@ void HTTPWSTest::testImpressPartCountChanged()
std::string response;
getResponseMessage(socket, "status:", response, true);
CPPUNIT_ASSERT_MESSAGE("failed command status: ", !response.empty());
CPPUNIT_ASSERT_MESSAGE("did not receive a status: message as expected", !response.empty());
{
Poco::StringTokenizer tokens(response, " ", Poco::StringTokenizer::TOK_IGNORE_EMPTY | Poco::StringTokenizer::TOK_TRIM);
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(5), tokens.count());
@ -730,7 +730,7 @@ void HTTPWSTest::testImpressPartCountChanged()
{
sendTextFrame(socket, "uno .uno:InsertPage");
getResponseMessage(socket, "partscountchanged:", response, false);
CPPUNIT_ASSERT_MESSAGE("failed command partscountchanged: ", !response.empty());
CPPUNIT_ASSERT_MESSAGE("did not receive a partscountchanged: message as expected", !response.empty());
{
Poco::JSON::Parser parser;
Poco::Dynamic::Var result = parser.parse(response);
@ -744,7 +744,7 @@ void HTTPWSTest::testImpressPartCountChanged()
{
sendTextFrame(socket, "uno .uno:DeletePage");
getResponseMessage(socket, "partscountchanged:", response, false);
CPPUNIT_ASSERT_MESSAGE("failed command partscountchanged: ", !response.empty());
CPPUNIT_ASSERT_MESSAGE("did not receive a partscountchanged: message as expected", !response.empty());
{
Poco::JSON::Parser parser;
Poco::Dynamic::Var result = parser.parse(response);
@ -758,7 +758,7 @@ void HTTPWSTest::testImpressPartCountChanged()
{
sendTextFrame(socket, "uno .uno:Undo");
getResponseMessage(socket, "partscountchanged:", response, false);
CPPUNIT_ASSERT_MESSAGE("failed command partscountchanged: ", !response.empty());
CPPUNIT_ASSERT_MESSAGE("did not receive a partscountchanged: message as expected", !response.empty());
{
Poco::JSON::Parser parser;
Poco::Dynamic::Var result = parser.parse(response);
@ -772,7 +772,7 @@ void HTTPWSTest::testImpressPartCountChanged()
{
sendTextFrame(socket, "uno .uno:Redo");
getResponseMessage(socket, "partscountchanged:", response, false);
CPPUNIT_ASSERT_MESSAGE("failed command partscountchanged: ", !response.empty());
CPPUNIT_ASSERT_MESSAGE("did not receive a partscountchanged: message as expected", !response.empty());
{
Poco::JSON::Parser parser;
Poco::Dynamic::Var result = parser.parse(response);