math.intervals: remove extra non-interval tests.
parent
30f2d6e78f
commit
20c4e2feaa
|
@ -3,8 +3,6 @@ math.intervals.private math.order math.statistics random sequences
|
|||
sequences.deep tools.test vocabs ;
|
||||
IN: math.intervals.tests
|
||||
|
||||
FROM: math.ranges => <range> ;
|
||||
|
||||
{ empty-interval } [ 2 2 (a,b) ] unit-test
|
||||
|
||||
{ empty-interval } [ 2 2.0 (a,b) ] unit-test
|
||||
|
@ -387,7 +385,7 @@ commutative-ops [
|
|||
] unit-test
|
||||
] each
|
||||
|
||||
! test singleton behavior
|
||||
! Test singleton behavior
|
||||
{ f } [ full-interval interval-nonnegative? ] unit-test
|
||||
|
||||
{ t } [ empty-interval interval-nonnegative? ] unit-test
|
||||
|
@ -401,7 +399,6 @@ commutative-ops [
|
|||
{ t } [ -1/0. 1/0. [ full-interval interval-contains? ] bi@ and ] unit-test
|
||||
|
||||
! Interval bitor
|
||||
|
||||
{ 1/0. } [ 1/0. bit-weight ] unit-test
|
||||
{ 1/0. } [ -1/0. bit-weight ] unit-test
|
||||
|
||||
|
@ -410,19 +407,6 @@ commutative-ops [
|
|||
[ 0 15 [a,b] interval-contains? ] all?
|
||||
] unit-test
|
||||
|
||||
: cartesian-bounds ( range range quot -- min max )
|
||||
cartesian-map flatten minmax ; inline
|
||||
|
||||
{ 0 15 } [ 16 <iota> dup [ bitor ] cartesian-bounds ] unit-test
|
||||
|
||||
{ -8 7 } [ -8 7 1 <range> dup [ bitor ] cartesian-bounds ] unit-test
|
||||
|
||||
{ 6 15 } [ 5 15 1 <range> 6 15 1 <range> [ bitor ] cartesian-bounds ] unit-test
|
||||
|
||||
{ -12 -1 } [ -16 -12 1 <range> -12 -2 1 <range> [ bitor ] cartesian-bounds ] unit-test
|
||||
|
||||
{ -16 15 } [ -16 4 1 <range> -1 15 1 <range> [ bitor ] cartesian-bounds ] unit-test
|
||||
|
||||
${ 0 255 [a,b] } [ 0 255 [a,b] dup interval-bitor ] unit-test
|
||||
${ 0 511 [a,b] } [ 0 256 [a,b] dup interval-bitor ] unit-test
|
||||
|
||||
|
@ -434,15 +418,7 @@ ${ 0 [a,inf] } [ 0 [a,inf] dup interval-bitor ] unit-test
|
|||
{ full-interval } [ 0 [-inf,a] dup interval-bitor ] unit-test
|
||||
${ 4 [a,inf] } [ 4 [a,inf] 3 [a,inf] interval-bitor ] unit-test
|
||||
|
||||
! interval-bitxor
|
||||
{ 0 15 } [ 16 <iota> dup [ bitxor ] cartesian-bounds ] unit-test
|
||||
|
||||
{ -8 7 } [ -8 7 1 <range> dup [ bitxor ] cartesian-bounds ] unit-test
|
||||
|
||||
{ 0 15 } [ -16 -1 1 <range> dup [ bitxor ] cartesian-bounds ] unit-test
|
||||
|
||||
{ -16 15 } [ -16 0 1 <range> dup [ bitxor ] cartesian-bounds ] unit-test
|
||||
|
||||
! Interval bitxor
|
||||
${ 0 255 [a,b] } [ 0 255 [a,b] dup interval-bitxor ] unit-test
|
||||
${ 0 511 [a,b] } [ 0 256 [a,b] dup interval-bitxor ] unit-test
|
||||
|
||||
|
|
Loading…
Reference in New Issue