Commit ac81cee3 authored by Damien George's avatar Damien George

tests/micropython: Test loading const objs in native and viper funcs.

parent 2e862332
# test loading constants in native functions
@micropython.native
def f():
return b'bytes'
print(f())
@micropython.native
def f():
@micropython.native
def g():
return 123
return g
print(f()())
# test loading constants in viper functions
@micropython.viper
def f():
return b'bytes'
print(f())
@micropython.viper
def f():
@micropython.viper
def g() -> int:
return 123
return g
print(f()())
# check loading constants
@micropython.viper
def f():
return 123456789012345678901234567890
print(f())
123456789012345678901234567890
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment