示例#1
0
  void ckArrayValue(Value retValue) {
    Field theValueField = targetClass.fieldByName("eintArrayValue");
    ArrayReference theValue = (ArrayReference) targetClass.getValue(theValueField);
    IntegerValue theElem2 = (IntegerValue) theValue.getValue(2);

    ArrayReference theRetValue = (ArrayReference) retValue;
    IntegerValue retElem2 = (IntegerValue) theRetValue.getValue(2);
    int vv = theElem2.value();
    int rv = retElem2.value();
    if (vv != rv) {
      failure("failure: in[2]: expected " + vv + ", got " + rv);
    } else {
      System.out.println("Passed: int[2]: " + rv);
      earlyReturns++;
    }
  }
示例#2
0
  void ckIntValue(Value retValue) {
    Field theValueField = targetClass.fieldByName("eintValue");
    IntegerValue theValue = (IntegerValue) targetClass.getValue(theValueField);

    int vv = theValue.value();
    int rv = ((IntegerValue) retValue).value();
    if (vv != rv) {
      failure("failure: int: expected " + vv + ", got " + rv);
    } else {
      System.out.println("Passed: int " + rv);
      earlyReturns++;
    }
  }