kopia lustrzana https://github.com/micropython/micropython
tests/micropython/: Split off intbig tests.
rodzic
1bd17de4b7
commit
c98d7461a1
|
@ -50,13 +50,6 @@ def viper_no_annotation(x, y):
|
||||||
return x * y
|
return x * y
|
||||||
print(viper_no_annotation(4, 5))
|
print(viper_no_annotation(4, 5))
|
||||||
|
|
||||||
# unsigned ints
|
|
||||||
@micropython.viper
|
|
||||||
def viper_uint() -> uint:
|
|
||||||
return uint(-1)
|
|
||||||
import sys
|
|
||||||
print(viper_uint() == (sys.maxsize << 1 | 1))
|
|
||||||
|
|
||||||
# a for loop
|
# a for loop
|
||||||
@micropython.viper
|
@micropython.viper
|
||||||
def viper_for(a:int, b:int) -> int:
|
def viper_for(a:int, b:int) -> int:
|
||||||
|
|
|
@ -5,7 +5,6 @@ Ellipsis
|
||||||
6
|
6
|
||||||
7
|
7
|
||||||
20
|
20
|
||||||
True
|
|
||||||
49994955
|
49994955
|
||||||
1 1
|
1 1
|
||||||
1 3
|
1 3
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
import micropython
|
||||||
|
|
||||||
|
# unsigned ints
|
||||||
|
@micropython.viper
|
||||||
|
def viper_uint() -> uint:
|
||||||
|
return uint(-1)
|
||||||
|
import sys
|
||||||
|
print(viper_uint() == (sys.maxsize << 1 | 1))
|
|
@ -0,0 +1 @@
|
||||||
|
True
|
Ładowanie…
Reference in New Issue