roc/crates/cli_testing_examples/expects/expects.roc
2023-12-02 15:57:53 -08:00

28 lines
551 B
Text

app "expects-test"
packages { pf: "zig-platform/main.roc" }
imports []
provides [main] to pf
expect
a = 1
b = 2
a == b
polyDbg = \x ->
dbg x
x
main =
str = "this will for sure be a large string so when we split it it will use seamless slices which affect printing"
words = Str.split str " "
expect words == []
x = 42
dbg x
dbg "Fjoer en ferdjer frieten oan dyn geve lea"
r = {x : polyDbg "abc", y: polyDbg 10u8, z : polyDbg (A (B C))}
when r is
_ -> "Program finished!\n"