mirror of
https://github.com/Reuh/anselme.git
synced 2025-10-27 16:49:31 +00:00
Third test batch
This commit is contained in:
parent
3edf65dc2a
commit
0eea4b80a6
7 changed files with 131 additions and 1 deletions
14
test/tests/function custom type dispatch error.ans
Normal file
14
test/tests/function custom type dispatch error.ans
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
:french name="french name"
|
||||
:esperanto name="esperanto name"
|
||||
|
||||
:$ a(name::is(esperanto name))
|
||||
|{name!value} is esperanto
|
||||
|
||||
:$ a(name::is(french name))
|
||||
|{name!value} is french
|
||||
|
||||
a("pierre"!type(french name))
|
||||
|
||||
a("idk"!type(esperanto name))
|
||||
|
||||
a(5!type("nope"))
|
||||
14
test/tests/function custom type dispatch.ans
Normal file
14
test/tests/function custom type dispatch.ans
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
:french name="french name"
|
||||
:esperanto name="esperanto name"
|
||||
|
||||
:$ a(name)
|
||||
|{name!value} is english or generic
|
||||
|
||||
:$ a(name::is(french name))
|
||||
|{name!value} is french
|
||||
|
||||
a("bob")
|
||||
|
||||
a("pierre"!type(french name))
|
||||
|
||||
a("idk"!type(esperanto name))
|
||||
36
test/tests/litterals.ans
Normal file
36
test/tests/litterals.ans
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
| numbers:
|
||||
| {0}
|
||||
| {12}
|
||||
| {.87}
|
||||
| {39.12}
|
||||
|
||||
| strings:
|
||||
| {"foo"}
|
||||
|
||||
| tuple:
|
||||
| {[4,8,9]}
|
||||
|
||||
| struct:
|
||||
| {{7:4,2:8,1:9}}
|
||||
|
||||
| symbols:
|
||||
| {:ab}
|
||||
|
||||
| anchor:
|
||||
| {#jdfe}
|
||||
| {#foo bar}
|
||||
|
||||
| boolean:
|
||||
| {false}
|
||||
| {true}
|
||||
|
||||
| nil:
|
||||
| {()}
|
||||
|
||||
| pair:
|
||||
| {6:8}
|
||||
| {("d"):([])}
|
||||
|
||||
| function:
|
||||
| {$12}
|
||||
| {$(x)x}
|
||||
Loading…
Add table
Add a link
Reference in a new issue