mirror of
https://github.com/micropython/micropython.git
synced 2025-07-21 04:51:12 +02:00
Some checks failed
JavaScript code lint and formatting with Biome / eslint (push) Has been cancelled
Check code formatting / code-formatting (push) Has been cancelled
Check spelling with codespell / codespell (push) Has been cancelled
Build docs / build (push) Has been cancelled
Check examples / embedding (push) Has been cancelled
Package mpremote / build (push) Has been cancelled
.mpy file format and tools / test (push) Has been cancelled
Build ports metadata / build (push) Has been cancelled
alif port / build_alif (alif_ae3_build) (push) Has been cancelled
cc3200 port / build (push) Has been cancelled
esp32 port / build_idf (esp32_build_cmod_spiram_s2) (push) Has been cancelled
esp32 port / build_idf (esp32_build_s3_c3) (push) Has been cancelled
esp8266 port / build (push) Has been cancelled
mimxrt port / build (push) Has been cancelled
nrf port / build (push) Has been cancelled
powerpc port / build (push) Has been cancelled
qemu port / build_and_test_arm (bigendian) (push) Has been cancelled
qemu port / build_and_test_arm (sabrelite) (push) Has been cancelled
qemu port / build_and_test_arm (thumb) (push) Has been cancelled
qemu port / build_and_test_rv32 (push) Has been cancelled
renesas-ra port / build_renesas_ra_board (push) Has been cancelled
rp2 port / build (push) Has been cancelled
samd port / build (push) Has been cancelled
stm32 port / build_stm32 (stm32_misc_build) (push) Has been cancelled
stm32 port / build_stm32 (stm32_nucleo_build) (push) Has been cancelled
stm32 port / build_stm32 (stm32_pyb_build) (push) Has been cancelled
unix port / minimal (push) Has been cancelled
unix port / reproducible (push) Has been cancelled
unix port / standard (push) Has been cancelled
unix port / standard_v2 (push) Has been cancelled
unix port / coverage (push) Has been cancelled
unix port / coverage_32bit (push) Has been cancelled
unix port / nanbox (push) Has been cancelled
unix port / float (push) Has been cancelled
unix port / stackless_clang (push) Has been cancelled
unix port / float_clang (push) Has been cancelled
unix port / settrace_stackless (push) Has been cancelled
unix port / macos (push) Has been cancelled
unix port / qemu_mips (push) Has been cancelled
unix port / qemu_arm (push) Has been cancelled
unix port / qemu_riscv64 (push) Has been cancelled
unix port / sanitize_address (push) Has been cancelled
unix port / sanitize_undefined (push) Has been cancelled
webassembly port / build (push) Has been cancelled
windows port / build-vs (Debug, x64, dev, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Debug, x64, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Debug, x86, dev, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Debug, x86, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x64, dev, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Release, x64, dev, 2019, [16, 17)) (push) Has been cancelled
windows port / build-vs (Release, x64, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x64, standard, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Release, x64, standard, 2019, [16, 17)) (push) Has been cancelled
windows port / build-vs (Release, x64, standard, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, dev, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Release, x86, dev, 2019, [16, 17)) (push) Has been cancelled
windows port / build-vs (Release, x86, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, standard, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Release, x86, standard, 2019, [16, 17)) (push) Has been cancelled
windows port / build-vs (Release, x86, standard, 2022, [17, 18)) (push) Has been cancelled
windows port / build-mingw (i686, mingw32, dev) (push) Has been cancelled
windows port / build-mingw (i686, mingw32, standard) (push) Has been cancelled
windows port / build-mingw (x86_64, mingw64, dev) (push) Has been cancelled
windows port / build-mingw (x86_64, mingw64, standard) (push) Has been cancelled
windows port / cross-build-on-linux (push) Has been cancelled
zephyr port / build (push) Has been cancelled
Python code lint and formatting with ruff / ruff (push) Has been cancelled
Test 'l' and 'll' sized objects. When the platform's `mp_int_t` is not 64 bits, dummy values are printed instead so the test result can match across all platforms. Ensure hex test values have a letter so 'x' vs 'X' is tested. And test 'p' and 'P' pointer printing. Signed-off-by: Jeff Epler <jepler@gmail.com>
271 lines
3.4 KiB
Plaintext
271 lines
3.4 KiB
Plaintext
# mp_printf
|
|
-123 +123 123
|
|
-0123
|
|
123
|
|
123f
|
|
123F
|
|
7fffffffffffffff
|
|
7FFFFFFFFFFFFFFF
|
|
18446744073709551615
|
|
789f
|
|
789F
|
|
ab abc ' abc' ' True' 'Tru'
|
|
|
|
false true
|
|
(null)
|
|
-2147483648
|
|
2147483648
|
|
8000000f
|
|
8000000F
|
|
abc
|
|
%
|
|
.a .
|
|
<%>
|
|
<aaaa>
|
|
<true>
|
|
<43690>
|
|
<43690>
|
|
<43690>
|
|
<test>
|
|
<1000.000000>
|
|
<True>
|
|
<9223372036854775807>
|
|
# GC
|
|
0
|
|
0
|
|
# GC part 2
|
|
pass
|
|
# tracked allocation
|
|
m_tracked_head = 0
|
|
0 1
|
|
1 1
|
|
2 1
|
|
3 1
|
|
4 1
|
|
5 1
|
|
6 1
|
|
7 1
|
|
0 1
|
|
1 1
|
|
2 1
|
|
3 1
|
|
4 1
|
|
5 1
|
|
6 1
|
|
7 1
|
|
m_tracked_head = 0
|
|
# vstr
|
|
tests
|
|
sts
|
|
|
|
test
|
|
tes
|
|
RuntimeError:
|
|
RuntimeError:
|
|
# repl
|
|
ame__
|
|
port
|
|
|
|
builtins micropython array binascii
|
|
btree cexample cmath collections
|
|
cppexample cryptolib deflate errno
|
|
example_package ffi framebuf
|
|
gc hashlib heapq io
|
|
json machine marshal math
|
|
os platform random re
|
|
select socket struct sys
|
|
termios time tls uctypes
|
|
vfs websocket
|
|
me
|
|
|
|
micropython machine marshal math
|
|
|
|
argv atexit byteorder exc_info
|
|
executable exit getsizeof implementation
|
|
intern maxsize modules path
|
|
platform print_exception ps1
|
|
ps2 settrace stderr stdin
|
|
stdout tracebacklimit version version_info
|
|
ementation
|
|
# attrtuple
|
|
(start=1, stop=2, step=3)
|
|
# str
|
|
1
|
|
# bytearray
|
|
data
|
|
# mpz
|
|
1
|
|
12345678
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
1
|
|
12345
|
|
6
|
|
-1
|
|
0
|
|
1
|
|
0
|
|
0.000000
|
|
deadbeef
|
|
c0ffee777c0ffee
|
|
deadbeef
|
|
0deadbeef
|
|
c0ffee
|
|
000c0ffee
|
|
# runtime utils
|
|
TypeError: unsupported type for __abs__: 'str'
|
|
TypeError: unsupported types for __divmod__: 'str', 'str'
|
|
0
|
|
1
|
|
2
|
|
OverflowError: overflow converting long int to machine word
|
|
OverflowError: overflow converting long int to machine word
|
|
TypeError: can't convert NoneType to int
|
|
TypeError: can't convert NoneType to int
|
|
ValueError:
|
|
Warning: test
|
|
# format float
|
|
?
|
|
+1e+00
|
|
+1e+00
|
|
# binary
|
|
123
|
|
456
|
|
# VM
|
|
2 1
|
|
# scheduler
|
|
sched(0)=1
|
|
sched(1)=1
|
|
sched(2)=1
|
|
sched(3)=1
|
|
sched(4)=0
|
|
unlocked
|
|
0
|
|
1
|
|
2
|
|
3
|
|
KeyboardInterrupt:
|
|
KeyboardInterrupt:
|
|
10
|
|
loop
|
|
scheduled function
|
|
loop
|
|
scheduled function
|
|
loop
|
|
scheduled function
|
|
scheduled function
|
|
# ringbuf
|
|
99 0
|
|
98 1
|
|
22
|
|
99 0
|
|
97 2
|
|
aa55
|
|
99 0
|
|
0 99
|
|
-1
|
|
1 98
|
|
-1
|
|
2 97
|
|
0
|
|
cc99
|
|
99 0
|
|
0
|
|
11bb
|
|
0
|
|
22ff
|
|
-1
|
|
-1
|
|
0
|
|
0
|
|
abc123
|
|
-1
|
|
-2
|
|
# pairheap
|
|
create: 0 0 0 0
|
|
pop all: 0 1 2 3
|
|
create: 7 6 5 4 3 2 1 0
|
|
pop all: 0 1 2 3 4 5 6 7
|
|
create: 1 - - 1 1 1 1 1 1
|
|
pop all: 1 2
|
|
create: 1 1 1 1 2 2
|
|
pop all: 2 4
|
|
create: 1 1 1 1 1
|
|
pop all: 1 3 4
|
|
create: 3 3 3 1 1 1
|
|
pop all: 1 2 4 5
|
|
# mp_obj_is_type
|
|
1 1
|
|
0 0
|
|
1 1
|
|
1 1
|
|
0 0
|
|
1 1
|
|
# stackctrl
|
|
1 1
|
|
# end coverage.c
|
|
0123456789 b'0123456789'
|
|
7300
|
|
7300
|
|
7300
|
|
7300
|
|
None
|
|
None
|
|
None
|
|
None
|
|
None
|
|
None
|
|
b'123'
|
|
b'123'
|
|
b'123'
|
|
OSError
|
|
0
|
|
None
|
|
None
|
|
cpp None
|
|
(3, 'hellocpp')
|
|
frzstr1
|
|
frzstr1.py
|
|
frzmpy1
|
|
frzmpy1.py
|
|
frzstr_pkg1.__init__
|
|
frzstr_pkg1/__init__.py 1
|
|
frzmpy_pkg1.__init__
|
|
frzmpy_pkg1/__init__.py 1
|
|
frzstr_pkg2.mod
|
|
1
|
|
frzmpy_pkg2.mod
|
|
1
|
|
ZeroDivisionError
|
|
\
|
|
|
|
X
|
|
'\x1b'
|
|
b'\x00\xff'
|
|
frzmpy4 1
|
|
frzmpy4 2
|
|
NULL
|
|
uPy
|
|
a long string that is not interned
|
|
a string that has unicode αβγ chars
|
|
b'bytes 1234\x01'
|
|
123456789
|
|
0
|
|
1
|
|
2
|
|
3
|
|
frozentest.py
|
|
example_package.__init__
|
|
<module 'example_package.foo.bar'>
|
|
example_package.foo.bar.f
|
|
<module 'example_package'> <module 'example_package.foo'> <module 'example_package.foo.bar'>
|
|
example_package.f
|
|
example_package.foo.f
|
|
example_package.foo.bar.f
|
|
True
|
|
example_package.foo.f
|
|
True
|