mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 19:50:24 +02:00
* tests/syntax.test: Added test cases for 'cond =>' syntax with
else clause. Changed some tests and comments related to the 'case' form to reflect recent changes in the implementation.
This commit is contained in:
parent
8ea4624953
commit
b461abe73f
2 changed files with 20 additions and 8 deletions
|
@ -1,3 +1,9 @@
|
|||
2001-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
|
||||
|
||||
* tests/syntax.test: Added test cases for 'cond =>' syntax with
|
||||
else clause. Changed some tests and comments related to the
|
||||
'case' form to reflect recent changes in the implementation.
|
||||
|
||||
2001-10-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
|
||||
|
||||
* tests/syntax.test: Added test cases for 'lambda' syntax.
|
||||
|
|
|
@ -370,6 +370,16 @@
|
|||
|
||||
(with-test-prefix "cond =>"
|
||||
|
||||
(with-test-prefix "else is handled correctly"
|
||||
|
||||
(pass-if "else =>"
|
||||
(let ((=> 'foo))
|
||||
(eq? (cond (else =>)) 'foo)))
|
||||
|
||||
(pass-if "else => identity"
|
||||
(let* ((=> 'foo))
|
||||
(eq? (cond (else => identity)) identity))))
|
||||
|
||||
(with-test-prefix "bad formals"
|
||||
|
||||
(pass-if-exception "=> (lambda (x 1) 2)"
|
||||
|
@ -384,18 +394,16 @@
|
|||
exception:bad/missing-clauses
|
||||
(case))
|
||||
|
||||
;; FIXME: Wouldn't one rather expect a 'bad or missing clauses' error?
|
||||
(pass-if-exception "(case . \"foo\")"
|
||||
exception:wrong-type-arg
|
||||
exception:bad/missing-clauses
|
||||
(case . "foo"))
|
||||
|
||||
(pass-if-exception "(case 1)"
|
||||
exception:bad/missing-clauses
|
||||
(case 1))
|
||||
|
||||
;; FIXME: Wouldn't one rather expect a 'bad or missing clauses' error?
|
||||
(pass-if-exception "(case 1 . \"foo\")"
|
||||
exception:wrong-type-arg
|
||||
exception:bad/missing-clauses
|
||||
(case 1 . "foo"))
|
||||
|
||||
(pass-if-exception "(case 1 \"foo\")"
|
||||
|
@ -419,18 +427,16 @@
|
|||
;; exception:bad/missing-clauses
|
||||
;; (case 1 (() "bar")))
|
||||
|
||||
;; FIXME: Wouldn't one rather expect a 'bad or missing clauses' error?
|
||||
(pass-if-exception "(case 1 ((2) \"bar\") . \"foo\")"
|
||||
exception:wrong-type-arg
|
||||
exception:bad/missing-clauses
|
||||
(case 1 ((2) "bar") . "foo"))
|
||||
|
||||
(pass-if-exception "(case 1 (else #f) ((1) #t))"
|
||||
exception:bad/missing-clauses
|
||||
(case 1 ((2) "bar") (else)))
|
||||
|
||||
;; FIXME: Wouldn't one rather expect a 'bad or missing clauses' error?
|
||||
(pass-if-exception "(case 1 (else #f) . \"foo\")"
|
||||
exception:wrong-type-arg
|
||||
exception:bad/missing-clauses
|
||||
(case 1 (else #f) . "foo"))
|
||||
|
||||
(pass-if-exception "(case 1 (else #f) ((1) #t))"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue