check-expect running
This commit is contained in:
parent
cb94b0ee7e
commit
464abb58f1
|
@ -73,6 +73,13 @@
|
||||||
'make-struct-field-mutator
|
'make-struct-field-mutator
|
||||||
|
|
||||||
'gensym
|
'gensym
|
||||||
|
'srcloc
|
||||||
|
'make-srcloc
|
||||||
|
'srcloc-source
|
||||||
|
'srcloc-line
|
||||||
|
'srcloc-column
|
||||||
|
'srcloc-position
|
||||||
|
'srcloc-span
|
||||||
))
|
))
|
||||||
(define-predicate KernelPrimitiveName? KernelPrimitiveName)
|
(define-predicate KernelPrimitiveName? KernelPrimitiveName)
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#lang planet dyoo/whalesong
|
#lang planet dyoo/whalesong
|
||||||
|
|
||||||
(define (greet name)
|
(define (greet name)
|
||||||
(string-append "hello" name))
|
(string-append "hello " name))
|
||||||
|
|
||||||
(check-expect (greet "danny") "hello danny")
|
(check-expect (greet "danny") "hello danny")
|
||||||
(check-expect (greet "huh") "this should fail")
|
(check-expect (greet "huh") "this should fail")
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
#'(accumulate-test!
|
#'(accumulate-test!
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(check-expect* 'stx
|
(check-expect* 'stx
|
||||||
(srcloc 'id offset line column span)
|
(srcloc 'id line column offset span)
|
||||||
(lambda () test)
|
(lambda () test)
|
||||||
(lambda () expected))))))]))
|
(lambda () expected))))))]))
|
||||||
|
|
||||||
|
@ -91,11 +91,17 @@
|
||||||
#t]
|
#t]
|
||||||
[else
|
[else
|
||||||
(printf "check-expect: actual value ~s differs from ~s, the expected value\n" test-value expected-value)
|
(printf "check-expect: actual value ~s differs from ~s, the expected value\n" test-value expected-value)
|
||||||
;(newline)
|
(display-location a-loc)
|
||||||
;(display-location test-datum a-loc)
|
|
||||||
#f])))
|
#f])))
|
||||||
|
|
||||||
|
|
||||||
|
(define (display-location a-loc)
|
||||||
|
(printf " at: ~s, line ~s, column ~s\n"
|
||||||
|
(srcloc-source a-loc)
|
||||||
|
(srcloc-line a-loc)
|
||||||
|
(srcloc-column a-loc)))
|
||||||
|
|
||||||
|
|
||||||
;; (define (check-within* test-datum a-loc test-thunk expected-thunk delta-thunk)
|
;; (define (check-within* test-datum a-loc test-thunk expected-thunk delta-thunk)
|
||||||
;; ;(with-handlers ([void
|
;; ;(with-handlers ([void
|
||||||
;; ; (lambda (exn)
|
;; ; (lambda (exn)
|
||||||
|
|
|
@ -166,7 +166,17 @@
|
||||||
(rename-out [kernel:apply apply])
|
(rename-out [kernel:apply apply])
|
||||||
call-with-values
|
call-with-values
|
||||||
|
|
||||||
gensym)
|
gensym
|
||||||
|
|
||||||
|
|
||||||
|
srcloc
|
||||||
|
make-srcloc
|
||||||
|
srcloc?
|
||||||
|
srcloc-source
|
||||||
|
srcloc-line
|
||||||
|
srcloc-column
|
||||||
|
srcloc-position
|
||||||
|
srcloc-span)
|
||||||
|
|
||||||
|
|
||||||
(define (-identity x) x)
|
(define (-identity x) x)
|
||||||
|
@ -443,18 +453,7 @@ char=?
|
||||||
|
|
||||||
make-reader-graph
|
make-reader-graph
|
||||||
make-placeholder
|
make-placeholder
|
||||||
placeholder-set!
|
placeholder-set!)
|
||||||
|
|
||||||
|
|
||||||
srcloc
|
|
||||||
make-srcloc
|
|
||||||
srcloc?
|
|
||||||
srcloc-id
|
|
||||||
srcloc-line
|
|
||||||
srcloc-column
|
|
||||||
srcloc-position
|
|
||||||
srcloc-span
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user