add more unit tests

db4
Doug Coleman 2008-10-04 12:45:10 -05:00
parent 5ca60480c5
commit ce7cf81224
1 changed files with 11 additions and 1 deletions

View File

@ -1,6 +1,6 @@
USING: math.intervals kernel sequences words math math.order
arrays prettyprint tools.test random vocabs combinators
accessors ;
accessors math.constants ;
IN: math.intervals.tests
[ empty-interval ] [ 2 2 (a,b) ] unit-test
@ -334,3 +334,13 @@ IN: math.intervals.tests
[ execute ] [ swapd execute ] 3bi =
] all?
] unit-test
[ t ] [ 1.0 1.0 epsilon + [a,b] random float? ] unit-test
[ t ] [ 1.0 1.0 epsilon + [a,b) random float? ] unit-test
[ t ] [ 1.0 1.0 epsilon + (a,b] random float? ] unit-test
[ 1.0 1.0 (a,b) random float? ] must-fail
[ 3 4 + (a,b) random ] must-fail
[ 3 ] [ 3 4 [a,b) random ] unit-test
[ 4 ] [ 3 4 (a,b] random ] unit-test
[ t ] [ 3 4 [a,b] random { 3 4 } member? ] unit-test