2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-26 11:48:27 +08:00

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
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():
f()
f()

View File

@ -1,7 +1,7 @@
# RUN: %python -m artiq.compiler.testbench.signature %s >%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):
i.f(1.0)

View File

@ -1,12 +1,12 @@
# RUN: %python -m artiq.compiler.testbench.signature %s >%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():
delay(1.0)
delay_mu(1000)
# CHECK-L: g: ()->NoneType delay(s->mu(5.0) mu)
# CHECK-L: g: ()->NoneType delay(3 mu)
def g():
delay(1.0)
delay(2.0 * 2)
delay_mu(1)
delay_mu(2)

View File

@ -1,13 +1,13 @@
# RUN: %python -m artiq.compiler.testbench.signature %s >%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():
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():
for _ in range(10):
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: 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():
f()
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: 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):
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):
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):
for _ in range(a, b, c):
delay(1.5)
delay_mu(3)
f(1)
g(1,2)

View File

@ -1,10 +1,10 @@
# RUN: %python -m artiq.compiler.testbench.signature %s >%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():
for _ in range(10):
delay(1.5)
delay_mu(3)
return 10
# CHECK-L: g: (x:float)->int(width=32)