expand ui tests for inspect

This commit is contained in:
Brendan Hansknecht 2023-11-28 10:38:49 -08:00
parent c443bdcf4f
commit 4c25c60cdc
No known key found for this signature in database
GPG key ID: 0EA784685083E75B
9 changed files with 23 additions and 6 deletions

View file

@ -0,0 +1,4 @@
app "test" provides [main] to "./platform"
main = Inspect.toInspector 7dec |> Inspect.apply (Inspect.init {}) |> Inspect.toDbgStr
# ^^^^^^^^^^^^^^^^^^^ Inspect#Inspect.toInspector(32): Dec -[[Inspect.dbgDec(60)]]-> Inspector DbgFormatter

View file

@ -2,5 +2,5 @@ app "test" provides [main] to "./platform"
Op := {}
main = Inspect.toInspector (@Op {})
# ^^^^^^^^^^^^^^^^^^^ Inspect#Inspect.toInspector(32): Op -[[] + f:Inspect.opaque(15):1]-> Inspector f where f implements InspectFormatter
main = Inspect.toInspector (@Op {}) |> Inspect.apply (Inspect.init {}) |> Inspect.toDbgStr
# ^^^^^^^^^^^^^^^^^^^ Inspect#Inspect.toInspector(32): Op -[[Inspect.dbgOpaque(45)]]-> Inspector DbgFormatter

View file

@ -5,5 +5,5 @@ Op := U8 implements [Inspect { toInspector: myToInspector }]
myToInspector : Op -> Inspector f where f implements InspectFormatter
myToInspector = \@Op num -> Inspect.u8 num
main = Inspect.toInspector (@Op 1u8)
# ^^^^^^^^^^^^^^^^^^^ Op#Inspect.toInspector(2): Op -[[myToInspector(2)]]-> Inspector f where f implements InspectFormatter
main = Inspect.toInspector (@Op 1u8) |> Inspect.apply (Inspect.init {}) |> Inspect.toDbgStr
# ^^^^^^^^^^^^^^^^^^^ Op#Inspect.toInspector(2): Op -[[myToInspector(2)]]-> Inspector DbgFormatter

View file

@ -2,5 +2,5 @@ app "test" provides [main] to "./platform"
Op := U8 implements [Inspect]
main = Inspect.toInspector (@Op 1u8)
# ^^^^^^^^^^^^^^^^^^^ Op#Inspect.toInspector(3): Op -[[#Op_toInspector(3)]]-> Inspector f where f implements InspectFormatter
main = Inspect.toInspector (@Op 1u8) |> Inspect.apply (Inspect.init {}) |> Inspect.toDbgStr
# ^^^^^^^^^^^^^^^^^^^ Op#Inspect.toInspector(3): Op -[[#Op_toInspector(3)]]-> Inspector DbgFormatter

View file

@ -0,0 +1,4 @@
app "test" provides [main] to "./platform"
main = Inspect.toInspector { a: "" } |> Inspect.apply (Inspect.init {}) |> Inspect.toDbgStr
# ^^^^^^^^^^^^^^^^^^^ Inspect#Inspect.toInspector(32): Bool -[[Inspect.dbgBool(43)]]-> Inspector DbgFormatter

View file

@ -0,0 +1,9 @@
app "test" provides [main] to "./platform"
Op := U8 implements [Inspect { toInspector: myToInspector }]
myToInspector : Op -> Inspector f where f implements InspectFormatter
myToInspector = \@Op num -> Inspect.u8 num
main = Inspect.toInspector { op: @Op 1u8 } |> Inspect.apply (Inspect.init {}) |> Inspect.toDbgStr
# ^^^^^^^^^^^^^^^^^^^ Op#Inspect.toInspector(2): Op -[[myToInspector(2)]]-> Inspector f where f implements InspectFormatter