test: cover compatibility method subtraction diagnostics
This commit is contained in:
@@ -128,6 +128,12 @@ class ValidateTypecheckDiagnosticsTests(unittest.TestCase):
|
||||
MODULE.EXPECTED,
|
||||
)
|
||||
|
||||
def test_includes_compatibility_method_subtraction_return_diagnostic_fixture(self):
|
||||
self.assertIn(
|
||||
"tests/typecheck_method_compat_return_subtraction_bad.claro",
|
||||
MODULE.EXPECTED,
|
||||
)
|
||||
|
||||
def test_includes_lowercase_compatibility_method_return_success_fixture(self):
|
||||
self.assertIn(
|
||||
"tests/typecheck_method_compat_lowercase_return_good.claro",
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
CLASS Player
|
||||
TEACH total TAKES amount RETURNS NUMBER
|
||||
CHECK TYPE amount IS NUMBER
|
||||
RETURN amount - "oops"
|
||||
LEARNED
|
||||
ENDCLASS
|
||||
Reference in New Issue
Block a user