Closed
Bug 996070
Opened 10 years ago
Closed 10 years ago
APZ gtests use EXPECT_EQ backwards
Categories
(Core :: Panning and Zooming, defect)
Core
Panning and Zooming
Tracking
()
RESOLVED
FIXED
mozilla31
People
(Reporter: botond, Assigned: botond)
Details
Attachments
(1 file)
10.65 KB,
patch
|
kats
:
review+
|
Details | Diff | Splinter Review |
The APZ gtests (gfc/tests/gtest/TestAsyncPanZoomController.cpp) use gtest's EXPECT_EQ macro for assertions. The signature of this macro is "EXPECT_EQ(expected, actual)", that is, the first argument is the expected value being tested against, and the second argument is the value being tested. These tests, however, use the macro backwards. For example, in ApzcPan(), we have an assertion of the form: EXPECT_EQ(status, touchMoveStatus); Here, 'touchMoveStatus' is the status we're expecting, and 'status' is the actual return value of ReceiveInputEvent(), so the assertion should instead be written: EXPECT_EQ(touchMoveStatus, status); This matters because the test harness presents assertion failures like so: /home/botond/dev/mozilla/central/gfx/tests/gtest/TestAsyncPanZoomController.cpp:215: Failure Value of: touchMoveStatus Actual: 0 Expected: status Which is: 1 'Actual' and 'Expected' being backwards here can be really confusing to someone trying to debug a test failure.
Assignee | ||
Comment 1•10 years ago
|
||
Assignee: nobody → botond
Attachment #8407138 -
Flags: review?(bugmail.mozilla)
Updated•10 years ago
|
Attachment #8407138 -
Flags: review?(bugmail.mozilla) → review+
Assignee | ||
Comment 2•10 years ago
|
||
landing |
https://hg.mozilla.org/integration/mozilla-inbound/rev/bfb975c73a50
Comment 3•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/bfb975c73a50
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
You need to log in
before you can comment on or make changes to this bug.
Description
•