diff options
| author | 2025-08-05 18:48:07 -0400 | |
|---|---|---|
| committer | 2025-08-05 18:48:07 -0400 | |
| commit | b2d20f903a9de21e89b15b512123f6ff9aca3504 (patch) | |
| tree | b545b95f858344fa7b6061b7d04a951f55e9e81e | |
| parent | add chibi (diff) | |
remove inspect-test-info procedure from mutexes so that it can itself lock mutexes if desired
| -rw-r--r-- | lib/conspire.scm | 10 | ||||
| -rw-r--r-- | lib/r7rs-single-threaded.scm | 1 | ||||
| -rw-r--r-- | tests/impl.scm | 2 | ||||
| -rw-r--r-- | tests/run.scm | 1 |
4 files changed, 7 insertions, 7 deletions
diff --git a/lib/conspire.scm b/lib/conspire.scm index 74a4c03..564b9f0 100644 --- a/lib/conspire.scm +++ b/lib/conspire.scm @@ -36,11 +36,11 @@ (define (inspect-test-info proc) (let ((mutex (test-info-mutex (test-info)))) - (dynamic-wind - (lambda () (mutex-lock! mutex)) - (lambda () (proc (test-info-dto (test-info)) - (test-info-dict (test-info)))) - (lambda () (mutex-unlock! mutex))))) + (mutex-lock! mutex) + (let-values (((dto dict) (values (test-info-dto (test-info)) + (test-info-dict (test-info))))) + (mutex-unlock! mutex) + (proc dto dict)))) (define-syntax define-destructive-test-info-procedure (syntax-rules () diff --git a/lib/r7rs-single-threaded.scm b/lib/r7rs-single-threaded.scm index efa91c9..f3138e8 100644 --- a/lib/r7rs-single-threaded.scm +++ b/lib/r7rs-single-threaded.scm @@ -26,6 +26,7 @@ (dto test-info-dto) (dict test-info-dict set-test-info-dict!)) +(define (test-info-mutex x) #f) (define (mutex-lock! x) #f) (define (mutex-unlock! x) #f) diff --git a/tests/impl.scm b/tests/impl.scm index a25fa10..3a3e822 100644 --- a/tests/impl.scm +++ b/tests/impl.scm @@ -29,8 +29,6 @@ (test-group "test-ref, test-contains? and test-ref/default" (test-group "default keys" - (define (test-pair name key value) - (test-eq name key value)) (for-each (lambda (key value) (let ((name (symbol->string key))) (with-test-assert (string-append "contains " name) diff --git a/tests/run.scm b/tests/run.scm index 2eb43ad..474672c 100644 --- a/tests/run.scm +++ b/tests/run.scm @@ -25,5 +25,6 @@ (else #f)) (import (conspire) (srfi 225) (scheme load)) + (include "impl.scm") |
