From 3c6ca999b08750b08c188262bb491633536e55ba Mon Sep 17 00:00:00 2001 From: Dave Parker Date: Wed, 16 Jul 2014 17:08:53 +0000 Subject: [PATCH] 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 --- prism/src/parser/ast/Property.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/prism/src/parser/ast/Property.java b/prism/src/parser/ast/Property.java index b0462a62..aebe5340 100644 --- a/prism/src/parser/ast/Property.java +++ b/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"); 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 + ")"); } }