test: cover numeric function return expressions

This commit is contained in:
Hermes Agent
2026-09-11 11:35:08 +00:00
parent dd7efc4648
commit 856c16d25a
7 changed files with 21 additions and 3 deletions
@@ -49,6 +49,12 @@ class ValidateTypecheckDiagnosticsTests(unittest.TestCase):
self.assertIn("tests/typecheck_function_return_bad.claro", MODULE.EXPECTED)
self.assertIn("tests/typecheck_function_return_good.claro", MODULE.EXPECTED_OK)
def test_includes_function_return_arithmetic_success_fixture(self):
self.assertIn(
"tests/typecheck_function_return_multiplication_good.claro",
MODULE.EXPECTED_OK,
)
def test_includes_unknown_function_return_expression_fixtures(self):
self.assertIn(
"tests/typecheck_function_unknown_return_expression_bad.claro",
@@ -0,0 +1,6 @@
TEACH scale amount RETURNS NUMBER
CHECK TYPE amount IS NUMBER
RETURN amount * 2
END
DO scale 3