blob: b0c8aafd49aa82d84671a6a8728ced1b3d3f21a6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// Test the `assert` function.
// Ref: false
---
#assert(1 + 1 == 2)
#assert(range(2, 5) == (2, 3, 4))
#assert(not false)
---
// Test failing assertions.
// Error: 9-15 assertion failed
#assert(1 == 2)
---
// Test failing assertions.
// Error: 9-15 expected boolean, found string
#assert("true")
---
// Test the `type` function.
#test(type(1), "integer")
#test(type(ltr), "direction")
#test(type(10 / 3), "float")
|