2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-23 10:24:01 +08:00
artiq/lit-test/test/inferencer/builtin_calls.py

33 lines
780 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()
2015-08-28 13:51:31 +08:00
# 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()
2015-08-28 13:51:31 +08:00
# CHECK-L: int:<constructor int>(1.0:float):int(width='c)
2015-06-26 16:16:08 +08:00
int(1.0)
2015-08-28 13:51:31 +08:00
# 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()
2015-08-28 13:51:31 +08:00
# 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)