From 07bed0bbe698cf3e0fe597db50e8d017954330bc Mon Sep 17 00:00:00 2001 From: Dave Parker Date: Mon, 9 Jun 2014 22:12:18 +0000 Subject: [PATCH] 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 --- prism/src/parser/ast/Property.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/prism/src/parser/ast/Property.java b/prism/src/parser/ast/Property.java index 32614b3a..b0462a62 100644 --- a/prism/src/parser/ast/Property.java +++ b/prism/src/parser/ast/Property.java @@ -155,10 +155,11 @@ public class Property extends ASTElement // Look at each RESULT specification found while (matcher.find()) { String constValsSubstring = matcher.group(2) == null ? "" : matcher.group(2); - boolean match = true; + boolean allMatch = true; // Look at each constant in the list String ss[] = constValsSubstring.split(","); for (String s : ss) { + boolean match = true; s = s.trim(); if (s.length() == 0) continue; @@ -177,9 +178,11 @@ public class Property extends ASTElement // Otherwise just check for exact string match for now else match = constValToMatch.toString().equals(constVal); + // We need all constants to match + allMatch &= match; } // Found it... - if (match) { + if (allMatch) { strExpected = matcher.group(3); continue; }