diff options
Diffstat (limited to 'csc/match-test.csc')
| -rw-r--r-- | csc/match-test.csc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/csc/match-test.csc b/csc/match-test.csc index 31e7afa..c5314ce 100644 --- a/csc/match-test.csc +++ b/csc/match-test.csc @@ -85,3 +85,19 @@ (n (when (= 1 n)) 1) (n (when (= 10 n)) 2) (_ 3)))) + + +(define-match-record-type <test-record-type> + (make-test-record-type a b c) + test-record-type? + %test-record-type + (a test-record-type-a) + (b test-record-type-b) + (c test-record-type-c)) + + +(test match-record-type + (assert-equal + 2 + (match (make-test-record-type 1 2 3) + ((% %test-record-type a b c) b)))) |
