summaryrefslogtreecommitdiff
path: root/test-suite/lib.scm
diff options
context:
space:
mode:
authorNeil Jerram <neil@ossau.uklinux.net>2007-10-21 20:45:45 +0000
committerNeil Jerram <neil@ossau.uklinux.net>2007-10-21 20:45:45 +0000
commit2d04022ce290feb5eb3d59fc066b5aeed5909cbf (patch)
tree35286aa33e2971628aca789eb80b58f6f2c8742e /test-suite/lib.scm
parentacbfb5946b783c8782e1f36d183e896b18fcb5f6 (diff)
downloadguile-2d04022ce290feb5eb3d59fc066b5aeed5909cbf.tar.gz
* tests/continuations.test ("continuations"): Use
with-debugging-evaluator. * lib.scm (with-debugging-evaluator*, with-debugging-evaluator): New utilities. * standalone/test-use-srfi: Use -q to avoid picking up the user's ~/.guile file. * tests/eval.test (promises)[unmemoizing a promise]: New test.
Diffstat (limited to 'test-suite/lib.scm')
-rw-r--r--test-suite/lib.scm19
1 files changed, 19 insertions, 0 deletions
diff --git a/test-suite/lib.scm b/test-suite/lib.scm
index 2daf95c60..c4ddf9e7c 100644
--- a/test-suite/lib.scm
+++ b/test-suite/lib.scm
@@ -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
;;;;