~compiz-team/compiz/compiz.fix_1120009

« back to all changes in this revision

Viewing changes to plugins/resize/src/logic/tests/test-logic.cpp

  • Committer: Tarmac
  • Author(s): Daniel van Vugt
  • Date: 2013-01-09 08:38:15 UTC
  • mfrom: (3549.1.1 resize)
  • Revision ID: tarmac-20130109083815-6g6wjgwqaocp7zgd
Fix multiple errors reported by valgrind in compiz_test_resize_logic
"Conditional jump or move depends on uninitialised value(s)"
(LP: #1097179). Fixes: https://bugs.launchpad.net/bugs/1097179.

Approved by Sam Spilsbury.

Show diffs side-by-side

added added

removed removed

Lines of Context:
90
90
        EXPECT_CALL (mockWindow, state ())
91
91
            .WillRepeatedly (ReturnPointee (&mockWindowState));
92
92
 
 
93
        mockWindowBorder.left = 1;
 
94
        mockWindowBorder.right = 2;
 
95
        mockWindowBorder.top = 3;
 
96
        mockWindowBorder.bottom = 4;
93
97
        EXPECT_CALL (mockWindow, border ())
94
98
            .WillRepeatedly (ReturnRef (mockWindowBorder));
95
99
 
144
148
        EXPECT_CALL (mockScreen, compositingActive ())
145
149
            .WillRepeatedly (Return (true));
146
150
 
147
 
        EXPECT_CALL (mockScreen, damageRegion (_));
148
 
 
149
151
        EXPECT_CALL (mockScreen, syncEvent ())
150
152
            .WillRepeatedly (Return (-XSyncAlarmNotify));
151
153
 
178
180
    {
179
181
        logic.resizeInformationAtom = &fakePropWriter;
180
182
        logic.mScreen = &mockScreen;
181
 
        logic.cScreen = &mockScreen;
 
183
        logic.cScreen = NULL;   // avoid entering CompositeScreen during tests
182
184
        logic.gScreen = &mockScreen;
183
185
        logic.options = &resizeOptions;
184
186
    }