* tests/syntax.test ("let,duplicate bindings", "let*,duplicate
authorMarius Vollmer <mvo@zagadka.de>
Sat, 3 Mar 2001 23:54:42 +0000 (23:54 +0000)
committerMarius Vollmer <mvo@zagadka.de>
Sat, 3 Mar 2001 23:54:42 +0000 (23:54 +0000)
bindings", "letrec,duplicate bindings"): Expect to pass, bug has
been fixed.

test-suite/tests/syntax.test

index d200019..a1d3c62 100644 (file)
@@ -20,6 +20,8 @@
 
 (define exception:bad-bindings
   (cons 'misc-error "^bad bindings"))
+(define exception:duplicate-bindings
+  (cons 'misc-error "^duplicate bindings"))
 (define exception:bad-body
   (cons 'misc-error "^bad body"))
 (define exception:bad-formals
       (let ((x 1))))
 
     ;; FIXME:  Wouldn't one rather expect a 'bad bindings' error?
+    ;; Hmm, the body is bad as well, isn't it?
     (pass-if-exception "(let)"
       exception:bad-body
       (let))
 
     ;; FIXME:  Wouldn't one rather expect a 'bad bindings' error?
+    ;; Hmm, the body is bad as well, isn't it?
     (pass-if-exception "(let 1)"
       exception:bad-body
       (let 1))
 
     ;; FIXME:  Wouldn't one rather expect a 'bad bindings' error?
+    ;; Hmm, the body is bad as well, isn't it?
     (pass-if-exception "(let (x))"
       exception:bad-body
       (let (x))))
 
     (pass-if-exception "(let ((1 2)) 3)"
       exception:bad-var
-      (let ((1 2)) 3))
+      (let ((1 2)) 3)))
 
-    (expect-fail-exception "(let ((x 1) (x 2)) x)"
-      exception:bad-bindings
+  (with-test-prefix "duplicate bindings"
+
+    (pass-if-exception "(let ((x 1) (x 2)) x)"
+      exception:duplicate-bindings
       (let ((x 1) (x 2)) x))))
 
 (with-test-prefix "named let"
       (let x ((y 1))))
 
     ;; FIXME:  Wouldn't one rather expect a 'bad bindings' error?
+    ;; Hmm, the body is bad as well, isn't it?
     (pass-if-exception "(let x (y))"
       exception:bad-body
       (let x (y)))))
       (let* ((x 1))))
 
     ;; FIXME:  Wouldn't one rather expect a 'bad bindings' error?
+    ;; Hmm, the body is bad as well, isn't it?
     (pass-if-exception "(let*)"
       exception:bad-body
       (let*))
 
     ;; FIXME:  Wouldn't one rather expect a 'bad bindings' error?
+    ;; Hmm, the body is bad as well, isn't it?
     (pass-if-exception "(let* 1)"
       exception:bad-body
       (let* 1))
 
     ;; FIXME:  Wouldn't one rather expect a 'bad bindings' error?
+    ;; Hmm, the body is bad as well, isn't it?
     (pass-if-exception "(let* (x))"
       exception:bad-body
       (let* (x))))
 
     (pass-if-exception "(let* ((1 2)) 3)"
       exception:bad-var
-      (let* ((1 2)) 3))
+      (let* ((1 2)) 3)))
 
-    (expect-fail-exception "(let* ((x 1) (x 2)) x)"
-      exception:bad-bindings
+  (with-test-prefix "duplicate bindings"
+
+    (pass-if-exception "(let* ((x 1) (x 2)) x)"
+      exception:duplicate-bindings
       (let* ((x 1) (x 2)) x))))
 
 (with-test-prefix "letrec"
       (letrec ((x 1))))
 
     ;; FIXME:  Wouldn't one rather expect a 'bad bindings' error?
+    ;; Hmm, the body is bad as well, isn't it?
     (pass-if-exception "(letrec)"
       exception:bad-body
       (letrec))
 
     ;; FIXME:  Wouldn't one rather expect a 'bad bindings' error?
+    ;; Hmm, the body is bad as well, isn't it?
     (pass-if-exception "(letrec 1)"
       exception:bad-body
       (letrec 1))
 
     ;; FIXME:  Wouldn't one rather expect a 'bad bindings' error?
+    ;; Hmm, the body is bad as well, isn't it?
     (pass-if-exception "(letrec (x))"
       exception:bad-body
       (letrec (x))))
 
     (pass-if-exception "(letrec ((1 2)) 3)"
       exception:bad-var
-      (letrec ((1 2)) 3))
+      (letrec ((1 2)) 3)))
 
-    (expect-fail-exception "(letrec ((x 1) (x 2)) x)"
-      exception:bad-bindings
+  (with-test-prefix "duplicate bindings"
+
+    (pass-if-exception "(letrec ((x 1) (x 2)) x)"
+      exception:duplicate-bindings
       (letrec ((x 1) (x 2)) x))))
 
 (with-test-prefix "if"