source: project/chicken/trunk/tests/library-tests.scm @ 15555

Last change on this file since 15555 was 15555, checked in by felix winkelmann, 10 years ago

-O2 enables inlining by default; fixed bug in rational? reported by Zbigniew

File size: 472 bytes
Line 
1(assert (= -4.0 (round -4.3)))
2(assert (= 4.0 (round 3.5)))
3(assert (= 4 (round (string->number "7/2"))))
4(assert (= 7 (round 7)))
5(assert (zero? (round -0.5)))           ; is actually -0.0
6(assert (zero? (round -0.3)))
7(assert (= -1 (round -0.6)))
8(assert (zero? (round 0.5)))
9(assert (zero? (round 0.3)))
10(assert (= 1.0 (round 0.6)))
11(assert (rational? 1))
12(assert (rational? 1.0))
13(assert (not (rational? +inf.)))
14(assert (handle-exceptions ex #t (begin (rational? 'foo) #f)))
Note: See TracBrowser for help on using the repository browser.