factor/library/test/random.factor

15 lines
266 B
Factor
Raw Normal View History

IN: temporary
2004-07-16 02:26:21 -04:00
USE: kernel
USE: lists
2004-08-26 22:21:17 -04:00
USE: math
2004-07-16 02:26:21 -04:00
USE: namespaces
USE: random
USE: test
USE: errors
2004-07-16 02:26:21 -04:00
: check-random-int ( min max -- )
2dup random-int -rot between?
[ "Assertion failed" throw ] unless ;
2004-07-16 02:26:21 -04:00
[ ] [ 100 [ -12 674 check-random-int ] times ] unit-test