test: cover compatibility complete branch returns
This commit is contained in:
@@ -117,6 +117,12 @@ class ValidateTypecheckDiagnosticsTests(unittest.TestCase):
|
||||
MODULE.EXPECTED,
|
||||
)
|
||||
|
||||
def test_includes_compatibility_branch_complete_function_return_fixture(self):
|
||||
self.assertIn(
|
||||
"tests/typecheck_function_compat_branch_complete_good.claro",
|
||||
MODULE.EXPECTED_OK,
|
||||
)
|
||||
|
||||
def test_includes_empty_function_return_fixture(self):
|
||||
self.assertIn("tests/typecheck_function_empty_return_bad.claro", MODULE.EXPECTED)
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
TEACH choose TAKES flag RETURNS NUMBER
|
||||
IF flag
|
||||
RETURN 1
|
||||
ELSE
|
||||
RETURN 2
|
||||
END
|
||||
LEARNED
|
||||
|
||||
CALL choose WITH YES
|
||||
Reference in New Issue
Block a user