From a04d0f8fbd69ed586f93bc7dfc1cf2f4e05f4303 Mon Sep 17 00:00:00 2001 From: whitequark Date: Thu, 19 Nov 2015 23:26:42 +0800 Subject: [PATCH] lit-test: fix inferencer/error_class test (broken in b0c6b70). --- lit-test/test/inferencer/error_class.py | 6 ------ lit-test/test/inferencer/error_class_redefine.py | 8 ++++++++ 2 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 lit-test/test/inferencer/error_class_redefine.py diff --git a/lit-test/test/inferencer/error_class.py b/lit-test/test/inferencer/error_class.py index dbb399494..0cc075b05 100644 --- a/lit-test/test/inferencer/error_class.py +++ b/lit-test/test/inferencer/error_class.py @@ -8,9 +8,3 @@ class a(1): class b: # CHECK-L: ${LINE:+1}: fatal: class body must contain only assignments and function definitions x += 1 - -class c: - pass -# CHECK-L: ${LINE:+1}: fatal: variable 'c' is already defined -class c: - pass diff --git a/lit-test/test/inferencer/error_class_redefine.py b/lit-test/test/inferencer/error_class_redefine.py new file mode 100644 index 000000000..d5556fd98 --- /dev/null +++ b/lit-test/test/inferencer/error_class_redefine.py @@ -0,0 +1,8 @@ +# RUN: %python -m artiq.compiler.testbench.inferencer +diag %s >%t +# RUN: OutputCheck %s --file-to-check=%t + +class c: + pass +# CHECK-L: ${LINE:+1}: fatal: variable 'c' is already defined +class c: + pass