|
|
|
@ -292,7 +292,7 @@ public class Property extends ASTElement |
|
|
|
throw new PrismException("Result is wrong type for (boolean-valued) property"); |
|
|
|
boolRes = ((Boolean) result).booleanValue(); |
|
|
|
if (boolRes != boolExp) |
|
|
|
throw new PrismException("Wrong result (expected " + boolExp + ")"); |
|
|
|
throw new PrismException("Wrong result (expected " + boolExp + ", got " + boolRes + ")"); |
|
|
|
} |
|
|
|
|
|
|
|
// Integer-valued properties |
|
|
|
@ -310,7 +310,7 @@ public class Property extends ASTElement |
|
|
|
throw new PrismException("Result is wrong type for (integer-valued) property"); |
|
|
|
intRes = ((Integer) result).intValue(); |
|
|
|
if (intRes != intExp) |
|
|
|
throw new PrismException("Wrong result (expected " + intExp + ")"); |
|
|
|
throw new PrismException("Wrong result (expected " + intExp + ", got " +intRes + ")"); |
|
|
|
} |
|
|
|
|
|
|
|
// Double-valued properties |
|
|
|
@ -343,10 +343,10 @@ public class Property extends ASTElement |
|
|
|
// Compare results |
|
|
|
if (Double.isNaN(doubleRes)) { |
|
|
|
if (!Double.isNaN(doubleExp)) |
|
|
|
throw new PrismException("Wrong result (expected " + doubleExp + ")"); |
|
|
|
throw new PrismException("Wrong result (expected " + doubleExp + ", got NaN)"); |
|
|
|
} else { |
|
|
|
if (!PrismUtils.doublesAreCloseRel(doubleExp, doubleRes, 1e-5)) |
|
|
|
throw new PrismException("Wrong result (expected " + doubleExp + ")"); |
|
|
|
throw new PrismException("Wrong result (expected " + doubleExp + ", got " + doubleRes + ")"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|