From c98d7461a1c54b11b106ffb630ec079e1ab60993 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Tue, 7 Mar 2017 07:12:14 +0100 Subject: tests/micropython/: Split off intbig tests. --- tests/micropython/native_const.py | 7 ------- tests/micropython/native_const.py.exp | 1 - tests/micropython/native_const_intbig.py | 7 +++++++ tests/micropython/native_const_intbig.py.exp | 1 + tests/micropython/viper_misc.py | 7 ------- tests/micropython/viper_misc.py.exp | 1 - tests/micropython/viper_misc_intbig.py | 8 ++++++++ tests/micropython/viper_misc_intbig.py.exp | 1 + 8 files changed, 17 insertions(+), 16 deletions(-) delete mode 100644 tests/micropython/native_const.py delete mode 100644 tests/micropython/native_const.py.exp create mode 100644 tests/micropython/native_const_intbig.py create mode 100644 tests/micropython/native_const_intbig.py.exp create mode 100644 tests/micropython/viper_misc_intbig.py create mode 100644 tests/micropython/viper_misc_intbig.py.exp (limited to 'tests/micropython') diff --git a/tests/micropython/native_const.py b/tests/micropython/native_const.py deleted file mode 100644 index 611b39d8f..000000000 --- a/tests/micropython/native_const.py +++ /dev/null @@ -1,7 +0,0 @@ -# check loading constants - -@micropython.native -def f(): - return 123456789012345678901234567890 - -print(f()) diff --git a/tests/micropython/native_const.py.exp b/tests/micropython/native_const.py.exp deleted file mode 100644 index 1d52d220f..000000000 --- a/tests/micropython/native_const.py.exp +++ /dev/null @@ -1 +0,0 @@ -123456789012345678901234567890 diff --git a/tests/micropython/native_const_intbig.py b/tests/micropython/native_const_intbig.py new file mode 100644 index 000000000..611b39d8f --- /dev/null +++ b/tests/micropython/native_const_intbig.py @@ -0,0 +1,7 @@ +# check loading constants + +@micropython.native +def f(): + return 123456789012345678901234567890 + +print(f()) diff --git a/tests/micropython/native_const_intbig.py.exp b/tests/micropython/native_const_intbig.py.exp new file mode 100644 index 000000000..1d52d220f --- /dev/null +++ b/tests/micropython/native_const_intbig.py.exp @@ -0,0 +1 @@ +123456789012345678901234567890 diff --git a/tests/micropython/viper_misc.py b/tests/micropython/viper_misc.py index 8bf6cc638..021e03f2c 100644 --- a/tests/micropython/viper_misc.py +++ b/tests/micropython/viper_misc.py @@ -50,13 +50,6 @@ def viper_no_annotation(x, y): return x * y 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 @micropython.viper def viper_for(a:int, b:int) -> int: diff --git a/tests/micropython/viper_misc.py.exp b/tests/micropython/viper_misc.py.exp index 4800050d1..e4462771b 100644 --- a/tests/micropython/viper_misc.py.exp +++ b/tests/micropython/viper_misc.py.exp @@ -5,7 +5,6 @@ Ellipsis 6 7 20 -True 49994955 1 1 1 3 diff --git a/tests/micropython/viper_misc_intbig.py b/tests/micropython/viper_misc_intbig.py new file mode 100644 index 000000000..e036435c7 --- /dev/null +++ b/tests/micropython/viper_misc_intbig.py @@ -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)) diff --git a/tests/micropython/viper_misc_intbig.py.exp b/tests/micropython/viper_misc_intbig.py.exp new file mode 100644 index 000000000..0ca95142b --- /dev/null +++ b/tests/micropython/viper_misc_intbig.py.exp @@ -0,0 +1 @@ +True -- cgit v1.2.3