added some more information to the error messages when a syncheck test case fails

This commit is contained in:
Robby Findler 2010-10-19 17:16:00 -05:00
parent 5c94ca5b7c
commit ea985a81d6
2 changed files with 12 additions and 5 deletions

View File

@ -1022,7 +1022,8 @@ If the namespace does not, they are colored the unbound color.
(define syncheck-frame<%>
(interface ()
syncheck:button-callback
syncheck:error-report-visible?))
syncheck:error-report-visible?
syncheck:get-error-report-contents))
(define tab-mixin
@ -1154,6 +1155,10 @@ If the namespace does not, they are colored the unbound color.
(and (is-a? report-error-parent-panel area-container<%>)
(member report-error-panel (send report-error-parent-panel get-children))))
(define/public-final (syncheck:get-error-report-contents)
(and (syncheck:error-report-visible?)
(send (send report-error-canvas get-editor) get-text)))
(define/public (hide-error-report)
(when (syncheck:error-report-visible?)
(send (get-current-tab) turn-off-error-report)

View File

@ -898,10 +898,12 @@ trigger runtime errors in check syntax.
(when (send defs in-edit-sequence?)
(error 'syncheck-test.rkt "still in edit sequence for ~s" input))
(when (send drs syncheck:error-report-visible?)
(fprintf (current-error-port)
"FAILED ~s\n error report window is visible\n"
input))
(let ([err (send drs syncheck:get-error-report-contents)])
(when err
(fprintf (current-error-port)
"FAILED ~s\n error report window is visible:\n ~a\n"
input
err)))
;; need to check for syntax error here
(let ([got (get-annotated-output drs)])