vcl/qa/cppunit/outdev.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 2a548383d7a8772e19652a2830db7b2ce009f0af
Author:     Chris Sherlock <chris.sherloc...@gmail.com>
AuthorDate: Fri Oct 8 08:23:23 2021 +1100
Commit:     Tomaž Vajngerl <qui...@gmail.com>
CommitDate: Mon Oct 11 11:54:50 2021 +0200

    vcl: fix issue in testErase()
    
    Funnily enough, this *could* still be a valid test because
    SetOutputSizePixel() acutally triggers an Erase(). But that's not really
    the point, the test is brittle because we possibly may remove the Erase
    from that function one day.
    
    This sets the actions we test to the *second*, explicit Erase we are
    actually testing.
    
    Change-Id: Ib0bb4693a90ad2a4756f93a8933db95d337950c0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123236
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <qui...@gmail.com>

diff --git a/vcl/qa/cppunit/outdev.cxx b/vcl/qa/cppunit/outdev.cxx
index 351392362ed6..b360dfec9336 100644
--- a/vcl/qa/cppunit/outdev.cxx
+++ b/vcl/qa/cppunit/outdev.cxx
@@ -1055,18 +1055,18 @@ void VclOutdevTest::testErase()
     CPPUNIT_ASSERT_EQUAL_MESSAGE("Not a line color action (start)", 
MetaActionType::LINECOLOR,
                                  pAction->GetType());
 
-    pAction = aMtf.GetAction(1);
+    pAction = aMtf.GetAction(INITIAL_SETUP_ACTION_COUNT + 1);
     CPPUNIT_ASSERT_EQUAL_MESSAGE("Not a fill color action (start)", 
MetaActionType::FILLCOLOR,
                                  pAction->GetType());
 
-    pAction = aMtf.GetAction(2);
+    pAction = aMtf.GetAction(INITIAL_SETUP_ACTION_COUNT + 2);
     CPPUNIT_ASSERT_EQUAL_MESSAGE("Not a rect action", MetaActionType::RECT, 
pAction->GetType());
 
-    pAction = aMtf.GetAction(3);
+    pAction = aMtf.GetAction(INITIAL_SETUP_ACTION_COUNT + 3);
     CPPUNIT_ASSERT_EQUAL_MESSAGE("Not a line color action (end)", 
MetaActionType::LINECOLOR,
                                  pAction->GetType());
 
-    pAction = aMtf.GetAction(4);
+    pAction = aMtf.GetAction(INITIAL_SETUP_ACTION_COUNT + 4);
     CPPUNIT_ASSERT_EQUAL_MESSAGE("Not a fill color action (end)", 
MetaActionType::FILLCOLOR,
                                  pAction->GetType());
 }

Reply via email to