123456789101112131415161718192021222324252627282930313233 |
- (use-modules
- ;; SRFI 64 for unit testing facilities
- (srfi srfi-64)
- ;; utils - the code to be tested
- (utils math))
- (test-begin "math-utils-test")
- (test-group
- "exact-floor"
- (test-equal "exact-floor with positive number"
- 1
- (exact-floor 1.3))
- (test-equal "exact-floor with negative number"
- -3
- (exact-floor -2.9)))
- (test-group
- "exact-ceiling"
- (test-equal "exact-ceiling with positive number"
- 2
- (exact-ceiling 1.3))
- (test-equal "exact-ceiling with negative number"
- -2
- (exact-ceiling -2.9)))
- (test-end "math-utils-test")
|