Refactor List into TObj, Implement __add__, __mul__, __eq__ and __ne__ for lists #445
|
@ -1,3 +1,7 @@
|
||||||
|
@extern
|
||||||
|
def output_bool(x: bool):
|
||||||
|
...
|
||||||
|
|
||||||
@extern
|
@extern
|
||||||
def output_int32_list(x: list[int32]):
|
def output_int32_list(x: list[int32]):
|
||||||
...
|
...
|
||||||
|
@ -30,6 +34,32 @@ def run() -> int32:
|
||||||
|
|
||||||
get_list_slice()
|
get_list_slice()
|
||||||
list_slice_assignment()
|
list_slice_assignment()
|
||||||
|
|
||||||
|
output_int32_list([1, 2, 3] + [4, 5, 6])
|
||||||
|
output_int32_list([1, 2, 3] * 3)
|
||||||
|
output_bool([] == [])
|
||||||
|
output_bool([0] == [])
|
||||||
|
output_bool([0] == [0])
|
||||||
|
output_bool([0, 1] == [0])
|
||||||
|
output_bool([0, 1] == [0, 1])
|
||||||
|
output_bool([] != [])
|
||||||
|
output_bool([0] != [])
|
||||||
|
output_bool([0] != [0])
|
||||||
|
output_bool([0] != [0, 1])
|
||||||
|
output_bool([0, 1] != [0, 1])
|
||||||
|
output_bool([] == [] == [])
|
||||||
|
output_bool([0] == [0] == [0])
|
||||||
|
output_bool([0, 1] == [0] == [0, 1])
|
||||||
|
output_bool([0, 1] == [0, 1] == [0])
|
||||||
|
output_bool([0] == [0, 1] == [0, 1])
|
||||||
|
output_bool([0, 1] == [0, 1] == [0, 1])
|
||||||
|
output_bool([] != [] != [])
|
||||||
|
output_bool([0] != [0] != [0])
|
||||||
|
output_bool([0, 1] != [0] != [0, 1])
|
||||||
|
output_bool([0, 1] != [0, 1] != [0])
|
||||||
|
output_bool([0] != [0, 1] != [0, 1])
|
||||||
|
output_bool([0, 1] != [0, 1] != [0, 1])
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
def get_list_slice():
|
def get_list_slice():
|
||||||
|
|
Loading…
Reference in New Issue