summaryrefslogtreecommitdiffstats
path: root/srfi-225-test.scm
diff options
context:
space:
mode:
authorGravatar John Cowan 2021-11-11 16:48:07 -0500
committerGravatar John Cowan 2021-11-11 16:48:07 -0500
commit1ff574608d023a5c98f7b30f9025c7aa7e4b53f7 (patch)
tree2084df6c76ed4c0b7517cd299d70dd96bca55238 /srfi-225-test.scm
parentMerge remote-tracking branch 'arvyy/master' (diff)
parentcomments (diff)
Merge remote-tracking branch 'arvyy/master'
Diffstat (limited to 'srfi-225-test.scm')
-rw-r--r--srfi-225-test.scm67
1 files changed, 12 insertions, 55 deletions
diff --git a/srfi-225-test.scm b/srfi-225-test.scm
index 9de1e7b..68402bc 100644
--- a/srfi-225-test.scm
+++ b/srfi-225-test.scm
@@ -135,34 +135,6 @@
(test-equal (dict-ref/default dtd (alist->dict '((a . b))) 'a 'c) 'b)
(test-equal (dict-ref/default dtd (alist->dict '((a* . b))) 'a 'c) 'c))
- (test-group
- "dict-min-key"
- (define dict (alist->dict '((2 . a) (1 . b) (3 . c))))
- (call/cc (lambda (cont)
- (with-exception-handler
- (lambda (err)
- (unless (let* ((cmp (dict-comparator dtd (alist->dict '())))
- (ordering (and cmp (comparator-ordering-predicate cmp))))
- ordering)
- (cont #t)))
- (lambda ()
- (define key (dict-min-key dtd dict))
- (test-equal 1 key))))))
-
- (test-group
- "dict-max-key"
- (define dict (alist->dict '((2 . a) (3 . b) (1 . c))))
- (call/cc (lambda (cont)
- (with-exception-handler
- (lambda (err)
- (unless (let* ((cmp (dict-comparator dtd (alist->dict '())))
- (ordering (and cmp (comparator-ordering-predicate cmp))))
- ordering)
- (cont #t)))
- (lambda ()
- (define key (dict-max-key dtd dict))
- (test-equal 3 key))))))
-
(when mutable?
(test-skip 1))
(test-group
@@ -716,7 +688,7 @@
(test-group
"dict-for-each<"
(test-for-each (let* ((cmp (dict-comparator dtd (alist->dict '())))
- (ordering (and cmp (comparator-ordering-predicate cmp))))
+ (ordering (and cmp (comparator-ordered? cmp))))
ordering)
(lambda (proc)
(dict-for-each< dtd
@@ -731,7 +703,7 @@
(test-group
"dict-for-each<="
(test-for-each (let* ((cmp (dict-comparator dtd (alist->dict '())))
- (ordering (and cmp (comparator-ordering-predicate cmp))))
+ (ordering (and cmp (comparator-ordered? cmp))))
ordering)
(lambda (proc)
(dict-for-each<= dtd
@@ -746,7 +718,7 @@
(test-group
"dict-for-each>"
(test-for-each (let* ((cmp (dict-comparator dtd (alist->dict '())))
- (ordering (and cmp (comparator-ordering-predicate cmp))))
+ (ordering (and cmp (comparator-ordered? cmp))))
ordering)
(lambda (proc)
(dict-for-each> dtd
@@ -761,7 +733,7 @@
(test-group
"dict-for-each>="
(test-for-each (let* ((cmp (dict-comparator dtd (alist->dict '())))
- (ordering (and cmp (comparator-ordering-predicate cmp))))
+ (ordering (and cmp (comparator-ordered? cmp))))
ordering)
(lambda (proc)
(dict-for-each>= dtd
@@ -776,7 +748,7 @@
(test-group
"dict-for-each-in-open-interval"
(test-for-each (let* ((cmp (dict-comparator dtd (alist->dict '())))
- (ordering (and cmp (comparator-ordering-predicate cmp))))
+ (ordering (and cmp (comparator-ordered? cmp))))
ordering)
(lambda (proc)
(dict-for-each-in-open-interval dtd
@@ -791,7 +763,7 @@
(test-group
"dict-for-each-in-closed-interval"
(test-for-each (let* ((cmp (dict-comparator dtd (alist->dict '())))
- (ordering (and cmp (comparator-ordering-predicate cmp))))
+ (ordering (and cmp (comparator-ordered? cmp))))
ordering)
(lambda (proc)
(dict-for-each-in-closed-interval dtd
@@ -806,7 +778,7 @@
(test-group
"dict-for-each-in-open-closed-interval"
(test-for-each (let* ((cmp (dict-comparator dtd (alist->dict '())))
- (ordering (and cmp (comparator-ordering-predicate cmp))))
+ (ordering (and cmp (comparator-ordered? cmp))))
ordering)
(lambda (proc)
(dict-for-each-in-open-closed-interval dtd
@@ -821,7 +793,7 @@
(test-group
"dict-for-each-in-closed-open-interval"
(test-for-each (let* ((cmp (dict-comparator dtd (alist->dict '())))
- (ordering (and cmp (comparator-ordering-predicate cmp))))
+ (ordering (and cmp (comparator-ordered? cmp))))
ordering)
(lambda (proc)
(dict-for-each-in-closed-open-interval dtd
@@ -864,7 +836,7 @@
;; check all procs were called
(for-each
(lambda (index)
- (when (= 0 (vector-ref counter index))
+ (when (> 0 (vector-ref counter index))
(error "Untested procedure" index)))
(iota (vector-length counter))))
@@ -886,8 +858,7 @@
minimal-alist-dtd
alist-copy
#f
- #f
- ))
+ #f))
(test-group
"alist"
@@ -903,24 +874,10 @@
"alist dict-comparator"
(test-assert (not (dict-comparator alist-equal-dtd '())))))
-(test-group
- "plist"
- (do-test
- plist-dtd
- (lambda (alist)
- (apply append
- (map (lambda (pair)
- (list (car pair) (cdr pair)))
- alist)))
- #f
- #f)
- (test-group
- "plist dict-comparator"
- (test-assert (not (dict-comparator plist-dtd '())))))
-
(cond-expand
((and (library (srfi 69))
- (not gauche)) ;; gauche has bug with comparator retrieval from srfi 69 table
+ (not gauche) ;; gauche has bug with comparator retrieval from srfi 69 table
+ )
(test-group
"srfi-69"
(do-test
alt='Gravatar' /> bencollins 1-1/+2 2003-07-13Update Debian changelog.Gravatar bencollins 1-0/+8 2003-07-13File doesn't really seem needed. The NEWS file gives a good overview, andGravatar bencollins 1-4/+0 2003-07-13Fix compiler warnings.Gravatar bencollins 4-12/+22 2003-07-13Updates from 0.10.0 release.Gravatar bencollins 4-5/+14 2003-04-23add libtoolize to bootstrapGravatar ddennedy 1-1/+10 2003-04-21added Dan Maas' rawiso docsGravatar ddennedy 1-32/+295 2003-04-07new_handle_on_port() error path fix from Jim RadfordGravatar dmaas 1-1/+3 2003-03-26add raw1394_new_handle_on_port() convenience functionGravatar dmaas 2-1/+41 2003-02-22Updates for new rawiso ioctl interface.Gravatar bencollins 3-37/+125 2003-01-15add iso_xmit_sync() and iso_xmit_write(); clean up iso handling a bitGravatar dmaas 5-39/+161 2003-01-15implement tag matching for rawiso receptionGravatar dmaas 3-4/+12 2003-01-06back out previous commit - don't drop the legacy API just yetGravatar dmaas 6-173/+130 2003-01-05emulate legacy ISO reception API on top of new rawiso APIGravatar dmaas 7-131/+174 2002-12-24update iso API for multi-channel reception and new packet buffer layoutGravatar dmaas 4-123/+236 2002-12-20oops, irq_interval needs to be signedGravatar anonymous 1-1/+1 2002-12-20dmaas - renamed exported arm definitions into the raw1394_ namespace; brought...Gravatar anonymous 3-124/+48 2002-12-16rawiso updates:Gravatar dmaas 3-18/+25 2002-11-18fix cplusplus extern C blockGravatar ddennedy 1-4/+4 2002-11-18merged rawiso branchGravatar ddennedy 7-6/+488