Browse Source

Test mode failure (for wrong result) shows obtained result as well as expected one.

git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@8850 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Dave Parker 12 years ago
parent
commit
3c6ca999b0
  1. 8
      prism/src/parser/ast/Property.java

8
prism/src/parser/ast/Property.java

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

Loading…
Cancel
Save