phasm/tests/integration/test_lang/test_literals.py
2023-11-15 11:59:59 +01:00

18 lines
432 B
Python

import pytest
from phasm.type3.entry import Type3Exception
from ..helpers import Suite
from ..constants import ALL_INT_TYPES, ALL_FLOAT_TYPES, COMPLETE_INT_TYPES, TYPE_MAP
@pytest.mark.integration_test
def test_expr_constant_literal_does_not_fit():
code_py = """
@exported
def testEntry() -> u8:
return 1000
"""
with pytest.raises(Type3Exception, match=r'Must fit in 1 byte\(s\)'):
Suite(code_py).run_code()