mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-29 22:40:34 +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:
parent
9a79f394f9
commit
6f640c9f22
5 changed files with 57 additions and 12 deletions
|
@ -53,8 +53,7 @@
|
|||
(pass-if "throwing to a rewound catch context"
|
||||
(eq? (dont-crash-please) 'no-reentry))
|
||||
|
||||
(let ((dopts (debug-options)))
|
||||
(debug-enable 'debug)
|
||||
(with-debugging-evaluator
|
||||
|
||||
(pass-if "make a stack from a continuation"
|
||||
(stack? (call-with-current-continuation make-stack)))
|
||||
|
@ -64,8 +63,6 @@
|
|||
(or (boolean? id) (symbol? id))))
|
||||
|
||||
(pass-if "get a continuation's innermost frame"
|
||||
(pair? (call-with-current-continuation last-stack-frame)))
|
||||
|
||||
(debug-options dopts))
|
||||
(pair? (call-with-current-continuation last-stack-frame))))
|
||||
|
||||
)
|
||||
|
|
|
@ -294,7 +294,23 @@
|
|||
|
||||
(pass-if-exception "implicit forcing is not supported"
|
||||
exception:wrong-type-arg
|
||||
(+ (delay (* 3 7)) 13))))
|
||||
(+ (delay (* 3 7)) 13))
|
||||
|
||||
;; Tests that require the debugging evaluator...
|
||||
(with-debugging-evaluator
|
||||
|
||||
(pass-if "unmemoizing a promise"
|
||||
(display-backtrace
|
||||
(let ((stack #f))
|
||||
(false-if-exception (lazy-catch #t
|
||||
(lambda ()
|
||||
(let ((f (lambda (g) (delay (g)))))
|
||||
(force (f error))))
|
||||
(lambda _
|
||||
(set! stack (make-stack #t)))))
|
||||
stack)
|
||||
(%make-void-port "w"))
|
||||
#t))))
|
||||
|
||||
;;;
|
||||
;;; letrec init evaluation
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue