test: cover compatibility function arithmetic returns
This commit is contained in:
@@ -202,6 +202,12 @@ class ValidateTypecheckDiagnosticsTests(unittest.TestCase):
|
||||
MODULE.EXPECTED,
|
||||
)
|
||||
|
||||
def test_includes_compatibility_function_arithmetic_return_success_fixture(self):
|
||||
self.assertIn(
|
||||
"tests/typecheck_function_compat_return_addition_good.claro",
|
||||
MODULE.EXPECTED_OK,
|
||||
)
|
||||
|
||||
def test_includes_lowercase_compatibility_method_return_success_fixture(self):
|
||||
self.assertIn(
|
||||
"tests/typecheck_method_compat_lowercase_return_good.claro",
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
TEACH total TAKES amount RETURNS NUMBER
|
||||
CHECK TYPE amount IS NUMBER
|
||||
RETURN amount + 1
|
||||
LEARNED
|
||||
|
||||
CALL total WITH 4
|
||||
Reference in New Issue
Block a user