artiq/lit-test/test/inferencer/builtin_calls.py

33 lines
792 B
Python
Raw Normal View History

# RUN: %python -m artiq.compiler.testbench.inferencer %s >%t
2015-06-24 17:16:17 +08:00
# RUN: OutputCheck %s --file-to-check=%t
2015-06-26 16:16:08 +08:00
# CHECK-L: bool:<constructor bool {}>():bool
2015-06-26 16:16:08 +08:00
bool()
# CHECK-L: bool:<constructor bool {}>([]:list(elt='a)):bool
2015-06-26 16:16:08 +08:00
bool([])
# CHECK-L: int:<constructor int {}>():int(width='b)
2015-06-26 16:16:08 +08:00
int()
# CHECK-L: int:<constructor int {}>(1.0:float):int(width='c)
2015-06-26 16:16:08 +08:00
int(1.0)
# CHECK-L: int:<constructor int {}>(1.0:float, width=64:int(width='d)):int(width=64)
2015-06-26 16:16:08 +08:00
int(1.0, width=64)
# CHECK-L: float:<constructor float {}>():float
2015-06-26 16:16:08 +08:00
float()
# CHECK-L: float:<constructor float {}>(1:int(width='e)):float
2015-06-26 16:16:08 +08:00
float(1)
# CHECK-L: list:<constructor list {}>():list(elt='f)
2015-06-26 16:16:08 +08:00
list()
2015-06-29 03:40:57 +08:00
# CHECK-L: len:<function len>([]:list(elt='g)):int(width=32)
2015-06-26 16:16:08 +08:00
len([])
2015-06-29 03:40:57 +08:00
# CHECK-L: round:<function round>(1.0:float):int(width='h)
2015-06-26 16:16:08 +08:00
round(1.0)