Exemple #1
0
    @Test
    public void testCmplLongWithEqual() {
      TIntObjectMap<HeapItem> initial = VMTester.buildRegisterState(0, 0x100L, "J", 2, 0x100L, "J");
      TIntObjectMap<HeapItem> expected = VMTester.buildRegisterState(0, 0, "I");

      VMTester.testMethodState(CLASS_NAME, "CmpLong()V", initial, expected);
    }
Exemple #2
0
    @Test
    public void testCmpgFloatWithEqual() {
      TIntObjectMap<HeapItem> initial = VMTester.buildRegisterState(0, 4.5F, "F", 1, 4.5F, "F");
      TIntObjectMap<HeapItem> expected = VMTester.buildRegisterState(0, 0, "I");

      VMTester.testMethodState(CLASS_NAME, "CmpgFloat()V", initial, expected);
    }
Exemple #3
0
    @Test
    public void testCmplFloatWithGreaterThan() {
      TIntObjectMap<HeapItem> initial = VMTester.buildRegisterState(0, 20.5F, "F", 1, 0.5F, "F");
      TIntObjectMap<HeapItem> expected = VMTester.buildRegisterState(0, 1, "I");

      VMTester.testMethodState(CLASS_NAME, "CmplFloat()V", initial, expected);
    }
Exemple #4
0
    @Test
    public void testCmpgDoubleWithEqual() {
      TIntObjectMap<HeapItem> initial = VMTester.buildRegisterState(0, 4.5D, "D", 2, 4.5D, "D");
      TIntObjectMap<HeapItem> expected = VMTester.buildRegisterState(0, 0, "I");

      VMTester.testMethodState(CLASS_NAME, "CmpgDouble()V", initial, expected);
    }
Exemple #5
0
    @Test
    public void testCmplDoubleWithLessThan() {
      TIntObjectMap<HeapItem> initial = VMTester.buildRegisterState(0, 0.5D, "D", 2, 20.5D, "D");
      TIntObjectMap<HeapItem> expected = VMTester.buildRegisterState(0, -1, "I");

      VMTester.testMethodState(CLASS_NAME, "CmplDouble()V", initial, expected);
    }
Exemple #6
0
    @Test
    public void testCmplLongWithUnknownArgument() {
      TIntObjectMap<HeapItem> initial =
          VMTester.buildRegisterState(0, 0x100L, "J", 2, new UnknownValue(), "J");
      TIntObjectMap<HeapItem> expected = VMTester.buildRegisterState(0, new UnknownValue(), "I");

      VMTester.testMethodState(CLASS_NAME, "CmpLong()V", initial, expected);
    }
Exemple #7
0
    @Test
    public void testCmpgFloatWithUnknownArgment() {
      TIntObjectMap<HeapItem> initial =
          VMTester.buildRegisterState(0, 0.5F, "F", 1, new UnknownValue(), "F");
      TIntObjectMap<HeapItem> expected = VMTester.buildRegisterState(0, new UnknownValue(), "I");

      VMTester.testMethodState(CLASS_NAME, "CmpgFloat()V", initial, expected);
    }