Search in sources :

Example 11 with BitVector

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));
}
Also used : BitVector(soot.util.BitVector)

Example 12 with BitVector

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);
    }
}
Also used : BitVector(soot.util.BitVector)

Example 13 with BitVector

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));
}
Also used : BitVector(soot.util.BitVector)

Example 14 with BitVector

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));
}
Also used : BitVector(soot.util.BitVector)

Example 15 with BitVector

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));
}
Also used : BitVector(soot.util.BitVector)

Aggregations

BitVector (soot.util.BitVector)24 SootClass (soot.SootClass)4 AllocNode (soot.jimple.spark.pag.AllocNode)4 BitSetIterator (soot.util.BitSetIterator)4 Node (soot.jimple.spark.pag.Node)3 AnySubType (soot.AnySubType)2 ArrayType (soot.ArrayType)2 NullType (soot.NullType)2 RefLikeType (soot.RefLikeType)2 RefType (soot.RefType)2 Type (soot.Type)2 TypeManager (soot.jimple.spark.internal.TypeManager)2 Iterator (java.util.Iterator)1 LinkedList (java.util.LinkedList)1 DoubleType (soot.DoubleType)1 FloatType (soot.FloatType)1 IntType (soot.IntType)1 LongType (soot.LongType)1