loolwsd/test/httpwstest.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)
New commits: commit 8c2446d15bc60594b35c51155198d1b9621b2376 Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Fri Sep 30 09:42:12 2016 +0200 Revert "httpwstest: add tolerance, so that testCursorPosition actually passes" This reverts commit 3629113e5978ea26f8222e79a372aef807fab8fb. This workaround is no longer needed, now that core.git b32b6c09d190effbe29389a87a80df36007d2e99 (sw lok: disable pixel alignment of cursor logic values, 2016-09-29) fixed the root cause. Change-Id: I208e18517158cf55b143d1018ad0fd933db3accf diff --git a/loolwsd/test/httpwstest.cpp b/loolwsd/test/httpwstest.cpp index dcb9b42..37f803d 100644 --- a/loolwsd/test/httpwstest.cpp +++ b/loolwsd/test/httpwstest.cpp @@ -15,7 +15,6 @@ #include <thread> #include <regex> #include <vector> -#include <string> #include <Poco/Dynamic/Var.h> #include <Poco/FileStream.h> @@ -2200,12 +2199,11 @@ void HTTPWSTest::testCursorPosition() Poco::StringTokenizer viewTokens(command->get("rectangle").toString(), ",", Poco::StringTokenizer::TOK_IGNORE_EMPTY | Poco::StringTokenizer::TOK_TRIM); CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(4), viewTokens.count()); - // check both cursor should be equal (but tolerate at most 2px -> 30 twips differences) - const int tolerance = 30; - CPPUNIT_ASSERT(std::abs(std::stoi(cursorTokens[0]) - std::stoi(viewTokens[0])) < tolerance); - CPPUNIT_ASSERT(std::abs(std::stoi(cursorTokens[1]) - std::stoi(viewTokens[1])) < tolerance); - CPPUNIT_ASSERT(std::abs(std::stoi(cursorTokens[2]) - std::stoi(viewTokens[2])) < tolerance); - CPPUNIT_ASSERT(std::abs(std::stoi(cursorTokens[3]) - std::stoi(viewTokens[3])) < tolerance); + // check both cursor should be equal + CPPUNIT_ASSERT_EQUAL(cursorTokens[0], viewTokens[0]); + CPPUNIT_ASSERT_EQUAL(cursorTokens[1], viewTokens[1]); + CPPUNIT_ASSERT_EQUAL(cursorTokens[2], viewTokens[2]); + CPPUNIT_ASSERT_EQUAL(cursorTokens[3], viewTokens[3]); } catch (const Poco::Exception& exc) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits