diff --git a/src/ikarus.boot b/src/ikarus.boot index e2df7ea..6d8f0e3 100644 Binary files a/src/ikarus.boot and b/src/ikarus.boot differ diff --git a/src/libaltcogen.ss b/src/ikarus.compiler.altcogen.ss similarity index 100% rename from src/libaltcogen.ss rename to src/ikarus.compiler.altcogen.ss diff --git a/src/ikarus.compiler.ss b/src/ikarus.compiler.ss index 9ac2a42..a053f47 100644 --- a/src/ikarus.compiler.ss +++ b/src/ikarus.compiler.ss @@ -2340,7 +2340,7 @@ (define eval-core (lambda (x) ((compile-core-expr x)))) -(include "libaltcogen.ss") +(include "ikarus.compiler.altcogen.ss") (define current-primitive-locations (let ([plocs (lambda (x) #f)]) diff --git a/src/run-tests.ss b/src/run-tests.ss index 9244434..516420d 100755 --- a/src/run-tests.ss +++ b/src/run-tests.ss @@ -2,10 +2,11 @@ (import (ikarus) (tests reader) + (tests lists) (tests bytevectors) (tests strings) - (tests numbers) - (tests bignums) + ;(tests numbers) + ;(tests bignums) (tests fxcarry) (tests bignum-to-flonum) (tests string-to-number)) @@ -29,7 +30,8 @@ (test-exact-integer-sqrt) (test-bignum-to-flonum) (test-string-to-number) -(test-div-and-mod) -(test-bignums) +;(test-div-and-mod) +;(test-bignums) (test-fxcarry) +(test-lists) (printf "Happy Happy Joy Joy\n") diff --git a/src/tests/lists.ss b/src/tests/lists.ss new file mode 100644 index 0000000..af325da --- /dev/null +++ b/src/tests/lists.ss @@ -0,0 +1,19 @@ +(library (tests lists) + (export test-lists) + (import (ikarus) (tests framework)) + + (define-tests test-lists + [values (equal? (for-all even? '(1 2 3 4)) #f)] + [values (equal? (for-all even? '(10 12 14 16)) #t)] + [values (equal? (for-all even? '(2 3 4)) #f)] + [values (equal? (for-all even? '(12 14 16)) #t)] + [values (equal? (for-all (lambda (x) x) '(12 14 16)) 16)] + [values (equal? (for-all (lambda (x) x) '(12 14)) 14)] + [values (equal? (for-all (lambda (x) x) '(12)) 12)] + [values (equal? (for-all (lambda (x) x) '()) #t)] + [values (equal? (for-all even? '(13 . 14)) #f)] + [values (equal? (for-all cons '(1 2 3) '(a b c)) '(3 . c))] + [values (equal? (for-all (lambda (a b) (= a 1)) '(1 2 3) '(a b c)) #f)] + [values (equal? (for-all (lambda (a b) (= a 1)) '(1 2) '(a b c)) #f)] + )) + diff --git a/src/unicode/unicode-data.ss b/src/unicode/unicode-data.ss index 1f8e959..2ad5ad7 100755 --- a/src/unicode/unicode-data.ss +++ b/src/unicode/unicode-data.ss @@ -21,7 +21,7 @@ [(or (fx= i n) (memv (string-ref str i) '(#\; #\#))) i] [else (find-semi/hash str (+ i 1) n)])) - (define (cleanup^ str) + (define (cleanup str) (let ([lo (let f ([i 0] [n (string-length str)]) (cond @@ -40,13 +40,6 @@ (substring str lo hi) ""))) -(define (cleanup str) - (let ([s (cleanup^ str)]) - (when - (and (= (string-length str) 1) - (not (= (string-length s) 1))) - (error 'cleanup "duuh ~s ~s" s str)) - s)) (define (split str) (let f ([i 0] [n (string-length str)])