[Libreoffice-commits] online.git: loolwsd/test
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Fri Apr 29 03:40:33 UTC 2016
loolwsd/test/httpwstest.cpp | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
New commits:
commit 0e4c624f0b8dda80e1a0c4f848a35de8826d453e
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Thu Apr 28 23:33:24 2016 -0400
loolwsd: minor improvement to test assertions
Change-Id: I40da725919ae775d039217c258ecd28a743b5bc1
Reviewed-on: https://gerrit.libreoffice.org/24484
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/loolwsd/test/httpwstest.cpp b/loolwsd/test/httpwstest.cpp
index e052b99..1880ab6 100644
--- a/loolwsd/test/httpwstest.cpp
+++ b/loolwsd/test/httpwstest.cpp
@@ -232,27 +232,27 @@ void HTTPWSTest::testHandShake()
socket.setReceiveTimeout(0);
bytes = socket.receiveFrame(buffer, sizeof(buffer), flags);
CPPUNIT_ASSERT_EQUAL(std::string(payload), std::string(buffer, bytes));
- CPPUNIT_ASSERT(flags == Poco::Net::WebSocket::FRAME_TEXT);
+ CPPUNIT_ASSERT_EQUAL(static_cast<int>(Poco::Net::WebSocket::FRAME_TEXT), flags);
bytes = socket.receiveFrame(buffer, sizeof(buffer), flags);
if (!std::strstr(buffer, fail))
{
payload = "statusindicator: connect";
CPPUNIT_ASSERT_EQUAL(payload, std::string(buffer, bytes));
- CPPUNIT_ASSERT(flags == Poco::Net::WebSocket::FRAME_TEXT);
+ CPPUNIT_ASSERT_EQUAL(static_cast<int>(Poco::Net::WebSocket::FRAME_TEXT), flags);
bytes = socket.receiveFrame(buffer, sizeof(buffer), flags);
if (!std::strstr(buffer, fail))
{
payload = "statusindicator: ready";
CPPUNIT_ASSERT_EQUAL(payload, std::string(buffer, bytes));
- CPPUNIT_ASSERT(flags == Poco::Net::WebSocket::FRAME_TEXT);
+ CPPUNIT_ASSERT_EQUAL(static_cast<int>(Poco::Net::WebSocket::FRAME_TEXT), flags);
}
else
{
// check error message
CPPUNIT_ASSERT(std::strstr(buffer, SERVICE_UNAVALABLE_INTERNAL_ERROR) != nullptr);
- CPPUNIT_ASSERT(flags == Poco::Net::WebSocket::FRAME_TEXT);
+ CPPUNIT_ASSERT_EQUAL(static_cast<int>(Poco::Net::WebSocket::FRAME_TEXT), flags);
// close frame message
bytes = socket.receiveFrame(buffer, sizeof(buffer), flags);
@@ -264,7 +264,7 @@ void HTTPWSTest::testHandShake()
{
// check error message
CPPUNIT_ASSERT(std::strstr(buffer, SERVICE_UNAVALABLE_INTERNAL_ERROR) != nullptr);
- CPPUNIT_ASSERT(flags == Poco::Net::WebSocket::FRAME_TEXT);
+ CPPUNIT_ASSERT_EQUAL(static_cast<int>(Poco::Net::WebSocket::FRAME_TEXT), flags);
// close frame message
bytes = socket.receiveFrame(buffer, sizeof(buffer), flags);
More information about the Libreoffice-commits
mailing list