test: cover method text concatenation
This commit is contained in:
@@ -192,6 +192,12 @@ class ValidateTypecheckDiagnosticsTests(unittest.TestCase):
|
||||
MODULE.EXPECTED_OK,
|
||||
)
|
||||
|
||||
def test_includes_method_text_concatenation_success_fixture(self):
|
||||
self.assertIn(
|
||||
"tests/typecheck_method_text_concat_good.claro",
|
||||
MODULE.EXPECTED_OK,
|
||||
)
|
||||
|
||||
def test_includes_yesno_method_field_assignment_diagnostics(self):
|
||||
self.assertIn(
|
||||
"tests/typecheck_method_yesno_field_assignment_bad.claro",
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
CLASS Player
|
||||
HAS first TEXT
|
||||
HAS last TEXT
|
||||
|
||||
TEACH full_name
|
||||
SET first first + "!"
|
||||
SET last "Dr. " + last
|
||||
END
|
||||
END
|
||||
|
||||
NEW Player player
|
||||
DO player.full_name
|
||||
Reference in New Issue
Block a user