From e73a7b2fb50f062fc1e7b74d9057ffe9b4385e4c Mon Sep 17 00:00:00 2001 From: Dave Parker Date: Wed, 8 Jul 2015 22:55:53 +0000 Subject: [PATCH] Undo regression test change: Error RESULT specifications cannot contains spaces (causes problems on specs with comments). git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@10261 bbc10eb1-c90d-0410-af57-cb519fbb1720 --- prism/src/parser/ast/Property.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/prism/src/parser/ast/Property.java b/prism/src/parser/ast/Property.java index a7e974f0..67fc28bd 100644 --- a/prism/src/parser/ast/Property.java +++ b/prism/src/parser/ast/Property.java @@ -152,7 +152,7 @@ public class Property extends ASTElement // Extract expected result(s) from comment if (comment != null) { // Look for "RESULT: val" or "RESULT (x=1,y=2): val" - Pattern p = Pattern.compile("RESULT[ \t]*(\\(([^\\)]+)\\))?[ \t]*:[ \t]*([^\n\r]+)"); + Pattern p = Pattern.compile("RESULT[ \t]*(\\(([^\\)]+)\\))?[ \t]*:[ \t]*([^ \t\n\r]+)"); Matcher matcher = p.matcher(comment); // Look at each RESULT specification found while (matcher.find()) { @@ -266,9 +266,8 @@ public class Property extends ASTElement if (strExpected.startsWith("Error:")) { String words[] = strExpected.substring(6).split(","); for (String word : words) { - String mustContain = word.trim().toLowerCase(); - if (!errMsg.toLowerCase().contains(mustContain)) { - throw new PrismException("Error message should contain \"" + mustContain + "\""); + if (!errMsg.toLowerCase().contains(word)) { + throw new PrismException("Error message should contain \"" + word + "\""); } } }