Browse Source

Bug fix - multiple constants in RESULT spec for testing was not working.

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

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

@ -155,10 +155,11 @@ public class Property extends ASTElement
// Look at each RESULT specification found // Look at each RESULT specification found
while (matcher.find()) { while (matcher.find()) {
String constValsSubstring = matcher.group(2) == null ? "" : matcher.group(2); String constValsSubstring = matcher.group(2) == null ? "" : matcher.group(2);
boolean match = true;
boolean allMatch = true;
// Look at each constant in the list // Look at each constant in the list
String ss[] = constValsSubstring.split(","); String ss[] = constValsSubstring.split(",");
for (String s : ss) { for (String s : ss) {
boolean match = true;
s = s.trim(); s = s.trim();
if (s.length() == 0) if (s.length() == 0)
continue; continue;
@ -177,9 +178,11 @@ public class Property extends ASTElement
// Otherwise just check for exact string match for now // Otherwise just check for exact string match for now
else else
match = constValToMatch.toString().equals(constVal); match = constValToMatch.toString().equals(constVal);
// We need all constants to match
allMatch &= match;
} }
// Found it... // Found it...
if (match) {
if (allMatch) {
strExpected = matcher.group(3); strExpected = matcher.group(3);
continue; continue;
} }

Loading…
Cancel
Save