mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
expand ui tests for inspect
This commit is contained in:
parent
c443bdcf4f
commit
4c25c60cdc
9 changed files with 23 additions and 6 deletions
|
@ -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
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue