summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-09-26 16:53:07 +0200
committerMiklos Vajna <vmiklos@collabora.com>2019-09-26 20:46:47 +0200
commitb710b4fa9f243e81c905567bb6712ceb96a56943 (patch)
tree034dfd4875f56568f51edd9193e11e8a1769f906 /sw
parent89f0107b8de21bbb22e850847348ab40cce24644 (diff)
CppunitTest_sw_uiwriter: improve limit in testTdf105330
The problem was that the cursor was invisible. I thought that we can assert that the cursor height is 12pt + the linespacing (276 twips), but turns out the exact value is subject to pixel-alignment, so it's not a good test to require equality. Instead, make sure that the height is at least the 12pt, which is explicitly defined in the document. That fails without the fix, and is a saner limit. Change-Id: I4f9f512542cefc6fa20d6fdf02e9eb5d2e1c1d5e Reviewed-on: https://gerrit.libreoffice.org/79636 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/uiwriter/uiwriter2.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx b/sw/qa/extras/uiwriter/uiwriter2.cxx
index 5ac978713b17..fd9bee5280d7 100644
--- a/sw/qa/extras/uiwriter/uiwriter2.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter2.cxx
@@ -2247,10 +2247,10 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf105330)
sw::UndoManager& rUndoManager = pDoc->GetUndoManager();
rUndoManager.Undo();
- // Without the accompanying fix in place, height was only 1 twips (practically invisible), with
- // the fix in place it is seen to be either 271 or 276 for different builds:
+ // Without the accompanying fix in place, height was only 1 twips (practically invisible).
+ // Require at least 12pt height (font size under the cursor), in twips.
CPPUNIT_ASSERT_GREATEREQUAL(
- static_cast<long>(271),
+ static_cast<long>(240),
pWrtShell->GetVisibleCursor()->GetTextCursor().GetSize().getHeight());
}