diff options
| author | 2025-08-05 19:09:45 -0400 | |
|---|---|---|
| committer | 2025-08-05 19:09:45 -0400 | |
| commit | 79b46251e2b3fa1d8799e715adadbdf9b8454357 (patch) | |
| tree | 06d712f775b5af0bbd037c6a89b63504d4ee8141 | |
| parent | remove inspect-test-info procedure from mutexes so that it can itself lock mu... (diff) | |
add pretty-printer
| -rw-r--r-- | lib/conspire.scm | 10 | ||||
| -rw-r--r-- | lib/conspire.sld | 34 | ||||
| -rw-r--r-- | lib/threads.r7rs-srfi-18.scm (renamed from lib/r7rs-srfi-18.scm) | 0 | ||||
| -rw-r--r-- | lib/threads.single-threaded-r7rs.scm (renamed from lib/r7rs-single-threaded.scm) | 0 |
4 files changed, 29 insertions, 15 deletions
diff --git a/lib/conspire.scm b/lib/conspire.scm index 564b9f0..d830edd 100644 --- a/lib/conspire.scm +++ b/lib/conspire.scm @@ -176,10 +176,9 @@ (unless (dict-contains? never-print-dto never-print key) - (display (test-rewrite key)) - (display ": ") - (write (test-rewrite value)) - (newline))) + (pretty-print + (list (test-rewrite key) + (test-rewrite value))))) previous-dict))) (define (default-report-test previous-dto previous-test-info) @@ -275,13 +274,14 @@ (name-stack . ()) (rewriters . ,default-rewriters) (never-print-dto . ,equal-alist-dto) + (pretty-print . ,pretty-print) (never-print . ,(map (lambda (x) (cons x x)) '(before-test! skip-test? when-test-skipped setup-test! after-test report-test on-exception setup-group! after-group before-group! report-group never-print name rewriters - never-print-dto))))) + never-print-dto pretty-print))))) (define default-test-info-dto equal-alist-dto) diff --git a/lib/conspire.sld b/lib/conspire.sld index ec31053..4bd9bdc 100644 --- a/lib/conspire.sld +++ b/lib/conspire.sld @@ -56,15 +56,29 @@ (raise (make-conspire-error message irritants)))) ;; Library information for test-info object (cond-expand - (chicken (import (srfi 18)) - (include "r7rs-srfi-18.scm") + (chicken (import (srfi 18) (only (chicken pretty-print) + pretty-print)) + (include "threads.r7rs-srfi-18.scm") (include-library-declarations "rewriters.chicken.scm")) - (foment (import (srfi 18)) - (include "r7rs-srfi-18.scm") - (include-library-declarations "rewriters.foment.scm")) - (chibi (import (srfi 18)) - (include "r7rs-srfi-18.scm") - (include-library-declarations "rewriters.r7rs.scm")) - (else (include "r7rs-single-threaded.scm") - (include-library-declarations "rewriters.r7rs.scm"))) + (foment (import (srfi 18) (srfi 166)) + (include "threads.r7rs-srfi-18.scm") + (include-library-declarations "rewriters.foment.scm") + (begin (define (pretty-print obj) + (show #t (pretty obj)) + (newline)))) + (chibi (import (srfi 18) (srfi 166)) + (include "threads.r7rs-srfi-18.scm") + (include-library-declarations "rewriters.r7rs.scm") + (begin (define (pretty-print obj) + (show #t (pretty obj))))) + (gauche (import (gauche threads) (scheme show)) + (include "threads.r7rs-srfi-18.scm") + (include-library-declarations "rewriters.r7rs.scm") + (begin (define (pretty-print obj) + (show #t (pretty obj))))) + (else (include "threads.r7rs-single-threaded.scm") + (include-library-declarations "rewriters.r7rs.scm") + (begin (define (pretty-print x) + (write x) + (newline))))) (include "conspire.scm"))
\ No newline at end of file diff --git a/lib/r7rs-srfi-18.scm b/lib/threads.r7rs-srfi-18.scm index 59634d8..59634d8 100644 --- a/lib/r7rs-srfi-18.scm +++ b/lib/threads.r7rs-srfi-18.scm diff --git a/lib/r7rs-single-threaded.scm b/lib/threads.single-threaded-r7rs.scm index f3138e8..f3138e8 100644 --- a/lib/r7rs-single-threaded.scm +++ b/lib/threads.single-threaded-r7rs.scm |
