Changeset 29954 in project for release/4/r7rs/trunk/tests/run.scm


Ignore:
Timestamp:
10/25/13 00:08:28 (8 years ago)
Author:
evhan
Message:

r7rs: Extended-arity char*? and string*? comparators

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/r7rs/trunk/tests/run.scm

    r29599 r29954  
    299299   (test '((3 8 2 8)) (list b))
    300300   (test '((1 8 2 8)) (list a))))
     301
     302(test-group "6.6: characters"
     303  (test-group "char*?"
     304    (test-error "arity" (char=? #\a))
     305    (test-error "type check" (char=? #\a #\a 1))
     306    (test-error "no shortcutting" (char=? #\a #\b 1))
     307    (test #t (char=? #\a #\a))
     308    (test #f (char=? #\a #\b))
     309    (test #t (char=? #\a #\a #\a))
     310    (test #f (char=? #\a #\b #\a))
     311    (test #f (char=? #\a #\a #\b))
     312    (test #t (char=? #\a #\a #\a #\a))
     313    (test #f (char=? #\a #\b #\a #\a))
     314    (test #f (char=? #\a #\a #\a #\b))
     315    (test #t (char<? #\a #\b #\c))
     316    (test #f (char<? #\a #\b #\b))
     317    (test #t (char<=? #\a #\b #\b))
     318    (test #f (char<=? #\a #\b #\a))
     319    (test #t (char>? #\c #\b #\a))
     320    (test #f (char>? #\a #\a #\a))
     321    (test #t (char>=? #\b #\b #\a))
     322    (test #f (char>=? #\b #\a #\b))))
     323
     324(test-group "6.7: strings"
     325  (test-group "string*?"
     326    (test-error "arity" (string=? "a"))
     327    (test-error "type check" (string=? "a" "a" 1))
     328    (test-error "no shortcutting" (string=? "a" "b" 1))
     329    (test #t (string=? "a" "a"))
     330    (test #f (string=? "a" "b"))
     331    (test #t (string=? "a" "a" "a"))
     332    (test #f (string=? "a" "b" "a"))
     333    (test #f (string=? "a" "a" "b"))
     334    (test #t (string=? "a" "a" "a" "a"))
     335    (test #f (string=? "a" "b" "a" "a"))
     336    (test #f (string=? "a" "a" "a" "b"))
     337    (test #t (string<? "a" "b" "c"))
     338    (test #f (string<? "a" "b" "b"))
     339    (test #t (string<=? "a" "b" "b"))
     340    (test #f (string<=? "a" "b" "a"))
     341    (test #t (string>? "c" "b" "a"))
     342    (test #f (string>? "c" "b" "b"))
     343    (test #t (string>=? "b" "b" "a"))
     344    (test #f (string>=? "b" "a" "b"))))
    301345
    302346(define-syntax catch
Note: See TracChangeset for help on using the changeset viewer.