use of soot.util.BitVector in project soot by Sable.
the class BitVector_intersects_Test method testSizedEmptyBitVectorDontIntersectsItself.
public void testSizedEmptyBitVectorDontIntersectsItself() {
BitVector a = new BitVector(1024);
assertFalse(a.intersects(a));
}
use of soot.util.BitVector in project soot by Sable.
the class BitVector_intersects_Test method testNotEquallySizedOverlappingBitVectorsIntersects.
public void testNotEquallySizedOverlappingBitVectorsIntersects() {
BitVector a = new BitVector(1024);
BitVector b = new BitVector(512);
a.set(337);
b.set(337);
assertTrue(a.intersects(b));
assertTrue(b.intersects(a));
a.clear(337);
b.clear(337);
for (int i = 0; i < 512; i++) {
a.set(i);
b.set(i);
assertTrue(a.intersects(b));
assertTrue(b.intersects(a));
a.clear(i);
b.clear(i);
}
}
use of soot.util.BitVector in project soot by Sable.
the class BitVector_intersects_Test method testEmptyBitvectorDontIntersectsItself.
public void testEmptyBitvectorDontIntersectsItself() {
BitVector a = new BitVector();
assertFalse(a.intersects(a));
}
use of soot.util.BitVector in project soot by Sable.
the class BitVector_intersects_Test method testNonOverlappingBitVectorsDontIntersects.
public void testNonOverlappingBitVectorsDontIntersects() {
BitVector a = new BitVector();
BitVector b = new BitVector();
int i;
for (i = 0; i < 512; i++) {
if (i % 2 == 0)
a.set(i);
else
b.set(i);
}
assertFalse(a.intersects(b));
assertFalse(b.intersects(a));
}
use of soot.util.BitVector in project soot by Sable.
the class BitVector_intersects_Test method testNotEquallySizedNonOverlappingBitVectorsDontIntersects.
public void testNotEquallySizedNonOverlappingBitVectorsDontIntersects() {
BitVector a = new BitVector();
BitVector b = new BitVector();
int i;
for (i = 0; i < 512; i++) {
a.set(i);
}
for (; i < 1024; i++) {
b.set(i);
}
assertFalse(a.intersects(b));
assertFalse(b.intersects(a));
}
Aggregations