Skip to content

Commit 9634ca2

Browse files
committed
move ssyntax tests to new test framework.
1 parent c87a8d0 commit 9634ca2

2 files changed

Lines changed: 33 additions & 46 deletions

File tree

arc.arc.t

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,36 @@
1717
returns-final-form (assert-same 34
1818
(let x 1
1919
(do ++.x ++.x 34))))
20+
21+
(suite ssyntax
22+
ssyntax? (assert-nil ($.ssyntax? 'car))
23+
24+
infix (assert-t ($.ssyntax? 'car.body))
25+
26+
expand-ssyntax-infix (assert-same '(car body)
27+
($.expand-ssyntax 'car.body))
28+
29+
ssyntax?-!-prefix (assert-t ($.ssyntax? '!a))
30+
31+
expand-ssyntax-!-prefix (assert-same '(get 'a)
32+
($.expand-ssyntax '!a))
33+
34+
ssyntax?-!-infix (assert-t ($.ssyntax? 'car!body))
35+
36+
expand-ssyntax-!-infix (assert-same '(car 'body)
37+
($.expand-ssyntax 'car!body))
38+
39+
ssyntax?-:-infix (assert-t ($.ssyntax? 'f:g))
40+
41+
expand-ssyntax-:-infix (assert-same '(compose f g)
42+
($.expand-ssyntax 'f:g))
43+
44+
ssyntax?-~-prefix (assert-t ($.ssyntax? '~f))
45+
46+
expand-ssyntax-~-prefix (assert-same '(complement f)
47+
($.expand-ssyntax '~f))
48+
49+
ssyntax?-&-infix (assert-t ($.ssyntax? 'f&g))
50+
51+
expand-ssyntax-&-infix (assert-same '(andf f g)
52+
($.expand-ssyntax 'f&g)))

arc.arc.t.old

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,3 @@
1-
(test "ssyntax?"
2-
(not ($.ssyntax? 'car)))
3-
4-
(test "ssyntax? . infix"
5-
($.ssyntax? 'car.body))
6-
7-
(test-iso "expand-ssyntax . infix"
8-
'(car body)
9-
($.expand-ssyntax 'car.body))
10-
11-
(test "ssyntax? ! prefix"
12-
($.ssyntax? '!a))
13-
14-
(test-iso "expand-ssyntax ! prefix"
15-
'(get 'a)
16-
($.expand-ssyntax '!a))
17-
18-
(test "ssyntax? ! infix"
19-
($.ssyntax? 'car!body))
20-
21-
(test-iso "expand-ssyntax ! infix"
22-
'(car 'body)
23-
($.expand-ssyntax 'car!body))
24-
25-
(test "ssyntax? : infix"
26-
($.ssyntax? 'f:g))
27-
28-
(test-iso "expand-ssyntax : infix"
29-
'(compose f g)
30-
($.expand-ssyntax 'f:g))
31-
32-
(test "ssyntax? ~ prefix"
33-
($.ssyntax? '~f))
34-
35-
(test-iso "expand-ssyntax ~ prefix"
36-
'(complement f)
37-
($.expand-ssyntax '~f))
38-
39-
(test "ssyntax? & infix"
40-
($.ssyntax? 'f&g))
41-
42-
(test-iso "expand-ssyntax & infix"
43-
'(andf f g)
44-
($.expand-ssyntax 'f&g))
45-
46-
471
(test-iso "break works with for"
482
'(1 x 2 x 3)
493
(accum acc

0 commit comments

Comments
 (0)