16 lines
306 B
Python
16 lines
306 B
Python
import pytest
|
|
|
|
from .helpers import Suite
|
|
|
|
@pytest.mark.integration_test
|
|
def test_bytes_index_out_of_bounds():
|
|
code_py = """
|
|
@exported
|
|
def testEntry(f: bytes) -> u8:
|
|
return f[50]
|
|
"""
|
|
|
|
result = Suite(code_py, 'test_call').run_code(b'Short', b'Long' * 100)
|
|
|
|
assert 0 == result.returned_value
|