test: cover explicitly typed text object fields
This commit is contained in:
@@ -39,6 +39,12 @@ class ValidateTypecheckDiagnosticsTests(unittest.TestCase):
|
||||
MODULE.EXPECTED_OK,
|
||||
)
|
||||
|
||||
def test_includes_explicitly_typed_text_field_success_fixture(self):
|
||||
self.assertIn(
|
||||
"tests/typecheck_object_field_typed_text_good.claro",
|
||||
MODULE.EXPECTED_OK,
|
||||
)
|
||||
|
||||
def test_includes_reverse_text_concatenation_success_fixture(self):
|
||||
self.assertIn(
|
||||
"tests/typecheck_object_field_text_concat_reverse_good.claro",
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
CLASS Player
|
||||
HAS name TEXT
|
||||
END
|
||||
|
||||
NEW Player player
|
||||
SET player.name TEXT "Ada"
|
||||
CHECK TYPE player.name IS TEXT
|
||||
Reference in New Issue
Block a user