[Libreoffice-commits] online.git: test/TileCacheTests.cpp

Michael Meeks michael.meeks at collabora.com
Fri May 18 13:33:15 UTC 2018


 test/TileCacheTests.cpp |   10 ++++++++++
 1 file changed, 10 insertions(+)

New commits:
commit ed87891d284f0ac37b0ecdfcffe7657ed081d28c
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Fri May 18 14:32:26 2018 +0100

    Make PNG tile tests more robust.
    
    Change-Id: Id7afcfe9b29b2d5544e296b13f04c195d35655b5

diff --git a/test/TileCacheTests.cpp b/test/TileCacheTests.cpp
index 4d1bde30d..10d8ba648 100644
--- a/test/TileCacheTests.cpp
+++ b/test/TileCacheTests.cpp
@@ -698,6 +698,10 @@ void TileCacheTests::testLoad12ods()
     {
         CPPUNIT_FAIL(exc.displayText());
     }
+    catch (...)
+    {
+        CPPUNIT_FAIL("Unexpected exception thrown during ods load");
+    }
 }
 
 void TileCacheTests::checkBlackTile(std::stringstream& tile)
@@ -742,6 +746,12 @@ void TileCacheTests::checkBlackTiles(std::shared_ptr<LOOLWebSocket>& socket, con
     sendTextFrame(socket, req);
 
     const std::vector<char> tile = getResponseMessage(socket, "tile:", name);
+    if (!tile.size())
+    {
+        CPPUNIT_FAIL("No tile returned to checkBlackTiles - failed load ?");
+        return;
+    }
+
     const std::string firstLine = LOOLProtocol::getFirstLine(tile);
 
 #if 0


More information about the Libreoffice-commits mailing list