Skip to content

Commit 78ab5b8

Browse files
committed
More tests.
1 parent 983c34c commit 78ab5b8

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

test/composite_set_test.dart

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,30 @@ void main() {
3838
expect(set.chunks.single.bitSet, const TypeMatcher<ListSet>());
3939
expect(set.asIntIterable().toList(), [65537]);
4040
});
41+
42+
test('and', () {
43+
final set1 = CompositeSet()
44+
..[1] = true
45+
..[65537] = true;
46+
final set2 = CompositeSet()
47+
..[1] = true
48+
..[2] = true;
49+
50+
set1.and(set2);
51+
expect(set1.asIntIterable().toList(), [1]);
52+
});
53+
54+
test('or', () {
55+
final set1 = CompositeSet()
56+
..[1] = true
57+
..[65537] = true;
58+
final set2 = CompositeSet()
59+
..[1] = true
60+
..[2] = true;
61+
62+
set1.or(set2);
63+
expect(set1.asIntIterable().toList(), [1, 2, 65537]);
64+
});
4165
});
4266

4367
group('CompositeSet equals and hashCode', () {

0 commit comments

Comments
 (0)