Lines Matching refs:set

9          (test-equal char-set= . o))))
13 (test-not (char-set? 5))
15 (test-assert (char-set? (char-set #\a #\e #\i #\o #\u)))
17 (test-assert (char-set=))
18 (test-assert (char-set= (char-set)))
20 (test-cs (char-set #\a #\e #\i #\o #\u)
21 (string->char-set "ioeauaiii"))
23 (test-not (char-set= (char-set #\e #\i #\o #\u)
24 (string->char-set "ioeauaiii")))
26 (test-assert (char-set<=))
27 (test-assert (char-set<= (char-set)))
29 (test-assert (char-set<= (char-set #\a #\e #\i #\o #\u)
30 (string->char-set "ioeauaiii")))
32 (test-assert (char-set<= (char-set #\e #\i #\o #\u)
33 (string->char-set "ioeauaiii")))
35 (test-assert (<= 0 (char-set-hash char-set:graphic 100) 99))
37 (test 4 (char-set-fold (lambda (c i) (+ i 1)) 0
38 (char-set #\e #\i #\o #\u #\e #\e)))
40 (test-cs (string->char-set "eiaou2468013579999")
41 (char-set-unfold null? car cdr
43 (char-set-intersection char-set:ascii
44 char-set:digit)))
46 (test-cs (string->char-set "eiaou246801357999")
47 (char-set-unfold! null? car cdr '(#\a #\e #\i #\o #\u)
48 (string->char-set "0123456789")))
50 (test-not (char-set= (string->char-set "eiaou246801357")
51 (char-set-unfold! null? car cdr
53 (string->char-set "0123456789"))))
55 (let ((cs (string->char-set "0123456789")))
56 (char-set-for-each (lambda (c) (set! cs (char-set-delete cs c)))
57 (string->char-set "02468000"))
58 (test-cs cs (string->char-set "97531")))
60 (test-not (let ((cs (string->char-set "0123456789")))
61 (char-set-for-each (lambda (c) (set! cs (char-set-delete cs c)))
62 (string->char-set "02468"))
63 (char-set= cs (string->char-set "7531"))))
65 (test-cs (string->char-set "IOUAEEEE")
66 (char-set-map char-upcase (string->char-set "aeiou")))
68 (test-not (char-set= (char-set-map char-upcase (string->char-set "aeiou"))
69 (string->char-set "OUAEEEE")))
71 (test-cs (string->char-set "aeiou")
72 (char-set-copy (string->char-set "aeiou")))
74 (test-cs (string->char-set "xy") (char-set #\x #\y))
75 (test-not (char-set= (char-set #\x #\y #\z) (string->char-set "xy")))
77 (test-cs (string->char-set "xy") (list->char-set '(#\x #\y)))
78 (test-not (char-set= (string->char-set "axy")
79 (list->char-set '(#\x #\y))))
81 (test-cs (string->char-set "xy12345")
82 (list->char-set '(#\x #\y) (string->char-set "12345")))
83 (test-not (char-set= (string->char-set "y12345")
84 (list->char-set '(#\x #\y)
85 (string->char-set "12345"))))
87 (test-cs (string->char-set "xy12345")
88 (list->char-set! '(#\x #\y) (string->char-set "12345")))
89 (test-not (char-set= (string->char-set "y12345")
90 (list->char-set! '(#\x #\y)
91 (string->char-set "12345"))))
93 (test-cs (string->char-set "aeiou12345")
94 (char-set-filter vowel?
95 char-set:ascii
96 (string->char-set "12345")))
97 (test-not (char-set= (string->char-set "aeou12345")
98 (char-set-filter vowel?
99 char-set:ascii
100 (string->char-set "12345"))))
102 (test-cs (string->char-set "aeiou12345")
103 (char-set-filter! vowel?
104 char-set:ascii
105 (string->char-set "12345")))
106 (test-not (char-set= (string->char-set "aeou12345")
107 (char-set-filter! vowel?
108 char-set:ascii
109 (string->char-set "12345"))))
111 (test-cs (string->char-set "abcdef12345")
112 (ucs-range->char-set 97 103 #t (string->char-set "12345")))
113 (test-not (char-set=
114 (string->char-set "abcef12345")
115 (ucs-range->char-set 97 103 #t (string->char-set "12345"))))
117 (test-cs (string->char-set "abcdef12345")
118 (ucs-range->char-set! 97 103 #t (string->char-set "12345")))
119 (test-not (char-set=
120 (string->char-set "abcef12345")
121 (ucs-range->char-set! 97 103 #t (string->char-set "12345"))))
123 (test-assert (char-set= (->char-set #\x)
124 (->char-set "x")
125 (->char-set (char-set #\x))))
127 (test-not (char-set= (->char-set #\x)
128 (->char-set "y")
129 (->char-set (char-set #\x))))
131 (test 10 (char-set-size
132 (char-set-intersection char-set:ascii char-set:digit)))
133 (test 10 (char-set-size
134 (char-set-intersection char-set:digit char-set:ascii)))
136 (test 5 (char-set-count vowel? char-set:ascii))
138 (test '(#\x) (char-set->list (char-set #\x)))
139 (test-not (equal? '(#\X) (char-set->list (char-set #\x))))
141 (test "x" (char-set->string (char-set #\x)))
142 (test-not (equal? "X" (char-set->string (char-set #\x))))
144 (test-assert (char-set-contains? (->char-set "xyz") #\x))
145 (test-not (char-set-contains? (->char-set "xyz") #\a))
147 (test-assert (char-set-every char-lower-case? (->char-set "abcd")))
148 (test-not (char-set-every char-lower-case? (->char-set "abcD")))
149 (test-assert (char-set-any char-lower-case? (->char-set "abcd")))
150 (test-not (char-set-any char-lower-case? (->char-set "ABCD")))
152 (test-cs (->char-set "ABCD")
153 (let ((cs (->char-set "abcd")))
154 (let lp ((cur (char-set-cursor cs)) (ans '()))
155 (if (end-of-char-set? cur) (list->char-set ans)
156 (lp (char-set-cursor-next cs cur)
157 (cons (char-upcase (char-set-ref cs cur)) ans))))))
160 (test-cs (->char-set "123xa")
161 (char-set-adjoin (->char-set "123") #\x #\a))
162 (test-not (char-set= (char-set-adjoin (->char-set "123") #\x #\a)
163 (->char-set "123x")))
164 (test-cs (->char-set "123xa")
165 (char-set-adjoin! (->char-set "123") #\x #\a))
166 (test-not (char-set= (char-set-adjoin! (->char-set "123") #\x #\a)
167 (->char-set "123x")))
169 (test-cs (->char-set "13")
170 (char-set-delete (->char-set "123") #\2 #\a #\2))
171 (test-not (char-set= (char-set-delete (->char-set "123") #\2 #\a #\2)
172 (->char-set "13a")))
173 (test-cs (->char-set "13")
174 (char-set-delete! (->char-set "123") #\2 #\a #\2))
175 (test-not (char-set= (char-set-delete! (->char-set "123") #\2 #\a #\2)
176 (->char-set "13a")))
178 (test-cs (->char-set "abcdefABCDEF")
179 (char-set-intersection char-set:hex-digit
180 (char-set-complement char-set:digit)))
181 (test-cs (->char-set "abcdefABCDEF")
182 (char-set-intersection!
183 (char-set-complement! (->char-set "0123456789"))
184 char-set:hex-digit))
186 (test-cs (->char-set "abcdefABCDEFghijkl0123456789")
187 (char-set-union char-set:hex-digit
188 (->char-set "abcdefghijkl")))
189 (test-cs (->char-set "abcdefABCDEFghijkl0123456789")
190 (char-set-union! (->char-set "abcdefghijkl")
191 char-set:hex-digit))
193 (test-cs (->char-set "ghijklmn")
194 (char-set-difference (->char-set "abcdefghijklmn")
195 char-set:hex-digit))
196 (test-cs (->char-set "ghijklmn")
197 (char-set-difference! (->char-set "abcdefghijklmn")
198 char-set:hex-digit))
200 (test-cs (->char-set "abcdefABCDEF")
201 (char-set-xor (->char-set "0123456789")
202 char-set:hex-digit))
203 (test-cs (->char-set "abcdefABCDEF")
204 (char-set-xor! (->char-set "0123456789")
205 char-set:hex-digit))
209 (char-set-diff+intersection char-set:hex-digit
210 char-set:letter))
212 (test-cs d (->char-set "0123456789"))
213 (test-cs i (->char-set "abcdefABCDEF"))))
217 (char-set-diff+intersection! (char-set-copy char-set:hex-digit)
218 (char-set-copy char-set:letter)))
220 (test-cs d (->char-set "0123456789"))
221 (test-cs i (->char-set "abcdefABCDEF"))))