forked from M-Labs/artiq
1
0
Fork 0

lit-test: fix breakage from abb36b4 and 02f2763.

This commit is contained in:
whitequark 2015-11-24 00:20:00 +08:00
parent abb36b42be
commit 37b80247f1
7 changed files with 21 additions and 21 deletions

View File

@ -2,9 +2,9 @@
# RUN: OutputCheck %s --file-to-check=%t # RUN: OutputCheck %s --file-to-check=%t
def f(): def f():
delay(1.0) delay_mu(1)
# CHECK-L: g: ()->NoneType delay(s->mu(2.0) mu) # CHECK-L: g: ()->NoneType delay(2 mu)
def g(): def g():
f() f()
f() f()

View File

@ -1,7 +1,7 @@
# RUN: %python -m artiq.compiler.testbench.signature %s >%t # RUN: %python -m artiq.compiler.testbench.signature %s >%t
# RUN: OutputCheck %s --file-to-check=%t # RUN: OutputCheck %s --file-to-check=%t
# CHECK-L: g: (i:<instance c {}>)->NoneType delay(s->mu(1.0) mu) # CHECK-L: g: (i:<instance c {}>)->NoneType delay(1000000 mu)
def g(i): def g(i):
i.f(1.0) i.f(1.0)

View File

@ -1,12 +1,12 @@
# RUN: %python -m artiq.compiler.testbench.signature %s >%t # RUN: %python -m artiq.compiler.testbench.signature %s >%t
# RUN: OutputCheck %s --file-to-check=%t # RUN: OutputCheck %s --file-to-check=%t
# CHECK-L: f: ()->NoneType delay(s->mu(1.0) + 1000 mu) # CHECK-L: f: ()->NoneType delay(1001000 mu)
def f(): def f():
delay(1.0) delay(1.0)
delay_mu(1000) delay_mu(1000)
# CHECK-L: g: ()->NoneType delay(s->mu(5.0) mu) # CHECK-L: g: ()->NoneType delay(3 mu)
def g(): def g():
delay(1.0) delay_mu(1)
delay(2.0 * 2) delay_mu(2)

View File

@ -1,13 +1,13 @@
# RUN: %python -m artiq.compiler.testbench.signature %s >%t # RUN: %python -m artiq.compiler.testbench.signature %s >%t
# RUN: OutputCheck %s --file-to-check=%t # RUN: OutputCheck %s --file-to-check=%t
# CHECK-L: f: ()->NoneType delay(s->mu(1.5) * 10 mu) # CHECK-L: f: ()->NoneType delay(30 mu)
def f(): def f():
for _ in range(10): for _ in range(10):
delay(1.5) delay_mu(3)
# CHECK-L: g: ()->NoneType delay(s->mu(1.5) * 2 * 10 mu) # CHECK-L: g: ()->NoneType delay(60 mu)
def g(): def g():
for _ in range(10): for _ in range(10):
for _ in range(2): for _ in range(2):
delay(1.5) delay_mu(3)

View File

@ -1,10 +1,10 @@
# RUN: %python -m artiq.compiler.testbench.signature %s >%t # RUN: %python -m artiq.compiler.testbench.signature %s >%t
# RUN: OutputCheck %s --file-to-check=%t # RUN: OutputCheck %s --file-to-check=%t
# CHECK-L: g: ()->NoneType delay(s->mu(2.0) mu) # CHECK-L: g: ()->NoneType delay(2 mu)
def g(): def g():
f() f()
f() f()
def f(): def f():
delay(1.0) delay_mu(1)

View File

@ -1,20 +1,20 @@
# RUN: %python -m artiq.compiler.testbench.signature %s >%t # RUN: %python -m artiq.compiler.testbench.signature %s >%t
# RUN: OutputCheck %s --file-to-check=%t # RUN: OutputCheck %s --file-to-check=%t
# CHECK-L: f: (a:int(width=32))->NoneType delay(s->mu(1.5) * a mu) # CHECK-L: f: (a:int(width=32))->NoneType delay(3 * a mu)
def f(a): def f(a):
for _ in range(a): for _ in range(a):
delay(1.5) delay_mu(3)
# CHECK-L: g: (a:int(width=32), b:int(width=32))->NoneType delay(s->mu(1.5) * (b - a) mu) # CHECK-L: g: (a:int(width=32), b:int(width=32))->NoneType delay(3 * (b - a) mu)
def g(a, b): def g(a, b):
for _ in range(a, b): for _ in range(a, b):
delay(1.5) delay_mu(3)
# CHECK-L: h: (a:int(width=32), b:int(width=32), c:int(width=32))->NoneType delay(s->mu(1.5) * (b - a) // c mu) # CHECK-L: h: (a:int(width=32), b:int(width=32), c:int(width=32))->NoneType delay(3 * (b - a) // c mu)
def h(a, b, c): def h(a, b, c):
for _ in range(a, b, c): for _ in range(a, b, c):
delay(1.5) delay_mu(3)
f(1) f(1)
g(1,2) g(1,2)

View File

@ -1,10 +1,10 @@
# RUN: %python -m artiq.compiler.testbench.signature %s >%t # RUN: %python -m artiq.compiler.testbench.signature %s >%t
# RUN: OutputCheck %s --file-to-check=%t # RUN: OutputCheck %s --file-to-check=%t
# CHECK-L: f: ()->int(width=32) delay(s->mu(1.5) * 10 mu) # CHECK-L: f: ()->int(width=32) delay(30 mu)
def f(): def f():
for _ in range(10): for _ in range(10):
delay(1.5) delay_mu(3)
return 10 return 10
# CHECK-L: g: (x:float)->int(width=32) # CHECK-L: g: (x:float)->int(width=32)