Browse Source

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
master
Joachim Klein 10 years ago
parent
commit
53036fa388
  1. 8
      prism/src/parser/ast/Property.java

8
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;

Loading…
Cancel
Save