1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-19 18:20:22 +02:00

* tests/eval.test (promises)[unmemoizing a promise]: New test.

* tests/continuations.test ("continuations"): Use
with-debugging-evaluator.

* standalone/test-use-srfi: Use -q to avoid picking up the user's
~/.guile file

* lib.scm (with-debugging-evaluator*, with-debugging-evaluator):
New utilities.
This commit is contained in:
Neil Jerram 2007-10-19 22:07:31 +00:00
parent 9a79f394f9
commit 6f640c9f22
5 changed files with 57 additions and 12 deletions

View file

@ -42,6 +42,9 @@
with-test-prefix with-test-prefix* current-test-prefix
format-test-name
;; Using the debugging evaluator.
with-debugging-evaluator with-debugging-evaluator*
;; Reporting results in various ways.
register-reporter unregister-reporter reporter-registered?
make-count-reporter print-counts
@ -408,6 +411,22 @@
(defmacro with-test-prefix (prefix . body)
`(with-test-prefix* ,prefix (lambda () ,@body)))
;;; Call THUNK using the debugging evaluator.
(define (with-debugging-evaluator* thunk)
(let ((dopts #f))
(dynamic-wind
(lambda ()
(set! dopts (debug-options))
(debug-enable 'debug))
thunk
(lambda ()
(debug-options dopts)))))
;;; Evaluate BODY... using the debugging evaluator.
(define-macro (with-debugging-evaluator . body)
`(with-debugging-evaluator* (lambda () ,@body)))
;;;; REPORTERS
;;;;