2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-25 19:28:26 +08:00
artiq/lit-test/test/inferencer/builtin_calls.py

36 lines
885 B
Python

# RUN: %python -m artiq.compiler.testbench.inferencer %s >%t
# RUN: OutputCheck %s --file-to-check=%t
# CHECK-L: bool:<constructor bool {}>():bool
bool()
# CHECK-L: bool:<constructor bool>([]:list(elt='a)):bool
bool([])
# CHECK-L: int:<constructor int {}>():int(width='b)
int()
# CHECK-L: int:<constructor int>(1.0:float):int(width='c)
int(1.0)
# CHECK-L: int:<constructor int>(1.0:float, width=64:int(width='d)):int(width=64)
int(1.0, width=64)
# CHECK-L: float:<constructor float {}>():float
float()
# CHECK-L: float:<constructor float>(1:int(width='e)):float
float(1)
# CHECK-L: list:<constructor list {}>():list(elt='f)
list()
# CHECK-L: len:<function len>([]:list(elt='g)):int(width=32)
len([])
# CHECK-L: round:<function round>(1.0:float):int(width='h)
round(1.0)
# CHECK-L: round:<function round>(1.0:float, width=64:int(width='i)):int(width=64)
round(1.0, width=64)