[Libreoffice-commits] online.git: test/countloolkits.hpp test/httpwstest.cpp
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Mon Jan 9 06:23:45 UTC 2017
test/countloolkits.hpp | 8 ++++++++
test/httpwstest.cpp | 6 ++++--
2 files changed, 12 insertions(+), 2 deletions(-)
New commits:
commit e232ffcdf9f57f019438ab3a95b154f629dfa554
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Sun Jan 8 21:11:50 2017 -0500
wsd: log unittest duration
Change-Id: I12ed5b3bb776e0dc562dfdddb1d6ffc7f0aedf31
Reviewed-on: https://gerrit.libreoffice.org/32868
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/test/countloolkits.hpp b/test/countloolkits.hpp
index a746024..a652bfd 100644
--- a/test/countloolkits.hpp
+++ b/test/countloolkits.hpp
@@ -119,17 +119,25 @@ static int countLoolKitProcesses(const int expected)
// it will cause testNoExtraLoolKitsLeft to
// wait unnecessarily and fail.
static int InitialLoolKitCount = 1;
+static std::chrono::steady_clock::time_point TestStartTime;
static void testCountHowManyLoolkits()
{
InitialLoolKitCount = countLoolKitProcesses(InitialLoolKitCount);
CPPUNIT_ASSERT(InitialLoolKitCount > 0);
+
+ TestStartTime = std::chrono::steady_clock::now();
}
static void testNoExtraLoolKitsLeft()
{
const auto countNow = countLoolKitProcesses(InitialLoolKitCount);
CPPUNIT_ASSERT_EQUAL(InitialLoolKitCount, countNow);
+
+ const auto duration = (std::chrono::steady_clock::now() - TestStartTime);
+ const auto durationMs = std::chrono::duration_cast<std::chrono::milliseconds>(duration).count();
+
+ std::cout << " (" << durationMs << " ms)";
}
#endif
diff --git a/test/httpwstest.cpp b/test/httpwstest.cpp
index 552f085..99abe35 100644
--- a/test/httpwstest.cpp
+++ b/test/httpwstest.cpp
@@ -2072,8 +2072,6 @@ void HTTPWSTest::testEachView(const std::string& doc, const std::string& type,
{
CPPUNIT_FAIL(exc.displayText());
}
-
- testNoExtraLoolKitsLeft();
}
void HTTPWSTest::testInvalidateViewCursor()
@@ -2094,7 +2092,11 @@ void HTTPWSTest::testCellViewCursor()
void HTTPWSTest::testGraphicViewSelection()
{
testEachView("graphicviewselection.odp", "presentation", "graphicselection:", "graphicviewselection:", "graphicViewSelection-odp ");
+
+ CPPUNIT_ASSERT_EQUAL(InitialLoolKitCount, countLoolKitProcesses(InitialLoolKitCount));
testEachView("graphicviewselection.odt", "text", "graphicselection:", "graphicviewselection:", "graphicViewSelection-odt ");
+
+ CPPUNIT_ASSERT_EQUAL(InitialLoolKitCount, countLoolKitProcesses(InitialLoolKitCount));
testEachView("graphicviewselection.ods", "spreadsheet", "graphicselection:", "graphicviewselection:", "graphicViewSelection-ods ");
}
More information about the Libreoffice-commits
mailing list