mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-26 07:21:22 +02:00
fix deez tests
This commit is contained in:
@@ -64,22 +64,17 @@ for _, version in ipairs({ "gold", "silver", "crystal" }) do
|
|||||||
voidFill.step(-1)
|
voidFill.step(-1)
|
||||||
eq(model.opts.gold.voidFill, "fade", version .. " left restores fade")
|
eq(model.opts.gold.voidFill, "fade", version .. " left restores fade")
|
||||||
|
|
||||||
-- Every write has to land in the gen2 block: the flat keys beside it are
|
-- The pad and the buzz are one device-wide setting: Gen 2 reads them from
|
||||||
-- Red's, and no Gen 2 boot reads them (src/core/gen2/Save.lua:299).
|
-- the flat keys, not its block (src/core/gen2/Save.lua SHARED_KEYS), so the
|
||||||
-- loadOptions seeds the flat Gen 1 defaults, so the check is that the Gen 2
|
-- rows write the flat keys and must never grow a copy inside `gold`.
|
||||||
-- rows leave them exactly as they found them.
|
|
||||||
local flatPad = model.opts.touchControls
|
|
||||||
local flatBuzz = model.opts.haptics
|
|
||||||
|
|
||||||
local pad = findRow(model, "TOUCH PAD")
|
local pad = findRow(model, "TOUCH PAD")
|
||||||
local before = pad.value()
|
local before = pad.value()
|
||||||
pad.step(1)
|
pad.step(1)
|
||||||
check(pad.value() ~= before, version .. " stepping TOUCH PAD flips it")
|
check(pad.value() ~= before, version .. " stepping TOUCH PAD flips it")
|
||||||
check(type(model.opts.gold) == "table", version .. " into the gold block")
|
eq(model.opts.touchControls.enabled, false,
|
||||||
eq(model.opts.gold.touchControls.enabled, false,
|
version .. " on the flat shared key")
|
||||||
version .. " which now carries enabled")
|
eq(model.opts.gold.touchControls, nil,
|
||||||
eq(model.opts.touchControls, flatPad,
|
version .. " without a copy in the gold block")
|
||||||
version .. " leaving the flat Gen 1 key alone")
|
|
||||||
eq(model.opts.silver, nil,
|
eq(model.opts.silver, nil,
|
||||||
version .. " and inventing no second Gen 2 block beside it")
|
version .. " and inventing no second Gen 2 block beside it")
|
||||||
eq(model.opts.crystal, nil, version .. " nor a third")
|
eq(model.opts.crystal, nil, version .. " nor a third")
|
||||||
@@ -88,10 +83,10 @@ for _, version in ipairs({ "gold", "silver", "crystal" }) do
|
|||||||
local buzzBefore = buzz.value()
|
local buzzBefore = buzz.value()
|
||||||
buzz.step(1)
|
buzz.step(1)
|
||||||
check(buzz.value() ~= buzzBefore, version .. " stepping VIBRATION moves the level")
|
check(buzz.value() ~= buzzBefore, version .. " stepping VIBRATION moves the level")
|
||||||
eq(model.opts.gold.haptics,
|
eq(model.opts.haptics,
|
||||||
TouchControls.normalizeHaptics(model.opts.gold.haptics),
|
TouchControls.normalizeHaptics(model.opts.haptics),
|
||||||
version .. " VIBRATION stores a level the shared module knows")
|
version .. " VIBRATION stores a level the shared module knows")
|
||||||
eq(model.opts.haptics, flatBuzz, version .. " also without touching Red's")
|
eq(model.opts.gold.haptics, nil, version .. " on the flat key only")
|
||||||
|
|
||||||
edited = 0
|
edited = 0
|
||||||
findRow(model, "TOUCH CONTROLS").action()
|
findRow(model, "TOUCH CONTROLS").action()
|
||||||
|
|||||||
@@ -139,6 +139,7 @@ stub.graphics = {
|
|||||||
end,
|
end,
|
||||||
translate = noop, scale = noop,
|
translate = noop, scale = noop,
|
||||||
rotate = noop, origin = noop, setScissor = noop,
|
rotate = noop, origin = noop, setScissor = noop,
|
||||||
|
getScissor = function() return nil end,
|
||||||
getDimensions = function() return 640, 576 end,
|
getDimensions = function() return 640, 576 end,
|
||||||
-- dpi=1 desktop default; issue #87 tests override these for Android density
|
-- dpi=1 desktop default; issue #87 tests override these for Android density
|
||||||
getPixelDimensions = function() return 640, 576 end,
|
getPixelDimensions = function() return 640, 576 end,
|
||||||
|
|||||||
Reference in New Issue
Block a user