Updated ellipsis error message in htdp languages.

Updated test cases for ellipsis error message.
Fixed problem with htdp advanced tests introduced with previous ellipsis updates.
Fixed htdp tests for updated undefined variable error message.

svn: r6887
This commit is contained in:
Carl Eastlund 2007-07-10 21:23:33 +00:00
parent 867ae7b56d
commit 33b4228a4e
4 changed files with 9 additions and 19 deletions

View File

@ -1226,7 +1226,7 @@
(define (dots-error stx name) (define (dots-error stx name)
(quasisyntax/loc stx (quasisyntax/loc stx
(error (quote (unsyntax name)) (error (quote (unsyntax name))
"expected a finished expression, but found a placeholder"))) "expected a finished expression, but found a template")))
;; Expression -> Expression ;; Expression -> Expression
;; Transforms unfinished code (... and the like) to code ;; Transforms unfinished code (... and the like) to code

View File

@ -215,11 +215,6 @@
(eval #'(set! s? 12)) (eval #'(set! s? 12))
(eval #'(set! set-s-x! 12))) (eval #'(set! set-s-x! 12)))
;; CCE: This tests the error handling for ...
;; It should be duplicated for .. through ......
;; but (for-each (lambda foo bar) baz) won't work here.
(htdp-err/rt-test (set! ... true) "found a placeholder")
;; ---------------------------------------- ;; ----------------------------------------
(report-errs) (report-errs)

View File

@ -67,7 +67,6 @@
(htdp-test 15 'app-f (f 10)) (htdp-test 15 'app-f (f 10))
(htdp-top-pop 1) (htdp-top-pop 1)
(htdp-top-pop 1) (htdp-top-pop 1)
(htdp-top-pop 1)
(htdp-top (define-struct a0 ())) (htdp-top (define-struct a0 ()))
(htdp-top (define-struct a1 (b))) (htdp-top (define-struct a1 (b)))
@ -228,8 +227,8 @@
(htdp-top (define (my-f x) (+ x 5))) (htdp-top (define (my-f x) (+ x 5)))
(htdp-syntax-test #'(cond [true my-x 5]) #rx"found a clause with 3 parts") (htdp-syntax-test #'(cond [true my-x 5]) #rx"found a clause with 3 parts")
(htdp-syntax-test #'(define foo17 my-x 5) #rx"found one extra part") (htdp-syntax-test #'(define foo17 my-x 5) #rx"found one extra part")
(htdp-syntax-test #'(my-y 17) #rx"not defined, not an argument, and not a primitive name") (htdp-syntax-test #'(my-y 17) #rx"not defined, not a parameter, and not a primitive name")
(htdp-syntax-test #'(cond [true my-y 17]) #rx"not defined, not an argument, and not a primitive name") (htdp-syntax-test #'(cond [true my-y 17]) #rx"not defined, not a parameter, and not a primitive name")
(htdp-syntax-test #'(define my-f 12) #rx"cannot be re-defined") (htdp-syntax-test #'(define my-f 12) #rx"cannot be re-defined")
(htdp-syntax-test #'(define (my-x h) 12) #rx"cannot be re-defined") (htdp-syntax-test #'(define (my-x h) 12) #rx"cannot be re-defined")
(htdp-top-pop 1) (htdp-top-pop 1)
@ -249,13 +248,14 @@
(htdp-syntax-test #'(require (lib "a" 2)) #rx"string for a lib path") (htdp-syntax-test #'(require (lib "a" 2)) #rx"string for a lib path")
(htdp-syntax-test #'(require (planet "a" 2)) #rx"not a valid planet path") (htdp-syntax-test #'(require (planet "a" 2)) #rx"not a valid planet path")
(define rx:placeholder "found a placeholder") (define rx:dots-error "found a template")
;; CCE: These test the error handling for ... ;; CCE: These test the error handling for ...
;; They should be duplicated for .. through ...... ;; They should be duplicated for .. through ......
;; but (for-each (lambda foo bar) baz) won't work here. ;; but (for-each (lambda foo bar) baz) won't work here.
(htdp-err/rt-test ... rx:placeholder) (htdp-err/rt-test ... rx:dots-error)
(htdp-err/rt-test (+ 1 ... 2) rx:placeholder) (htdp-err/rt-test (+ 1 ... 2) rx:dots-error)
(htdp-err/rt-test (... 1 2) rx:placeholder) (htdp-err/rt-test (... 1 2) rx:dots-error)
(htdp-err/rt-test (if false 1 ...) rx:placeholder) (htdp-err/rt-test (if false 1 ...) rx:dots-error)
(htdp-test 1 'ok-dots (if true 1 ...)) (htdp-test 1 'ok-dots (if true 1 ...))
(htdp-error-test #'(set! ... true))

View File

@ -3,8 +3,3 @@
(htdp-syntax-test #'(define (xthnk) 10)) (htdp-syntax-test #'(define (xthnk) 10))
(htdp-syntax-test #'(define xthnk (lambda () 10))) (htdp-syntax-test #'(define xthnk (lambda () 10)))
;; CCE: This tests the error handling for ...
;; It should be duplicated for .. through ......
;; but (for-each (lambda foo bar) baz) won't work here.
(htdp-error-test #'(set! ... true))