From 53036fa3886f67fd0370e894b77720f5084f2f35 Mon Sep 17 00:00:00 2001 From: Joachim Klein Date: Fri, 22 Jul 2016 10:38:33 +0000 Subject: [PATCH] Property.checkAgainstExpectedResultString: Integer results in exact mode Integer results are now also handled when using exact mode. git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11558 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 f7ea47a4..c96bb8b6 100644 --- a/prism/src/parser/ast/Property.java +++ b/prism/src/parser/ast/Property.java @@ -324,8 +324,8 @@ public class Property extends ASTElement throw new PrismException("Wrong result (expected " + (simple ? "" : strExpected + " = ") + boolExp + ", got " + boolRes + ")"); } - // Integer-valued properties - else if (type instanceof TypeInt) { + // Integer-valued properties (non-exact mode) + else if (type instanceof TypeInt && !(result instanceof BigRational)) { // Parse expected result int intExp; boolean simple = true; // is the expectation string a simple expression? @@ -401,8 +401,8 @@ public class Property extends ASTElement } } - // Double-valued properties (exact mode) - else if (type instanceof TypeDouble && result instanceof BigRational) { + // Double- and Int-valued properties (exact mode) + else if ((type instanceof TypeDouble || type instanceof TypeInt) && result instanceof BigRational) { // Parse expected result BigRational rationalRes = (BigRational) result; BigRational rationalExp = null;