diff options
| author | 2025-07-17 20:11:52 -0400 | |
|---|---|---|
| committer | 2025-07-17 20:11:52 -0400 | |
| commit | 7008650fc8eb29e10d8f682035a87b953c4ca629 (patch) | |
| tree | e1ea0a4c395af76be937383ae9685a33191f8f62 /srfi-225-test.scm | |
| parent | Generate. (diff) | |
package for chicken1.0.0
Diffstat (limited to '')
| -rw-r--r-- | tests/run.scm (renamed from srfi-225-test.scm) | 122 |
1 files changed, 22 insertions, 100 deletions
diff --git a/srfi-225-test.scm b/tests/run.scm index 478b431..027e1ad 100644 --- a/srfi-225-test.scm +++ b/tests/run.scm @@ -4,49 +4,11 @@ (srfi 1) (srfi 128) (srfi 158) - (srfi 225)) - -(cond-expand - ((library (srfi 69)) - (import (prefix (srfi 69) t69-))) - (else)) - -(cond-expand - ((library (srfi 125)) - (import (prefix (srfi 125) t125-))) - (else)) - -(cond-expand - ((library (srfi 126)) - (import (prefix (srfi 126) t126-))) - (else)) - -(cond-expand - ((and (library (srfi 146)) - (library (srfi 146 hash))) - (import (srfi 146) - (srfi 146 hash))) - (else)) - -(cond-expand - (chibi - (import (rename (except (chibi test) test-equal) - (test test-equal) - (test-group test-group*))) - (define test-skip-count 0) - (define (test-skip n) - (set! test-skip-count n)) - (define-syntax test-group - (syntax-rules () - ((_ name body ...) - (test-group* - name - (if (> test-skip-count 0) - (set! test-skip-count (- test-skip-count 1)) - (let () - body ...))))))) - (else - (import (srfi 64)))) + (srfi 225) + (prefix (srfi 69) t69-) + (srfi 146) + (srfi 146 hash) + (srfi 64)) ;; returns new wrapper dto ;; which counts how often each dto's method was called @@ -881,11 +843,7 @@ #f #f)) -(cond-expand - ((and (library (srfi 69)) - (not gauche) ;; gauche has bug with comparator retrieval from srfi 69 table - ) - (test-group +(test-group "srfi-69" (do-test srfi-69-dto @@ -897,47 +855,12 @@ alist) table) (make-default-comparator) - #t))) - (else)) + #t)) -(cond-expand - ((library (srfi 125)) - (test-group - "srfi-125" - (do-test - hash-table-dto - (lambda (alist) - (define table (t125-hash-table-empty-copy (t125-make-hash-table equal?))) - (for-each - (lambda (pair) - (t125-hash-table-set! table (car pair) (cdr pair))) - alist) - table) - (make-default-comparator) - #t))) - (else)) -(cond-expand - ((library (srfi 126)) - (test-group - "srfi-126 (r6rs)" - (do-test - srfi-126-dto - (lambda (alist) - (define table (t126-make-eqv-hashtable)) - (for-each - (lambda (pair) - (t126-hashtable-set! table (car pair) (cdr pair))) - alist) - table) - (make-default-comparator) - #t))) - (else)) -(cond-expand - ((and (library (srfi 146)) - (library (srfi 146 hash))) - (test-group + +(test-group "srfi-146" (define cmp (make-default-comparator)) (do-test @@ -955,23 +878,22 @@ "srfi-146 dict-comparator" (test-equal cmp (dict-comparator mapping-dto (mapping cmp))))) - (test-group - "srfi-146 hash" +(test-group + "srfi-146 hash" (define cmp (make-default-comparator)) (do-test - hash-mapping-dto - (lambda (alist) - (let loop ((table (hashmap cmp)) + hash-mapping-dto + (lambda (alist) + (let loop ((table (hashmap cmp)) (entries alist)) - (if (null? entries) - table - (loop (hashmap-set! table (caar entries) (cdar entries)) - (cdr entries))))) - cmp - #f) + (if (null? entries) + table + (loop (hashmap-set! table (caar entries) (cdar entries)) + (cdr entries))))) + cmp + #f) (test-group - "srfi-146 hash dict-comparator" - (test-equal cmp (dict-comparator hash-mapping-dto (hashmap cmp)))))) - (else)) + "srfi-146 hash dict-comparator" + (test-equal cmp (dict-comparator hash-mapping-dto (hashmap cmp))))) (test-end) |
