From 9f6777bed5a78746f9c73f33f2ec82d4d12cc570 Mon Sep 17 00:00:00 2001 From: Dave Parker Date: Wed, 8 Jul 2015 23:02:34 +0000 Subject: [PATCH] Regression tests: detect and warn about spaces in Error RESULT specifications. git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@10262 bbc10eb1-c90d-0410-af57-cb519fbb1720 --- prism/src/parser/ast/Property.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/prism/src/parser/ast/Property.java b/prism/src/parser/ast/Property.java index 67fc28bd..0e5efd39 100644 --- a/prism/src/parser/ast/Property.java +++ b/prism/src/parser/ast/Property.java @@ -266,6 +266,9 @@ public class Property extends ASTElement if (strExpected.startsWith("Error:")) { String words[] = strExpected.substring(6).split(","); for (String word : words) { + if (word.length() == 0) { + throw new PrismException("Invalid RESULT specification: no expected words immediately following 'Error:'"); + } if (!errMsg.toLowerCase().contains(word)) { throw new PrismException("Error message should contain \"" + word + "\""); }