trying to fight runtime errors
This commit is contained in:
parent
433a73aefa
commit
6cb8309ea0
|
@ -66,8 +66,8 @@
|
||||||
(define-struct (exn:fail:error-on-test exn:fail)
|
(define-struct (exn:fail:error-on-test exn:fail)
|
||||||
(srcloc)
|
(srcloc)
|
||||||
#:property prop:exn:srclocs
|
#:property prop:exn:srclocs
|
||||||
(lambda (a-struct)
|
(lambda (a-struct)
|
||||||
(list (exn:fail:error-on-test-srcloc a-struct))))
|
(list (exn:fail:error-on-test-srcloc a-struct))))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -86,9 +86,9 @@
|
||||||
[else
|
[else
|
||||||
(printf " error!\n")
|
(printf " error!\n")
|
||||||
(displayln (exn-message (make-exn:fail:error-on-test
|
(displayln (exn-message (make-exn:fail:error-on-test
|
||||||
(format "Expected ~s, got ~s" exp output)
|
(format "Expected ~s, got ~s" exp output)
|
||||||
(current-continuation-marks)
|
(current-continuation-marks)
|
||||||
(loc-thunk))))])))
|
(loc-thunk))))])))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -105,10 +105,12 @@
|
||||||
[(_ original-source-file-path original-expected-file-path)
|
[(_ original-source-file-path original-expected-file-path)
|
||||||
(with-syntax ([stx stx]
|
(with-syntax ([stx stx]
|
||||||
[source-file-path (parameterize ([current-directory
|
[source-file-path (parameterize ([current-directory
|
||||||
(current-load-relative-directory)])
|
(or (current-load-relative-directory)
|
||||||
|
(current-directory))])
|
||||||
(normalize-path (syntax-e #'original-source-file-path)))]
|
(normalize-path (syntax-e #'original-source-file-path)))]
|
||||||
[expected-file-path (parameterize ([current-directory
|
[expected-file-path (parameterize ([current-directory
|
||||||
(current-load-relative-directory)])
|
(or (current-load-relative-directory)
|
||||||
|
(current-directory))])
|
||||||
(normalize-path (syntax-e #'original-expected-file-path)))])
|
(normalize-path (syntax-e #'original-expected-file-path)))])
|
||||||
(quasisyntax/loc #'stx
|
(quasisyntax/loc #'stx
|
||||||
(test/loc original-source-file-path source-file-path
|
(test/loc original-source-file-path source-file-path
|
||||||
|
|
Loading…
Reference in New Issue
Block a user