Exemplo n.º 1
0
  @Test
  public void testAssumptions() {
    BitVector v = new BitVector(64);
    Assert.assertEquals(v.elements().length, 1);

    v.set(63);
    Assert.assertEquals(v.elements()[0], 1L << 63);
    logger.trace("Actual representation: {}", v.elements()[0]);
    v.set(0);
    Assert.assertEquals(v.elements()[0], (1L << 63) | 1L);
    logger.trace("Actual representation: {}", v.elements()[0]);
  }
 @Before
 public void setUp() throws Exception {
   pam = new MockPAM();
   tr = new BasicTranslator(SIZE, pam);
   ns = new NodeStructureImpl();
   Node n = new NodeImpl();
   n.setId(10);
   ns.addDefaultNode(n);
   n = new NodeImpl();
   n.setId(20);
   ns.addDefaultNode(n);
   vector = new BitVector(SIZE);
   vector.set(10);
   vector.set(20);
 }