From 1040a409c3c6ab23909cc767539ddcc2de974f9f Mon Sep 17 00:00:00 2001 From: whitequark Date: Tue, 18 Aug 2015 15:05:43 -0700 Subject: [PATCH] lit-test: fix tests incorrectly assuming an OutputCheck step. --- lit-test/test/integration/class.py | 6 ++---- lit-test/test/integration/finally.py | 6 ++++-- lit-test/test/integration/instance.py | 6 ++---- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/lit-test/test/integration/class.py b/lit-test/test/integration/class.py index 1937ec85f..8528636b2 100644 --- a/lit-test/test/integration/class.py +++ b/lit-test/test/integration/class.py @@ -6,7 +6,5 @@ class c: def f(): return 2 -# CHECK-L: a 1 -print("a", c.a) -# CHECK-L: f() 2 -print("f()", c.f()) +assert c.a == 1 +assert c.f() == 2 diff --git a/lit-test/test/integration/finally.py b/lit-test/test/integration/finally.py index fab1fe93d..d418fbbe5 100644 --- a/lit-test/test/integration/finally.py +++ b/lit-test/test/integration/finally.py @@ -1,5 +1,7 @@ -# RUN: %python -m artiq.compiler.testbench.jit %s -# RUN: %python %s +# RUN: %python -m artiq.compiler.testbench.jit %s >%t.1 +# RUN: OutputCheck %s --file-to-check=%t.1 +# RUN: %python %s >%t.2 +# RUN: OutputCheck %s --file-to-check=%t.2 # REQUIRES: exceptions def f(): diff --git a/lit-test/test/integration/instance.py b/lit-test/test/integration/instance.py index 7d55f3c28..bf255d88f 100644 --- a/lit-test/test/integration/instance.py +++ b/lit-test/test/integration/instance.py @@ -6,11 +6,9 @@ class c: i = c() -# CHECK-L: a 1 -print("a", i.a) +assert i.a == 1 def f(): c = None - # CHECK-L: shadow a 1 - print("shadow a", i.a) + assert i.a == 1 f()