182 lines
2.9 KiB
Text
182 lines
2.9 KiB
Text
|
"Hello, World!"
|
||
|
|
||
|
"=== GROUP: Syntax =============================================="
|
||
|
|
||
|
"--- TEST: begin ------------------------------------------------"
|
||
|
()
|
||
|
123
|
||
|
456
|
||
|
789
|
||
|
|
||
|
"--- TEST: if ---------------------------------------------------"
|
||
|
123
|
||
|
123
|
||
|
456
|
||
|
|
||
|
"=== GROUP: Arcane Scheme Lisp internals ========================"
|
||
|
|
||
|
"--- TEST: arcane/tokenize --------------------------------------"
|
||
|
((TOKEN_ROUND_OPEN . "("))
|
||
|
((TOKEN_TAG . "false"))
|
||
|
((TOKEN_ROUND_OPEN . "(") (TOKEN_IDENT . "displayln") (TOKEN_ROUND_OPEN . "(") (TOKEN_IDENT . "list") (TOKEN_NUM . "1") (TOKEN_ROUND_CLOSE . ")") (TOKEN_ROUND_CLOSE . ")"))
|
||
|
|
||
|
"--- TEST: arcane/typeof ----------------------------------------"
|
||
|
null
|
||
|
procedure
|
||
|
pair
|
||
|
boolean
|
||
|
symbol
|
||
|
string
|
||
|
number
|
||
|
|
||
|
"=== GROUP: Basic data structures ==============================="
|
||
|
|
||
|
"--- TEST: car --------------------------------------------------"
|
||
|
123
|
||
|
|
||
|
"--- TEST: cdr --------------------------------------------------"
|
||
|
456
|
||
|
|
||
|
"--- TEST: list -------------------------------------------------"
|
||
|
()
|
||
|
(123)
|
||
|
(123 456)
|
||
|
|
||
|
"=== GROUP: Type predicates ====================================="
|
||
|
|
||
|
"--- TEST: boolean? ---------------------------------------------"
|
||
|
#false
|
||
|
#false
|
||
|
#true
|
||
|
#true
|
||
|
#false
|
||
|
#false
|
||
|
#false
|
||
|
#false
|
||
|
|
||
|
"--- TEST: char? ------------------------------------------------"
|
||
|
#false
|
||
|
#false
|
||
|
#false
|
||
|
#false
|
||
|
#false
|
||
|
#false
|
||
|
#false
|
||
|
#false
|
||
|
|
||
|
"--- TEST: null? ------------------------------------------------"
|
||
|
#false
|
||
|
#true
|
||
|
#false
|
||
|
#false
|
||
|
#false
|
||
|
#false
|
||
|
#false
|
||
|
#false
|
||
|
|
||
|
"--- TEST: number? ----------------------------------------------"
|
||
|
#false
|
||
|
#false
|
||
|
#false
|
||
|
#false
|
||
|
#false
|
||
|
#false
|
||
|
#true
|
||
|
#false
|
||
|
|
||
|
"--- TEST: pair? ------------------------------------------------"
|
||
|
#false
|
||
|
#false
|
||
|
#false
|
||
|
#false
|
||
|
#false
|
||
|
#false
|
||
|
#false
|
||
|
#true
|
||
|
|
||
|
"--- TEST: procedure? -------------------------------------------"
|
||
|
#true
|
||
|
#false
|
||
|
#false
|
||
|
#false
|
||
|
#false
|
||
|
#false
|
||
|
#false
|
||
|
#false
|
||
|
|
||
|
"--- TEST: string? ----------------------------------------------"
|
||
|
#false
|
||
|
#false
|
||
|
#false
|
||
|
#false
|
||
|
#false
|
||
|
#true
|
||
|
#false
|
||
|
#false
|
||
|
|
||
|
"--- TEST: symbol? ----------------------------------------------"
|
||
|
#false
|
||
|
#false
|
||
|
#false
|
||
|
#false
|
||
|
#true
|
||
|
#false
|
||
|
#false
|
||
|
#false
|
||
|
|
||
|
"=== GROUP: Type conversion ====================================="
|
||
|
|
||
|
"--- TEST: number->string ---------------------------------------"
|
||
|
"123"
|
||
|
"1e240"
|
||
|
|
||
|
"--- TEST: string->symbol ---------------------------------------"
|
||
|
|
||
|
|
||
|
foo
|
||
|
|
||
|
"--- TEST: symbol->string ---------------------------------------"
|
||
|
"foo"
|
||
|
|
||
|
"=== GROUP: Logical operators ==================================="
|
||
|
|
||
|
"--- TEST: not --------------------------------------------------"
|
||
|
#false
|
||
|
#false
|
||
|
#true
|
||
|
#false
|
||
|
#false
|
||
|
#false
|
||
|
#false
|
||
|
|
||
|
"=== GROUP: Arithmetic operators ================================"
|
||
|
|
||
|
"--- TEST: = ----------------------------------------------------"
|
||
|
#true
|
||
|
#true
|
||
|
#false
|
||
|
#true
|
||
|
#false
|
||
|
#false
|
||
|
#false
|
||
|
#true
|
||
|
#false
|
||
|
#false
|
||
|
#false
|
||
|
#false
|
||
|
|
||
|
"--- TEST: + ----------------------------------------------------"
|
||
|
0
|
||
|
123
|
||
|
11
|
||
|
111
|
||
|
1111
|
||
|
|
||
|
"--- TEST: - ----------------------------------------------------"
|
||
|
0
|
||
|
123
|
||
|
99
|
||
|
97
|
||
|
94
|
||
|
90
|