예제 #1
0
 @Test
 public void testBitExpressions() {
   statemachine.enter();
   assertTrue(statemachine.isStateActive(State.main_region_StateA));
   assertTrue(statemachine.getMyBit1() == 5);
   assertTrue(statemachine.getMyBit2() == 7);
   statemachine.raiseE1();
   statemachine.runCycle();
   assertTrue(statemachine.isStateActive(State.main_region_StateB));
   assertTrue(statemachine.getLeftBitshift() == 10);
   assertTrue(statemachine.getRightBitshift() == 2);
   assertTrue(statemachine.getComplementBitshift() == -6);
   assertTrue(statemachine.getBitwiseAnd() == 5);
   assertTrue(statemachine.getBitwiseOr() == 7);
   assertTrue(statemachine.getBitwiseXor() == 2);
 }
예제 #2
0
 @Before
 public void setUp() {
   statemachine = new BitExpressionsStatemachine();
   statemachine.init();
 }