You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
558 B
22 lines
558 B
3 years ago
|
#lang racket/base
|
||
|
|
||
|
(require "grains.rkt")
|
||
|
|
||
|
(module+ test
|
||
|
(require rackunit rackunit/text-ui)
|
||
|
|
||
|
(define suite
|
||
|
(test-suite
|
||
|
"grains tests"
|
||
|
|
||
|
(test-eqv? "square 1" (square 1) 1)
|
||
|
(test-eqv? "square 2" (square 2) 2)
|
||
|
(test-eqv? "square 3" (square 3) 4)
|
||
|
(test-eqv? "square 4" (square 4) 8)
|
||
|
(test-eqv? "square 16" (square 16) 32768)
|
||
|
(test-eqv? "square 32" (square 32) 2147483648)
|
||
|
(test-eqv? "square 64" (square 64) 9223372036854775808)
|
||
|
(test-eqv? "total grains" (total) 18446744073709551615)))
|
||
|
|
||
|
(run-tests suite))
|