From 711eb39eb9a6e8e2f2317043d39c30f12b7c04e5 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Mon, 16 Mar 2015 14:55:35 +0100 Subject: [PATCH] Missing parenteses in assert detected --- src/preprocessed_text.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/preprocessed_text.py b/src/preprocessed_text.py index b7a4bf8..ec7575a 100644 --- a/src/preprocessed_text.py +++ b/src/preprocessed_text.py @@ -522,6 +522,8 @@ def irp_simple_statements(text): def process_assert(line): assert type(line) == Assert if command_line.do_assert: + if '(' not in line.text or ')' not in line.text: + error.fail(line,"Syntax error in ASSERT statement (parentheses)") condition = "(%s"%(line.text.split('(',1)[1]) if condition == "": error.fail(line,"Error in Assert statement")