Extended the import example a bit for sanity's sake

This commit is contained in:
Johan B.W. de Vries 2022-07-09 11:34:20 +02:00
parent 76d80f57cb
commit c181c61040

View File

@ -421,16 +421,16 @@ def testEntry() -> i32x4:
def test_imported():
code_py = """
@imported
def helper() -> i32:
def helper(mul: i32) -> i32:
pass
@exported
def testEntry() -> i32:
return helper()
return helper(2)
"""
def helper() -> int:
return 4238
def helper(mul: int) -> int:
return 4238 * mul
result = Suite(code_py, 'test_imported').run_code(
runtime='wasmer',
@ -439,4 +439,4 @@ def testEntry() -> i32:
}
)
assert 4238 == result.returned_value
assert 8476 == result.returned_value