loolwsd/test/TileCacheTests.cpp | 2 +- loolwsd/test/httpwstest.cpp | 22 ++-------------------- 2 files changed, 3 insertions(+), 21 deletions(-)
New commits: commit 0ec7b0e889a5261e117c94054f93f880e7cd5f6c Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> Date: Sat Oct 8 12:38:11 2016 -0400 loolwsd: unittest cleanup Change-Id: Id1816656bda88086779fad73b7e18fecf8892e41 Reviewed-on: https://gerrit.libreoffice.org/29631 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/loolwsd/test/TileCacheTests.cpp b/loolwsd/test/TileCacheTests.cpp index 72d5d1a..c504094 100644 --- a/loolwsd/test/TileCacheTests.cpp +++ b/loolwsd/test/TileCacheTests.cpp @@ -539,7 +539,7 @@ void TileCacheTests::testTileInvalidateWriter() void TileCacheTests::testTileInvalidateWriterPage() { - const auto testname = "tileInvalidateWriterPage"; + const auto testname = "tileInvalidateWriterPage "; std::string documentPath, documentURL; getDocumentPathAndURL("empty.odt", documentPath, documentURL); diff --git a/loolwsd/test/httpwstest.cpp b/loolwsd/test/httpwstest.cpp index 36d742a..2f4179a 100644 --- a/loolwsd/test/httpwstest.cpp +++ b/loolwsd/test/httpwstest.cpp @@ -405,26 +405,8 @@ void HTTPWSTest::testBadLoad() // Before loading request status. sendTextFrame(socket, "status"); - int flags; - int n; - do - { - char buffer[READ_BUFFER_SIZE]; - n = socket.receiveFrame(buffer, sizeof(buffer), flags); - std::cout << "Got " << n << " bytes, flags: " << std::hex << flags << std::dec << std::endl; - if (n > 0 && (flags & Poco::Net::WebSocket::FRAME_OP_BITMASK) != Poco::Net::WebSocket::FRAME_OP_CLOSE) - { - std::cout << "Received message: " << LOOLProtocol::getAbbreviatedMessage(buffer, n) << std::endl; - const std::string line = LOOLProtocol::getFirstLine(buffer, n); - - if (LOOLProtocol::getFirstToken(buffer, n) == "statusindicator:") - continue; - - CPPUNIT_ASSERT_EQUAL(std::string("error: cmd=status kind=nodocloaded"), line); - break; - } - } - while (n > 0 && (flags & Poco::Net::WebSocket::FRAME_OP_BITMASK) != Poco::Net::WebSocket::FRAME_OP_CLOSE); + const auto line = assertResponseLine(socket, "error:"); + CPPUNIT_ASSERT_EQUAL(std::string("error: cmd=status kind=nodocloaded"), line); } catch (const Poco::Exception& exc) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits