Debian Codegraph @

scheme/run-tests.64.ss

raw
1 #!../src/ikarus -b ikarus.boot --r6rs-script
2
3 ;;; Ikarus Scheme -- A compiler for R6RS Scheme.
4 ;;; Copyright (C) 2006,2007,2008 Abdulaziz Ghuloum
5 ;;;
6 ;;; This program is free software: you can redistribute it and/or modify
7 ;;; it under the terms of the GNU General Public License version 3 as
8 ;;; published by the Free Software Foundation.
9 ;;;
10 ;;; This program is distributed in the hope that it will be useful, but
11 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
12 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 ;;; General Public License for more details.
14 ;;;
15 ;;; You should have received a copy of the GNU General Public License
16 ;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18
19 (import (ikarus)
20 (tests bitwise-op)
21 (tests reader)
22 (tests lists)
23 (tests bytevectors)
24 (tests strings)
25 (tests hashtables)
26 (tests numerics)
27 ;(tests numbers)
28 (tests bignums)
29 (tests fixnums)
30 (tests div-and-mod)
31 (tests fxcarry)
32 (tests bignum-to-flonum)
33 (tests string-to-number)
34 (tests input-ports)
35 (tests fldiv-and-mod)
36 (tests parse-flonums)
37 (tests io)
38 (tests case-folding)
39 (tests sorting)
40 (tests fasl)
41 )
42
43 (define (test-exact-integer-sqrt)
44 (define (f i j inc)
45 (when (< i j)
46 (let-values ([(s r) (exact-integer-sqrt i)])
47 (unless (and (= (+ (* s s) r) i)
48 (< i (* (+ s 1) (+ s 1))))
49 (error 'exact-integer-sqrt "wrong result" i))
50 (f (+ i inc) j inc))))
51 (f 0 10000 1)
52 (f 0 536870911 10000)
53 (f 0 536870911000 536870911)
54 (printf "[exact-integer-sqrt] Happy Happy Joy Joy\n"))
55
56 (test-bitwise-op)
57 (test-parse-flonums)
58 (test-case-folding)
59 (test-reader)
60 (test-char-syntax)
61 (test-bytevectors)
62 (test-strings)
63 (test-exact-integer-sqrt)
64 (test-bignum-to-flonum)
65 (test-bignum->flonum)
66 (test-string-to-number)
67 (test-div-and-mod)
68 (test-bignums)
69 (test-bignum-length)
70 (test-fxcarry)
71 (test-lists)
72 (test-hashtables)
73 (test-input-ports)
74 (test-bignum-conversion)
75 (test-fldiv-and-mod)
76 (test-fldiv0-and-mod0)
77 (test-fxdiv-and-mod)
78 (test-fxdiv0-and-mod0)
79 (test-fxlength)
80 (test-bitwise-bit-count)
81 (test-io)
82 (test-sorting)
83 (test-fasl)
84 (test-numerics)
85
86 (printf "Happy Happy Joy Joy\n")