Closed Bug 1295723 Opened 9 years ago Closed 8 years ago

Fix inverted logic in FuzzyCompare in TestBSPTree.cpp, and add a test that would've failed

Categories

(Core :: Graphics: Layers, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1301818
Tracking Status
firefox51 --- affected

People

(Reporter: dholbert, Unassigned)

References

Details

Attachments

(1 file)

Per discussion with Miko just now -- he noticed that the gtest TestBSPTree.cpp (added in bug 1292390) has some flipped logic in its FuzzyCompare function. Right now, FuzzyCompare returns true if *any* of the channels differ by more than |epsilon|. But I believe its intent is to return true if *none* of the channels differ by more than epsilon. Things to do in this bug: (1) Rename FuzzyCompare to IsFuzzyEqual (or something similar that makes the true/false semantics a bit more obvious.) (2) Fix the inverted logic. (3) Extend/fix the test code so that something would've failed with the old (inverted) implementation. (For some reason, right now, the test passes regardless of whether the logic is inverted, which suggests that something is broken or perhaps the test simply isn't as robust as it could be.)
Component: Layout → Graphics: Layers
(Here's a partial patch, just to fix the inverted logic -- part (2) from comment 0 here. I was initially going to just land this with rs=miko, but I think we need parts (1) and (3) as well. So: miko, please take this patch and broaden it to address those other parts, and get review from one of your bug 1292390 reviewers.)
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
(clearing assignee field, since this was duped to another bug)
Assignee: mikokm → nobody
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: