Make uncaught exceptions in teaching languages pop up test-engine display.

... so as to catch any test-case failures or signature violations that
may have occurred.
This commit is contained in:
Mike Sperber 2010-10-08 10:25:37 +02:00
parent 6997b08fa2
commit b98b83b672
2 changed files with 14 additions and 3 deletions

View File

@ -191,7 +191,12 @@
;; hack: the test-engine code knows about the test~object name; we do, too
(namespace-set-variable-value! 'test~object (build-test-engine))
;; record test-case failures with the test engine
(uncaught-exception-handler
(let ((previous (uncaught-exception-handler)))
(lambda (exc)
(display-results)
(previous exc))))
;; record signature violations with the test engine
(signature-violation-proc
(lambda (obj signature message blame)
(cond

View File

@ -33,7 +33,8 @@
(only-in test-engine/scheme-gui make-formatter)
(only-in test-engine/scheme-tests
scheme-test-data error-handler test-format test-execute build-test-engine)
scheme-test-data error-handler test-format test-execute display-results
build-test-engine)
(lib "test-engine/test-display.scm")
deinprogramm/signature/signature
)
@ -155,7 +156,12 @@
(namespace-require scheme-signature-module-name)
;; hack: the test-engine code knows about the test~object name; we do, too
(namespace-set-variable-value! 'test~object (build-test-engine))
;; record test-case failures with the test engine
(uncaught-exception-handler
(let ((previous (uncaught-exception-handler)))
(lambda (exc)
(display-results)
(previous exc))))
;; record signature violations with the test engine
(signature-violation-proc
(lambda (obj signature message blame)
(cond