about summary refs log tree commit diff
path: root/tests/ccwl.scm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ccwl.scm')
-rw-r--r--tests/ccwl.scm22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/ccwl.scm b/tests/ccwl.scm
index 117f93f..6890017 100644
--- a/tests/ccwl.scm
+++ b/tests/ccwl.scm
@@ -27,6 +27,16 @@
 (define output
   (@@ (ccwl ccwl) output))
 
+(define make-array-type
+  (@@ (ccwl ccwl) make-array-type))
+
+(define-syntax construct-type-syntax-wrapper
+  (lambda (x)
+    (syntax-case x ()
+      ((_ type-spec)
+       ((@@ (ccwl ccwl) construct-type-syntax)
+        #'type-spec)))))
+
 (test-begin "ccwl")
 
 (test-assert "stdin input should not have inputBinding"
@@ -317,4 +327,16 @@
                       #:other '((secondaryFiles . ".fai"))))
            #f)))
 
+(test-eq "construct-type-syntax on primitive types"
+  'File
+  (construct-type-syntax-wrapper File))
+
+(test-eq "construct-type-syntax on array types"
+  (make-array-type 'File)
+  (construct-type-syntax-wrapper (array File)))
+
+(test-eq "construct-type-syntax on nested array types"
+  (make-array-type (make-array-type 'File))
+  (construct-type-syntax-wrapper (array (array File))))
+
 (test-end "ccwl")