layout_manager_test.js may not be able to detect failures due to incomplete data structure comparison

RESOLVED FIXED in 2.1 S9 (21Nov)

Status

Firefox OS
Gaia::Keyboard
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: mnjul, Assigned: mnjul)

Tracking

unspecified
2.1 S9 (21Nov)
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [p=1])

Attachments

(1 attachment)

+++ This bug was initially created as a clone of Bug #1070487 +++

In bug 1070487, the added deep-comparison code [1] can actually only test that the relation test -> expected is injective and not necessarily surjective, i.e. there might be some properties only present in expected[i][j] but not test[i][j], which should count as comparison failure, but which the test codes currently don't flag.

We need to fix it. I'll have to block bug 1094031 as I can't fix unit tests of that bug when this bug is still lingering around.

[1] https://github.com/mozilla-b2g/gaia/blob/master/apps/keyboard/test/unit/keyboard/layout_manager_test.js#L39-L50
Blocks: 1072191
Created attachment 8525173 [details] [review]
Patch (PR @ GitHub)

Tim, Rudy, any of you can take a little bit time to check the patch?

We've already got some false negative: my bug 1072191 removed {ratio: 1} from key objects but that wasn't picked up by the test script.
Assignee: nobody → jlu
Attachment #8525173 - Flags: review?(timdream)
Attachment #8525173 - Flags: review?(rlu)
Attachment #8525173 - Flags: review?(timdream)
Attachment #8525173 - Flags: review?(rlu)
Attachment #8525173 - Flags: review+
Master: https://github.com/mozilla-b2g/gaia/commit/5f4dee55c4fe62809797314069e925df8537cf50
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Whiteboard: [p=1]
Target Milestone: --- → 2.1 S9 (21Nov)
You need to log in before you can comment on or make changes to this bug.