Skip to content

Commit a776102

Browse files
committed
TST: do not use reserved words for type names
1 parent f848d9e commit a776102

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

blark/tests/test_transformer.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,10 @@ def test_bool_literal_roundtrip(name, value, expected):
394394
param("var1_init_decl", "stVar1, stVar2 : (Value1 := 1, Value2 := 2) INT := Value1"),
395395
param("structure_element_declaration", "Name1, Name2 : INT"),
396396
param("structure_type_declaration", "TypeName :\nSTRUCT\nEND_STRUCT"),
397-
param("structure_type_declaration", "TypeName EXTENDS Other.Type :\nSTRUCT\nEND_STRUCT"),
397+
param(
398+
"structure_type_declaration",
399+
"TypeName EXTENDS Other.SomeType :\nSTRUCT\nEND_STRUCT",
400+
),
398401
param("structure_type_declaration", "TypeName : POINTER TO\nSTRUCT\nEND_STRUCT"),
399402
param("structure_type_declaration", tf.multiline_code_block(
400403
"""
@@ -896,7 +899,7 @@ def test_type_name_roundtrip(rule_name, value):
896899
iValue := 1;
897900
END_IF
898901
END_IF
899-
Method();
902+
MethodName();
900903
RETURN;
901904
END_FUNCTION_BLOCK
902905
"""
@@ -911,7 +914,7 @@ def test_type_name_roundtrip(rule_name, value):
911914
iValue := 1;
912915
END_IF
913916
END_IF
914-
Method();
917+
MethodName();
915918
ReturnStatus := mReturnStatus;
916919
END_FUNCTION_BLOCK
917920
"""
@@ -926,7 +929,7 @@ def test_type_name_roundtrip(rule_name, value):
926929
iValue := 1;
927930
END_IF
928931
END_IF
929-
Method();
932+
MethodName();
930933
ContinueWorking := somethingElse;
931934
END_FUNCTION_BLOCK
932935
"""
@@ -941,7 +944,7 @@ def test_type_name_roundtrip(rule_name, value):
941944
iValue := 1;
942945
END_IF
943946
END_IF
944-
Method();
947+
MethodName();
945948
BreakWork := somethingElse;
946949
END_FUNCTION_BLOCK
947950
"""
@@ -956,15 +959,15 @@ def test_type_name_roundtrip(rule_name, value):
956959
iValue := 1;
957960
END_IF
958961
END_IF
959-
Method();
962+
MethodName();
960963
ExitWork := somethingElse;
961964
END_FUNCTION_BLOCK
962965
"""
963966
)),
964967
param("function_block_type_declaration", tf.multiline_code_block(
965968
"""
966969
FUNCTION_BLOCK fbName
967-
Method();
970+
MethodName();
968971
IF 1 THEN
969972
EXIT;
970973
END_IF
@@ -974,7 +977,7 @@ def test_type_name_roundtrip(rule_name, value):
974977
param("function_block_type_declaration", tf.multiline_code_block(
975978
"""
976979
FUNCTION_BLOCK fbName
977-
Method();
980+
MethodName();
978981
IF 1 THEN
979982
CONTINUE;
980983
END_IF

0 commit comments

Comments
 (0)