Add some unit tests

db4
Slava Pestov 2009-08-22 17:15:10 -05:00
parent 1961b4da16
commit 81b72cb5c5
2 changed files with 12 additions and 0 deletions

View File

@ -180,3 +180,8 @@ IN: compiler.cfg.builder.tests
[ { byte-array fixnum } declare set-alien-unsigned-1 ]
[ ##set-alien-integer-1? ] contains-insn?
] unit-test
[ f ] [
[ 1000 [ ] times ]
[ [ ##peek? ] [ ##replace? ] bi or ] contains-insn?
] unit-test

View File

@ -23,6 +23,9 @@ IN: math.intervals.tests
[ T{ interval f { 1 t } { 1 t } } ] [ 1 [a,a] ] unit-test
[ 1 0/0. [a,b] ] must-fail
[ 0/0. 1 [a,b] ] must-fail
[ t ] [ { 3 t } { 3 f } endpoint< ] unit-test
[ t ] [ { 2 f } { 3 f } endpoint< ] unit-test
[ f ] [ { 3 f } { 3 t } endpoint< ] unit-test
@ -350,6 +353,10 @@ comparison-ops [
[ t ] [ full-interval interval-abs [0,inf] = ] unit-test
[ t ] [ [0,inf] interval-abs [0,inf] = ] unit-test
[ t ] [ empty-interval interval-abs empty-interval = ] unit-test
[ t ] [ [0,inf] interval-sq [0,inf] = ] unit-test
! Test that commutative interval ops really are