Cairn · module
Cairn.Abi.Tests
lean/Cairn/Abi/Tests.lean
Checks for Cairn.Abi, kept out of the module so they can use #guard (a #guard in a
module needs a meta import of what it evaluates): the frame encoder's font clamping, then
concrete checks of the runtime on a small app, laid out by Cairn.Layout.layout.
Imports Cairn.Runtime.Abi, Cairn.Abi
Order
Structures 1
TState : Type
Records every action it is given, so tests can read what the runtime delivered.
Instances
Definitions 26
ref (n : Nat) : ControlRef
btn (n : Nat) (label : String) : Node
view (s : TState) (ui : UI) : Node
^1 increment, ^2 a field, ^3 a button with a static label (no control role), ^4 reset when the count is positive, and ^5 a delete button shown only while ^1 is hovered.
update (s : TState) (a : Action) : TState × List Effect
app : App TState
cfg : Config
s0 : State TState
run (es : List Event) : State TState × List Effect
log (es : List Event) : List Action
ui (es : List Event) : UI
down (x y : Int) (clicks : Nat := 1) (mods : Mods := { }) : Event
up (x y : Int) : Event
click (x y : Int) : List Event
tab (back : Bool := false) : Event
resetByKey : List Event
focusApp : App TState
runF (es : List Event) : State TState × List Effect
evBytes : ByteArray
boundary : Boundary
scrollView : TState → (ui : UI) → Node
scrollApp : App TState
runS (es : List Event) : State TState × List Effect
offS (es : List Event) : Int
wheelAt (dy : Int) : Event
appears (es : List Event) : Nat
batchesS (bs : List (List Event)) : State TState
Instances 1
instInhabitedTState : Inhabited TState