1 USING: kernel sets tools.test ;
4 [ f ] [ { 0 1 1 2 3 5 } all-unique? ] unit-test
5 [ t ] [ { 0 1 2 3 4 5 } all-unique? ] unit-test
7 [ V{ 1 2 3 } ] [ { 1 2 2 3 3 } prune ] unit-test
8 [ V{ 3 2 1 } ] [ { 3 3 2 2 1 } prune ] unit-test
10 [ { } ] [ { } { } intersect ] unit-test
11 [ { 2 3 } ] [ { 1 2 3 } { 2 3 4 } intersect ] unit-test
13 [ { } ] [ { } { } diff ] unit-test
14 [ { 1 } ] [ { 1 2 3 } { 2 3 4 } diff ] unit-test
16 [ V{ } ] [ { } { } union ] unit-test
17 [ V{ 1 2 3 4 } ] [ { 1 2 3 } { 2 3 4 } union ] unit-test
20 [ 3 V{ 1 2 } clone [ adjoin ] keep ] unit-test
23 [ 3 V{ 1 3 2 } clone [ adjoin ] keep ] unit-test
25 [ t ] [ { 1 2 } { 1 3 } intersects? ] unit-test
27 [ f ] [ { 4 2 } { 1 3 } intersects? ] unit-test
29 [ f ] [ { } { 1 } intersects? ] unit-test
31 [ f ] [ { 1 } { } intersects? ] unit-test