mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Tame a few tests that relied on pairs being somewhat deterministic (#6371)
* Mangle stupid defaults test so that it compares tables, and not a non-deterministic string representation of one. It's still extremely dumb and annoying to update. (i.e., feel free to kill it with fire in a subsequent PR, I think everybody would cheer). * Rewrite DepGraph to be deterministic i.e., fully array based, no more hashes, which means no more pairs randomly re-ordering stuff. Insertion order is now preserved. Pretty sure a couple of bugs have been fixed and/or added along the way ;p. * Resync frontend/apps/filemanager/lib/md.lua w/ upstream And use orderedPairs in the attribute parsing code, just to make that stupid test happy.
This commit is contained in:
@@ -145,11 +145,11 @@ describe("InputContainer widget", function()
|
||||
assert.is.same('readerfooter_tap', ic._ordered_touch_zones[1].def.id)
|
||||
assert.is.same('readerhighlight_tap', ic._ordered_touch_zones[2].def.id)
|
||||
assert.is.same('readermenu_tap', ic._ordered_touch_zones[3].def.id)
|
||||
assert.is.same('tap_backward', ic._ordered_touch_zones[4].def.id)
|
||||
assert.is.same('readerhighlight_hold_pan', ic._ordered_touch_zones[5].def.id)
|
||||
assert.is.same('tap_forward', ic._ordered_touch_zones[4].def.id)
|
||||
assert.is.same('tap_backward', ic._ordered_touch_zones[5].def.id)
|
||||
assert.is.same('readerfooter_hold', ic._ordered_touch_zones[6].def.id)
|
||||
assert.is.same('readerhighlight_hold', ic._ordered_touch_zones[7].def.id)
|
||||
assert.is.same('tap_forward', ic._ordered_touch_zones[8].def.id)
|
||||
assert.is.same('readerhighlight_hold_release', ic._ordered_touch_zones[9].def.id)
|
||||
assert.is.same('readerhighlight_hold_release', ic._ordered_touch_zones[8].def.id)
|
||||
assert.is.same('readerhighlight_hold_pan', ic._ordered_touch_zones[9].def.id)
|
||||
end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user