diff --git a/migrator/test/staticTS/CTS/02.lexical_elements/01.comments/multi_line_comment.sts b/migrator/test/staticTS/CTS/02.lexical_elements/01.comments/multi_line_comment.ets similarity index 100% rename from migrator/test/staticTS/CTS/02.lexical_elements/01.comments/multi_line_comment.sts rename to migrator/test/staticTS/CTS/02.lexical_elements/01.comments/multi_line_comment.ets diff --git a/migrator/test/staticTS/CTS/02.lexical_elements/01.comments/one_line_comment.sts b/migrator/test/staticTS/CTS/02.lexical_elements/01.comments/one_line_comment.ets similarity index 100% rename from migrator/test/staticTS/CTS/02.lexical_elements/01.comments/one_line_comment.sts rename to migrator/test/staticTS/CTS/02.lexical_elements/01.comments/one_line_comment.ets diff --git a/migrator/test/staticTS/CTS/02.lexical_elements/02.tokens/01.whitespaces/.gitattributes b/migrator/test/staticTS/CTS/02.lexical_elements/02.tokens/01.whitespaces/.gitattributes index 460fe17b80cc29a4dd811842c7f7e7441b50b505..818701a6c8e9c8c5e7e5f5eaed8ad0f5c1f7eb10 100644 --- a/migrator/test/staticTS/CTS/02.lexical_elements/02.tokens/01.whitespaces/.gitattributes +++ b/migrator/test/staticTS/CTS/02.lexical_elements/02.tokens/01.whitespaces/.gitattributes @@ -1 +1 @@ -whitespaces.sts binary +whitespaces.ets binary diff --git a/migrator/test/staticTS/CTS/02.lexical_elements/02.tokens/01.whitespaces/whitespaces.sts b/migrator/test/staticTS/CTS/02.lexical_elements/02.tokens/01.whitespaces/whitespaces.ets similarity index 100% rename from migrator/test/staticTS/CTS/02.lexical_elements/02.tokens/01.whitespaces/whitespaces.sts rename to migrator/test/staticTS/CTS/02.lexical_elements/02.tokens/01.whitespaces/whitespaces.ets diff --git a/migrator/test/staticTS/CTS/02.lexical_elements/02.tokens/02.line_separators/.gitattributes b/migrator/test/staticTS/CTS/02.lexical_elements/02.tokens/02.line_separators/.gitattributes index c8e18f51d374084eb57db16e382017a72491c306..fc4523d3af7ca7ea961d4c7cb4847fa4ff0c6f9b 100644 --- a/migrator/test/staticTS/CTS/02.lexical_elements/02.tokens/02.line_separators/.gitattributes +++ b/migrator/test/staticTS/CTS/02.lexical_elements/02.tokens/02.line_separators/.gitattributes @@ -1 +1 @@ -line_separators.sts binary +line_separators.ets binary diff --git a/migrator/test/staticTS/CTS/02.lexical_elements/02.tokens/02.line_separators/line_separators.sts b/migrator/test/staticTS/CTS/02.lexical_elements/02.tokens/02.line_separators/line_separators.ets similarity index 100% rename from migrator/test/staticTS/CTS/02.lexical_elements/02.tokens/02.line_separators/line_separators.sts rename to migrator/test/staticTS/CTS/02.lexical_elements/02.tokens/02.line_separators/line_separators.ets diff --git a/migrator/test/staticTS/CTS/02.lexical_elements/03.identifiers/identifiers.sts b/migrator/test/staticTS/CTS/02.lexical_elements/03.identifiers/identifiers.ets similarity index 100% rename from migrator/test/staticTS/CTS/02.lexical_elements/03.identifiers/identifiers.sts rename to migrator/test/staticTS/CTS/02.lexical_elements/03.identifiers/identifiers.ets diff --git a/migrator/test/staticTS/CTS/02.lexical_elements/03.identifiers/identifiers_continue.sts b/migrator/test/staticTS/CTS/02.lexical_elements/03.identifiers/identifiers_continue.ets similarity index 100% rename from migrator/test/staticTS/CTS/02.lexical_elements/03.identifiers/identifiers_continue.sts rename to migrator/test/staticTS/CTS/02.lexical_elements/03.identifiers/identifiers_continue.ets diff --git a/migrator/test/staticTS/CTS/02.lexical_elements/03.identifiers/identifiers_dollar.sts b/migrator/test/staticTS/CTS/02.lexical_elements/03.identifiers/identifiers_dollar.ets similarity index 100% rename from migrator/test/staticTS/CTS/02.lexical_elements/03.identifiers/identifiers_dollar.sts rename to migrator/test/staticTS/CTS/02.lexical_elements/03.identifiers/identifiers_dollar.ets diff --git a/migrator/test/staticTS/CTS/02.lexical_elements/03.identifiers/identifiers_start.sts b/migrator/test/staticTS/CTS/02.lexical_elements/03.identifiers/identifiers_start.ets similarity index 100% rename from migrator/test/staticTS/CTS/02.lexical_elements/03.identifiers/identifiers_start.sts rename to migrator/test/staticTS/CTS/02.lexical_elements/03.identifiers/identifiers_start.ets diff --git a/migrator/test/staticTS/CTS/02.lexical_elements/04.keywords/n.keywords.sts b/migrator/test/staticTS/CTS/02.lexical_elements/04.keywords/n.keywords.ets similarity index 100% rename from migrator/test/staticTS/CTS/02.lexical_elements/04.keywords/n.keywords.sts rename to migrator/test/staticTS/CTS/02.lexical_elements/04.keywords/n.keywords.ets diff --git a/migrator/test/staticTS/CTS/02.lexical_elements/04.keywords/n.types.sts b/migrator/test/staticTS/CTS/02.lexical_elements/04.keywords/n.types.ets similarity index 100% rename from migrator/test/staticTS/CTS/02.lexical_elements/04.keywords/n.types.sts rename to migrator/test/staticTS/CTS/02.lexical_elements/04.keywords/n.types.ets diff --git a/migrator/test/staticTS/CTS/02.lexical_elements/05.operators_and_punctuation/tbd.sts b/migrator/test/staticTS/CTS/02.lexical_elements/05.operators_and_punctuation/tbd.ets similarity index 100% rename from migrator/test/staticTS/CTS/02.lexical_elements/05.operators_and_punctuation/tbd.sts rename to migrator/test/staticTS/CTS/02.lexical_elements/05.operators_and_punctuation/tbd.ets diff --git a/migrator/test/staticTS/CTS/02.lexical_elements/06.literals/01.integer_literals/int_literals.sts b/migrator/test/staticTS/CTS/02.lexical_elements/06.literals/01.integer_literals/int_literals.ets similarity index 100% rename from migrator/test/staticTS/CTS/02.lexical_elements/06.literals/01.integer_literals/int_literals.sts rename to migrator/test/staticTS/CTS/02.lexical_elements/06.literals/01.integer_literals/int_literals.ets diff --git a/migrator/test/staticTS/CTS/02.lexical_elements/06.literals/01.integer_literals/n.bad_int_literals.sts b/migrator/test/staticTS/CTS/02.lexical_elements/06.literals/01.integer_literals/n.bad_int_literals.ets similarity index 100% rename from migrator/test/staticTS/CTS/02.lexical_elements/06.literals/01.integer_literals/n.bad_int_literals.sts rename to migrator/test/staticTS/CTS/02.lexical_elements/06.literals/01.integer_literals/n.bad_int_literals.ets diff --git a/migrator/test/staticTS/CTS/02.lexical_elements/06.literals/02.floating_point_literals/float_literals.sts b/migrator/test/staticTS/CTS/02.lexical_elements/06.literals/02.floating_point_literals/float_literals.ets similarity index 100% rename from migrator/test/staticTS/CTS/02.lexical_elements/06.literals/02.floating_point_literals/float_literals.sts rename to migrator/test/staticTS/CTS/02.lexical_elements/06.literals/02.floating_point_literals/float_literals.ets diff --git a/migrator/test/staticTS/CTS/02.lexical_elements/06.literals/03.boolean_literals/boolean_literals.sts b/migrator/test/staticTS/CTS/02.lexical_elements/06.literals/03.boolean_literals/boolean_literals.ets similarity index 100% rename from migrator/test/staticTS/CTS/02.lexical_elements/06.literals/03.boolean_literals/boolean_literals.sts rename to migrator/test/staticTS/CTS/02.lexical_elements/06.literals/03.boolean_literals/boolean_literals.ets diff --git a/migrator/test/staticTS/CTS/02.lexical_elements/06.literals/04.string_literals/string_literals.sts b/migrator/test/staticTS/CTS/02.lexical_elements/06.literals/04.string_literals/string_literals.ets similarity index 100% rename from migrator/test/staticTS/CTS/02.lexical_elements/06.literals/04.string_literals/string_literals.sts rename to migrator/test/staticTS/CTS/02.lexical_elements/06.literals/04.string_literals/string_literals.ets diff --git a/migrator/test/staticTS/CTS/02.lexical_elements/06.literals/04.string_literals/tbd.multiline_string_literals.sts b/migrator/test/staticTS/CTS/02.lexical_elements/06.literals/04.string_literals/tbd.multiline_string_literals.ets similarity index 100% rename from migrator/test/staticTS/CTS/02.lexical_elements/06.literals/04.string_literals/tbd.multiline_string_literals.sts rename to migrator/test/staticTS/CTS/02.lexical_elements/06.literals/04.string_literals/tbd.multiline_string_literals.ets diff --git a/migrator/test/staticTS/CTS/02.lexical_elements/06.literals/04.string_literals/tbd.string_literals_escapes_n_continuation.sts b/migrator/test/staticTS/CTS/02.lexical_elements/06.literals/04.string_literals/tbd.string_literals_escapes_n_continuation.ets similarity index 100% rename from migrator/test/staticTS/CTS/02.lexical_elements/06.literals/04.string_literals/tbd.string_literals_escapes_n_continuation.sts rename to migrator/test/staticTS/CTS/02.lexical_elements/06.literals/04.string_literals/tbd.string_literals_escapes_n_continuation.ets diff --git a/migrator/test/staticTS/CTS/02.lexical_elements/06.literals/05.char_literals/char_literals.sts b/migrator/test/staticTS/CTS/02.lexical_elements/06.literals/05.char_literals/char_literals.ets similarity index 100% rename from migrator/test/staticTS/CTS/02.lexical_elements/06.literals/05.char_literals/char_literals.sts rename to migrator/test/staticTS/CTS/02.lexical_elements/06.literals/05.char_literals/char_literals.ets diff --git a/migrator/test/staticTS/CTS/02.lexical_elements/06.literals/06.null_literals/null_literal.sts b/migrator/test/staticTS/CTS/02.lexical_elements/06.literals/06.null_literals/null_literal.ets similarity index 100% rename from migrator/test/staticTS/CTS/02.lexical_elements/06.literals/06.null_literals/null_literal.sts rename to migrator/test/staticTS/CTS/02.lexical_elements/06.literals/06.null_literals/null_literal.ets diff --git a/migrator/test/staticTS/CTS/02.lexical_elements/07.automatic_semicolon_insertion/tbd.automatic_semicolon_insertion.sts b/migrator/test/staticTS/CTS/02.lexical_elements/07.automatic_semicolon_insertion/tbd.automatic_semicolon_insertion.ets similarity index 100% rename from migrator/test/staticTS/CTS/02.lexical_elements/07.automatic_semicolon_insertion/tbd.automatic_semicolon_insertion.sts rename to migrator/test/staticTS/CTS/02.lexical_elements/07.automatic_semicolon_insertion/tbd.automatic_semicolon_insertion.ets diff --git a/migrator/test/staticTS/CTS/03.types/01.predefined_primitive_types/07.implicit_conversion_for_numeric_types/tbd.implicit_numeric_conversion.sts b/migrator/test/staticTS/CTS/03.types/01.predefined_primitive_types/07.implicit_conversion_for_numeric_types/tbd.implicit_numeric_conversion.sts deleted file mode 100644 index d620c7ed2ab5d07c8de66ddd8440b09d0e42042d..0000000000000000000000000000000000000000 --- a/migrator/test/staticTS/CTS/03.types/01.predefined_primitive_types/07.implicit_conversion_for_numeric_types/tbd.implicit_numeric_conversion.sts +++ /dev/null @@ -1,3 +0,0 @@ -/*--- -desc: Implicit numeric conversion for primitive type ----*/ \ No newline at end of file diff --git a/migrator/test/staticTS/CTS/03.types/01.predefined_primitive_types/01.integer_type/integer_types.sts b/migrator/test/staticTS/CTS/03.types/01.primitive_types/01.integer_type/integer_types.ets similarity index 100% rename from migrator/test/staticTS/CTS/03.types/01.predefined_primitive_types/01.integer_type/integer_types.sts rename to migrator/test/staticTS/CTS/03.types/01.primitive_types/01.integer_type/integer_types.ets diff --git a/migrator/test/staticTS/CTS/03.types/01.predefined_primitive_types/01.integer_type/list.integer_types.yaml b/migrator/test/staticTS/CTS/03.types/01.primitive_types/01.integer_type/list.integer_types.yaml similarity index 100% rename from migrator/test/staticTS/CTS/03.types/01.predefined_primitive_types/01.integer_type/list.integer_types.yaml rename to migrator/test/staticTS/CTS/03.types/01.primitive_types/01.integer_type/list.integer_types.yaml diff --git a/migrator/test/staticTS/CTS/03.types/01.predefined_primitive_types/02.float_type/float_types.sts b/migrator/test/staticTS/CTS/03.types/01.primitive_types/03.float_types/float_types.ets similarity index 100% rename from migrator/test/staticTS/CTS/03.types/01.predefined_primitive_types/02.float_type/float_types.sts rename to migrator/test/staticTS/CTS/03.types/01.primitive_types/03.float_types/float_types.ets diff --git a/migrator/test/staticTS/CTS/03.types/01.predefined_primitive_types/02.float_type/float_types_nan.sts b/migrator/test/staticTS/CTS/03.types/01.primitive_types/03.float_types/float_types_nan.ets similarity index 100% rename from migrator/test/staticTS/CTS/03.types/01.predefined_primitive_types/02.float_type/float_types_nan.sts rename to migrator/test/staticTS/CTS/03.types/01.primitive_types/03.float_types/float_types_nan.ets diff --git a/migrator/test/staticTS/CTS/03.types/01.predefined_primitive_types/02.float_type/list.float_types.yaml b/migrator/test/staticTS/CTS/03.types/01.primitive_types/03.float_types/list.float_types.yaml similarity index 100% rename from migrator/test/staticTS/CTS/03.types/01.predefined_primitive_types/02.float_type/list.float_types.yaml rename to migrator/test/staticTS/CTS/03.types/01.primitive_types/03.float_types/list.float_types.yaml diff --git a/migrator/test/staticTS/CTS/03.types/01.predefined_primitive_types/04.char_type/char_type.sts b/migrator/test/staticTS/CTS/03.types/01.primitive_types/04.char_type/char_type.ets similarity index 100% rename from migrator/test/staticTS/CTS/03.types/01.predefined_primitive_types/04.char_type/char_type.sts rename to migrator/test/staticTS/CTS/03.types/01.primitive_types/04.char_type/char_type.ets diff --git a/migrator/test/staticTS/CTS/03.types/01.predefined_primitive_types/03.boolean_type/boolean_type.sts b/migrator/test/staticTS/CTS/03.types/01.primitive_types/05.boolean_type_and_operations/boolean_type.ets similarity index 100% rename from migrator/test/staticTS/CTS/03.types/01.predefined_primitive_types/03.boolean_type/boolean_type.sts rename to migrator/test/staticTS/CTS/03.types/01.primitive_types/05.boolean_type_and_operations/boolean_type.ets diff --git a/migrator/test/staticTS/CTS/03.types/01.predefined_primitive_types/05.void_type/void_type.sts b/migrator/test/staticTS/CTS/03.types/01.primitive_types/06.void_type/void_type.ets similarity index 100% rename from migrator/test/staticTS/CTS/03.types/01.predefined_primitive_types/05.void_type/void_type.sts rename to migrator/test/staticTS/CTS/03.types/01.primitive_types/06.void_type/void_type.ets diff --git a/migrator/test/staticTS/CTS/03.types/01.predefined_primitive_types/06.default_values_for_primitive_types/default_value.sts b/migrator/test/staticTS/CTS/03.types/01.primitive_types/07.default_values_for_primitive_types/default_value.ets similarity index 100% rename from migrator/test/staticTS/CTS/03.types/01.predefined_primitive_types/06.default_values_for_primitive_types/default_value.sts rename to migrator/test/staticTS/CTS/03.types/01.primitive_types/07.default_values_for_primitive_types/default_value.ets diff --git a/migrator/test/staticTS/CTS/03.types/01.predefined_primitive_types/06.default_values_for_primitive_types/list.default_value.yaml b/migrator/test/staticTS/CTS/03.types/01.primitive_types/07.default_values_for_primitive_types/list.default_value.yaml similarity index 88% rename from migrator/test/staticTS/CTS/03.types/01.predefined_primitive_types/06.default_values_for_primitive_types/list.default_value.yaml rename to migrator/test/staticTS/CTS/03.types/01.primitive_types/07.default_values_for_primitive_types/list.default_value.yaml index 9ffc292f9149ff299af735ba7f392e8bbb9bbce6..7b2339b3d3b3c2859b00fae568a102244d38e1be 100644 --- a/migrator/test/staticTS/CTS/03.types/01.predefined_primitive_types/06.default_values_for_primitive_types/list.default_value.yaml +++ b/migrator/test/staticTS/CTS/03.types/01.primitive_types/07.default_values_for_primitive_types/list.default_value.yaml @@ -7,4 +7,4 @@ - {type: float, value: 0.0} - {type: double, value: 0.0} - {type: char, value: '\u0000'} -- {type: boolean, value: false} +- {type: boolean, value: "false"} diff --git a/migrator/test/staticTS/CTS/03.types/03.named_types/list.named_types.yaml b/migrator/test/staticTS/CTS/03.types/02.reference_types/02.named_types/list.named_types.yaml similarity index 100% rename from migrator/test/staticTS/CTS/03.types/03.named_types/list.named_types.yaml rename to migrator/test/staticTS/CTS/03.types/02.reference_types/02.named_types/list.named_types.yaml diff --git a/migrator/test/staticTS/CTS/03.types/03.named_types/list.named_types_generics.yaml b/migrator/test/staticTS/CTS/03.types/02.reference_types/02.named_types/list.named_types_generics.yaml similarity index 100% rename from migrator/test/staticTS/CTS/03.types/03.named_types/list.named_types_generics.yaml rename to migrator/test/staticTS/CTS/03.types/02.reference_types/02.named_types/list.named_types_generics.yaml diff --git a/migrator/test/staticTS/CTS/03.types/03.named_types/named_types.sts b/migrator/test/staticTS/CTS/03.types/02.reference_types/02.named_types/named_types.ets similarity index 100% rename from migrator/test/staticTS/CTS/03.types/03.named_types/named_types.sts rename to migrator/test/staticTS/CTS/03.types/02.reference_types/02.named_types/named_types.ets diff --git a/migrator/test/staticTS/CTS/03.types/03.named_types/named_types_generics.sts b/migrator/test/staticTS/CTS/03.types/02.reference_types/02.named_types/named_types_generics.ets similarity index 100% rename from migrator/test/staticTS/CTS/03.types/03.named_types/named_types_generics.sts rename to migrator/test/staticTS/CTS/03.types/02.reference_types/02.named_types/named_types_generics.ets diff --git a/migrator/test/staticTS/CTS/03.types/04.predefined_named_types/01.object_type/object_type.sts b/migrator/test/staticTS/CTS/03.types/02.reference_types/04.the_object_class/object_type.ets similarity index 100% rename from migrator/test/staticTS/CTS/03.types/04.predefined_named_types/01.object_type/object_type.sts rename to migrator/test/staticTS/CTS/03.types/02.reference_types/04.the_object_class/object_type.ets diff --git a/migrator/test/staticTS/CTS/03.types/04.predefined_named_types/02.string_type/string_type.sts b/migrator/test/staticTS/CTS/03.types/02.reference_types/05.the_string_class/string_type.ets similarity index 100% rename from migrator/test/staticTS/CTS/03.types/04.predefined_named_types/02.string_type/string_type.sts rename to migrator/test/staticTS/CTS/03.types/02.reference_types/05.the_string_class/string_type.ets diff --git a/migrator/test/staticTS/CTS/03.types/02.reference_types/06.function_types/list.function_types.yaml b/migrator/test/staticTS/CTS/03.types/02.reference_types/06.function_types/list.function_types.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b7806af43c1612b25249949b44aaca366f62fdbf --- /dev/null +++ b/migrator/test/staticTS/CTS/03.types/02.reference_types/06.function_types/list.function_types.yaml @@ -0,0 +1,5 @@ +--- # List of valid function types + +- "(): void" +- "(int): void" + diff --git a/migrator/test/staticTS/CTS/03.types/05.type_reference/tbd.type_reference.sts b/migrator/test/staticTS/CTS/03.types/05.type_reference/tbd.type_reference.ets similarity index 100% rename from migrator/test/staticTS/CTS/03.types/05.type_reference/tbd.type_reference.sts rename to migrator/test/staticTS/CTS/03.types/05.type_reference/tbd.type_reference.ets diff --git a/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/01.names/qualified_name.sts b/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/01.names/qualified_name.ets similarity index 100% rename from migrator/test/staticTS/CTS/04.names_declarations_and_scopes/01.names/qualified_name.sts rename to migrator/test/staticTS/CTS/04.names_declarations_and_scopes/01.names/qualified_name.ets diff --git a/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/02.declarations/n.unique_block_decl.sts b/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/02.declarations/n.unique_block_decl.ets similarity index 100% rename from migrator/test/staticTS/CTS/04.names_declarations_and_scopes/02.declarations/n.unique_block_decl.sts rename to migrator/test/staticTS/CTS/04.names_declarations_and_scopes/02.declarations/n.unique_block_decl.ets diff --git a/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/02.declarations/n.unique_class_decl.sts b/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/02.declarations/n.unique_class_decl.ets similarity index 100% rename from migrator/test/staticTS/CTS/04.names_declarations_and_scopes/02.declarations/n.unique_class_decl.sts rename to migrator/test/staticTS/CTS/04.names_declarations_and_scopes/02.declarations/n.unique_class_decl.ets diff --git a/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/02.declarations/n.unique_decl_name.sts b/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/02.declarations/n.unique_decl_name.ets similarity index 100% rename from migrator/test/staticTS/CTS/04.names_declarations_and_scopes/02.declarations/n.unique_decl_name.sts rename to migrator/test/staticTS/CTS/04.names_declarations_and_scopes/02.declarations/n.unique_decl_name.ets diff --git a/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/02.declarations/n.unique_enum_decl.sts b/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/02.declarations/n.unique_enum_decl.ets similarity index 100% rename from migrator/test/staticTS/CTS/04.names_declarations_and_scopes/02.declarations/n.unique_enum_decl.sts rename to migrator/test/staticTS/CTS/04.names_declarations_and_scopes/02.declarations/n.unique_enum_decl.ets diff --git a/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/02.declarations/n.unique_func_decl.sts b/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/02.declarations/n.unique_func_decl.ets similarity index 100% rename from migrator/test/staticTS/CTS/04.names_declarations_and_scopes/02.declarations/n.unique_func_decl.sts rename to migrator/test/staticTS/CTS/04.names_declarations_and_scopes/02.declarations/n.unique_func_decl.ets diff --git a/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/02.declarations/n.unique_intf_decl.sts b/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/02.declarations/n.unique_intf_decl.ets similarity index 100% rename from migrator/test/staticTS/CTS/04.names_declarations_and_scopes/02.declarations/n.unique_intf_decl.sts rename to migrator/test/staticTS/CTS/04.names_declarations_and_scopes/02.declarations/n.unique_intf_decl.ets diff --git a/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/03.scopes/class_level.sts b/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/03.scopes/class_level.ets similarity index 100% rename from migrator/test/staticTS/CTS/04.names_declarations_and_scopes/03.scopes/class_level.sts rename to migrator/test/staticTS/CTS/04.names_declarations_and_scopes/03.scopes/class_level.ets diff --git a/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/03.scopes/n.hoisting.sts b/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/03.scopes/n.hoisting.ets similarity index 100% rename from migrator/test/staticTS/CTS/04.names_declarations_and_scopes/03.scopes/n.hoisting.sts rename to migrator/test/staticTS/CTS/04.names_declarations_and_scopes/03.scopes/n.hoisting.ets diff --git a/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/03.scopes/package_level.sts b/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/03.scopes/package_level.ets similarity index 100% rename from migrator/test/staticTS/CTS/04.names_declarations_and_scopes/03.scopes/package_level.sts rename to migrator/test/staticTS/CTS/04.names_declarations_and_scopes/03.scopes/package_level.ets diff --git a/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/03.scopes/tbd.enum_level.sts b/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/03.scopes/tbd.enum_level.ets similarity index 100% rename from migrator/test/staticTS/CTS/04.names_declarations_and_scopes/03.scopes/tbd.enum_level.sts rename to migrator/test/staticTS/CTS/04.names_declarations_and_scopes/03.scopes/tbd.enum_level.ets diff --git a/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/03.scopes/tbd.interface_level.ets b/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/03.scopes/tbd.interface_level.ets new file mode 100644 index 0000000000000000000000000000000000000000..9de3cbbcdeb6d743302373dc6648ffda647f3721 --- /dev/null +++ b/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/03.scopes/tbd.interface_level.ets @@ -0,0 +1,10 @@ +/*--- +desc: Interface level scope +---*/ +package scopes; + +interface I { + x: int = 1; +} + +function main(): void {} \ No newline at end of file diff --git a/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/05.variable_and_constant_declarations/01.variable_declarations/n.var_decl.sts b/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/05.variable_and_constant_declarations/01.variable_declarations/n.var_decl.ets similarity index 100% rename from migrator/test/staticTS/CTS/04.names_declarations_and_scopes/05.variable_and_constant_declarations/01.variable_declarations/n.var_decl.sts rename to migrator/test/staticTS/CTS/04.names_declarations_and_scopes/05.variable_and_constant_declarations/01.variable_declarations/n.var_decl.ets diff --git a/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/05.variable_and_constant_declarations/01.variable_declarations/tbd.initialize_before_use.sts b/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/05.variable_and_constant_declarations/01.variable_declarations/tbd.initialize_before_use.ets similarity index 100% rename from migrator/test/staticTS/CTS/04.names_declarations_and_scopes/05.variable_and_constant_declarations/01.variable_declarations/tbd.initialize_before_use.sts rename to migrator/test/staticTS/CTS/04.names_declarations_and_scopes/05.variable_and_constant_declarations/01.variable_declarations/tbd.initialize_before_use.ets diff --git a/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/05.variable_and_constant_declarations/01.variable_declarations/var_decl.sts b/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/05.variable_and_constant_declarations/01.variable_declarations/var_decl.ets similarity index 100% rename from migrator/test/staticTS/CTS/04.names_declarations_and_scopes/05.variable_and_constant_declarations/01.variable_declarations/var_decl.sts rename to migrator/test/staticTS/CTS/04.names_declarations_and_scopes/05.variable_and_constant_declarations/01.variable_declarations/var_decl.ets diff --git a/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/05.variable_and_constant_declarations/02.constant_declarations/const_decl.sts b/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/05.variable_and_constant_declarations/02.constant_declarations/const_decl.ets similarity index 100% rename from migrator/test/staticTS/CTS/04.names_declarations_and_scopes/05.variable_and_constant_declarations/02.constant_declarations/const_decl.sts rename to migrator/test/staticTS/CTS/04.names_declarations_and_scopes/05.variable_and_constant_declarations/02.constant_declarations/const_decl.ets diff --git a/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/05.variable_and_constant_declarations/02.constant_declarations/n.const_decl.sts b/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/05.variable_and_constant_declarations/02.constant_declarations/n.const_decl.ets similarity index 100% rename from migrator/test/staticTS/CTS/04.names_declarations_and_scopes/05.variable_and_constant_declarations/02.constant_declarations/n.const_decl.sts rename to migrator/test/staticTS/CTS/04.names_declarations_and_scopes/05.variable_and_constant_declarations/02.constant_declarations/n.const_decl.ets diff --git a/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/05.variable_and_constant_declarations/03.type_compatibility_with_initializer/initializer_compatibility.sts b/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/05.variable_and_constant_declarations/03.type_compatibility_with_initializer/initializer_compatibility.ets similarity index 100% rename from migrator/test/staticTS/CTS/04.names_declarations_and_scopes/05.variable_and_constant_declarations/03.type_compatibility_with_initializer/initializer_compatibility.sts rename to migrator/test/staticTS/CTS/04.names_declarations_and_scopes/05.variable_and_constant_declarations/03.type_compatibility_with_initializer/initializer_compatibility.ets diff --git a/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/05.variable_and_constant_declarations/04.type_inference_from_initializer/n.null_initializer.ets b/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/05.variable_and_constant_declarations/04.type_inference_from_initializer/n.null_initializer.ets new file mode 100644 index 0000000000000000000000000000000000000000..ace20c4e503bba81d57562952f25944b0cfa5c01 --- /dev/null +++ b/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/05.variable_and_constant_declarations/04.type_inference_from_initializer/n.null_initializer.ets @@ -0,0 +1,8 @@ +/*--- +desc: Null initializer forbidden +corner-case: true +---*/ + +let x = null; + +function main(): void {} \ No newline at end of file diff --git a/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/06.function_declarations/01.variadic_parameters/fn_variadic.ets b/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/06.function_declarations/01.variadic_parameters/fn_variadic.ets new file mode 100644 index 0000000000000000000000000000000000000000..1b8c7bb71b021b504df09652fdc819436ca451a0 --- /dev/null +++ b/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/06.function_declarations/01.variadic_parameters/fn_variadic.ets @@ -0,0 +1,11 @@ +/*--- +desc: Variadic parameters +---*/ + +function foo(...a: int): void { + assert true; +} + +function main(): void { + assert foo(1,2,3); +} \ No newline at end of file diff --git a/migrator/test/staticTS/CTS/03.types/02.array_type/array_type.sts b/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/06.function_declarations/function_decl.ets similarity index 32% rename from migrator/test/staticTS/CTS/03.types/02.array_type/array_type.sts rename to migrator/test/staticTS/CTS/04.names_declarations_and_scopes/06.function_declarations/function_decl.ets index ec6bbe9cc98ce407864296d585abf51111608caf..37d10dd34420f02119ac7a33ddc9e92ce1e1d734 100644 --- a/migrator/test/staticTS/CTS/03.types/02.array_type/array_type.sts +++ b/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/06.function_declarations/function_decl.ets @@ -1,7 +1,11 @@ +{% for fd in function_decls %} + /*--- -desc: Array type +desc: Function declaration ---*/ -let a: int[]; +{{.fd}} + function main(): void {} +{% endfor %} \ No newline at end of file diff --git a/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/06.function_declarations/list.function_decls.yaml b/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/06.function_declarations/list.function_decls.yaml new file mode 100644 index 0000000000000000000000000000000000000000..3e516aa9f1218ff054bf3a7d8c3063f4994f0093 --- /dev/null +++ b/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/06.function_declarations/list.function_decls.yaml @@ -0,0 +1,8 @@ +--- # List of valid function declarations + +- "function f(): void {}" +- "function f(a: int): void {}" +- "function f(a: int, b: long): void {}" +- "function f(): int {return 0;}" +- "function f(a: int, b: long): int {return 0;}" + diff --git a/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/06.function_declarations/n.nested_function.ets b/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/06.function_declarations/n.nested_function.ets new file mode 100644 index 0000000000000000000000000000000000000000..cce08cbc7083604d2641c84c9f17226aead0ff5c --- /dev/null +++ b/migrator/test/staticTS/CTS/04.names_declarations_and_scopes/06.function_declarations/n.nested_function.ets @@ -0,0 +1,7 @@ +/*--- +desc: Functions are allowed only at toplevel +---*/ + +function main(): void { + function nested(): void {} +} \ No newline at end of file diff --git a/migrator/test/staticTS/CTS/05.generic_and_parameterized_declarations/01.generic_declarations/01.generic_classes/n.generic_class_self_dependency.sts b/migrator/test/staticTS/CTS/05.generic_and_parameterized_declarations/01.generic_declarations/01.generic_classes/n.generic_class_self_dependency.ets similarity index 100% rename from migrator/test/staticTS/CTS/05.generic_and_parameterized_declarations/01.generic_declarations/01.generic_classes/n.generic_class_self_dependency.sts rename to migrator/test/staticTS/CTS/05.generic_and_parameterized_declarations/01.generic_declarations/01.generic_classes/n.generic_class_self_dependency.ets diff --git a/migrator/test/staticTS/CTS/05.generic_and_parameterized_declarations/01.generic_declarations/01.generic_classes/n.generic_class_wrong_constraint.sts b/migrator/test/staticTS/CTS/05.generic_and_parameterized_declarations/01.generic_declarations/01.generic_classes/n.generic_class_wrong_constraint.ets similarity index 100% rename from migrator/test/staticTS/CTS/05.generic_and_parameterized_declarations/01.generic_declarations/01.generic_classes/n.generic_class_wrong_constraint.sts rename to migrator/test/staticTS/CTS/05.generic_and_parameterized_declarations/01.generic_declarations/01.generic_classes/n.generic_class_wrong_constraint.ets diff --git a/migrator/test/staticTS/CTS/06.conversions_and_contexts/01.kinds_of_conversion/02.widening_primitive_conversion/widening.sts b/migrator/test/staticTS/CTS/06.conversions_and_contexts/01.kinds_of_conversion/02.widening_primitive_conversion/widening.ets similarity index 100% rename from migrator/test/staticTS/CTS/06.conversions_and_contexts/01.kinds_of_conversion/02.widening_primitive_conversion/widening.sts rename to migrator/test/staticTS/CTS/06.conversions_and_contexts/01.kinds_of_conversion/02.widening_primitive_conversion/widening.ets diff --git a/migrator/test/staticTS/CTS/06.conversions_and_contexts/01.kinds_of_conversion/07.boxing_conversion/boxing_conversion.sts b/migrator/test/staticTS/CTS/06.conversions_and_contexts/01.kinds_of_conversion/07.boxing_conversion/boxing_conversion.ets similarity index 100% rename from migrator/test/staticTS/CTS/06.conversions_and_contexts/01.kinds_of_conversion/07.boxing_conversion/boxing_conversion.sts rename to migrator/test/staticTS/CTS/06.conversions_and_contexts/01.kinds_of_conversion/07.boxing_conversion/boxing_conversion.ets diff --git a/migrator/test/staticTS/CTS/06.conversions_and_contexts/01.kinds_of_conversion/07.boxing_conversion/boxing_coversion_nan.sts b/migrator/test/staticTS/CTS/06.conversions_and_contexts/01.kinds_of_conversion/07.boxing_conversion/boxing_coversion_nan.ets similarity index 100% rename from migrator/test/staticTS/CTS/06.conversions_and_contexts/01.kinds_of_conversion/07.boxing_conversion/boxing_coversion_nan.sts rename to migrator/test/staticTS/CTS/06.conversions_and_contexts/01.kinds_of_conversion/07.boxing_conversion/boxing_coversion_nan.ets diff --git a/migrator/test/staticTS/CTS/06.conversions_and_contexts/01.kinds_of_conversion/08.unboxing_conversion/unboxing_conversion.sts b/migrator/test/staticTS/CTS/06.conversions_and_contexts/01.kinds_of_conversion/08.unboxing_conversion/unboxing_conversion.ets similarity index 100% rename from migrator/test/staticTS/CTS/06.conversions_and_contexts/01.kinds_of_conversion/08.unboxing_conversion/unboxing_conversion.sts rename to migrator/test/staticTS/CTS/06.conversions_and_contexts/01.kinds_of_conversion/08.unboxing_conversion/unboxing_conversion.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/06.evaluation_order/03.evaluation_respects_parentheses_and_precedence/int_parens.sts b/migrator/test/staticTS/CTS/07.expressions/06.evaluation_order/03.evaluation_respects_parentheses_and_precedence/int_parens.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/06.evaluation_order/03.evaluation_respects_parentheses_and_precedence/int_parens.sts rename to migrator/test/staticTS/CTS/07.expressions/06.evaluation_order/03.evaluation_respects_parentheses_and_precedence/int_parens.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/06.evaluation_order/04.arguments_lists_are_evaluated_left_to_right/arg_order_function.sts b/migrator/test/staticTS/CTS/07.expressions/06.evaluation_order/04.arguments_lists_are_evaluated_left_to_right/arg_order_function.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/06.evaluation_order/04.arguments_lists_are_evaluated_left_to_right/arg_order_function.sts rename to migrator/test/staticTS/CTS/07.expressions/06.evaluation_order/04.arguments_lists_are_evaluated_left_to_right/arg_order_function.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/08.class_literal/class_literal.sts b/migrator/test/staticTS/CTS/07.expressions/08.class_literal/class_literal.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/08.class_literal/class_literal.sts rename to migrator/test/staticTS/CTS/07.expressions/08.class_literal/class_literal.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/09.array_literal/array_literal.sts b/migrator/test/staticTS/CTS/07.expressions/09.array_literal/array_literal.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/09.array_literal/array_literal.sts rename to migrator/test/staticTS/CTS/07.expressions/09.array_literal/array_literal.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/10.parenthesized_expression/paren_expr.sts b/migrator/test/staticTS/CTS/07.expressions/10.parenthesized_expression/paren_expr.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/10.parenthesized_expression/paren_expr.sts rename to migrator/test/staticTS/CTS/07.expressions/10.parenthesized_expression/paren_expr.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/14.array_access_expression/array_access.sts b/migrator/test/staticTS/CTS/07.expressions/14.array_access_expression/array_access.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/14.array_access_expression/array_access.sts rename to migrator/test/staticTS/CTS/07.expressions/14.array_access_expression/array_access.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/15.function_invocation_expression/function_invocation_expr.sts b/migrator/test/staticTS/CTS/07.expressions/15.function_invocation_expression/function_invocation_expr.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/15.function_invocation_expression/function_invocation_expr.sts rename to migrator/test/staticTS/CTS/07.expressions/15.function_invocation_expression/function_invocation_expr.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/16.new_expression/01.class_instance_creation_expression/class_instance.sts b/migrator/test/staticTS/CTS/07.expressions/16.new_expression/01.class_instance_creation_expression/class_instance.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/16.new_expression/01.class_instance_creation_expression/class_instance.sts rename to migrator/test/staticTS/CTS/07.expressions/16.new_expression/01.class_instance_creation_expression/class_instance.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/16.new_expression/02.array_creation_instance/array_creation.sts b/migrator/test/staticTS/CTS/07.expressions/16.new_expression/02.array_creation_instance/array_creation.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/16.new_expression/02.array_creation_instance/array_creation.sts rename to migrator/test/staticTS/CTS/07.expressions/16.new_expression/02.array_creation_instance/array_creation.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/17.unary_operators/01.postfix_increment_operator/postfix_increment.sts b/migrator/test/staticTS/CTS/07.expressions/17.unary_operators/01.postfix_increment_operator/postfix_increment.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/17.unary_operators/01.postfix_increment_operator/postfix_increment.sts rename to migrator/test/staticTS/CTS/07.expressions/17.unary_operators/01.postfix_increment_operator/postfix_increment.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/17.unary_operators/02.postfix_decrement_operator/postfix_decrement.sts b/migrator/test/staticTS/CTS/07.expressions/17.unary_operators/02.postfix_decrement_operator/postfix_decrement.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/17.unary_operators/02.postfix_decrement_operator/postfix_decrement.sts rename to migrator/test/staticTS/CTS/07.expressions/17.unary_operators/02.postfix_decrement_operator/postfix_decrement.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/17.unary_operators/03.prefix_increment_operator/prefix_increment.sts b/migrator/test/staticTS/CTS/07.expressions/17.unary_operators/03.prefix_increment_operator/prefix_increment.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/17.unary_operators/03.prefix_increment_operator/prefix_increment.sts rename to migrator/test/staticTS/CTS/07.expressions/17.unary_operators/03.prefix_increment_operator/prefix_increment.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/17.unary_operators/04.prefix_decrement_operator/prefix_decrement.sts b/migrator/test/staticTS/CTS/07.expressions/17.unary_operators/04.prefix_decrement_operator/prefix_decrement.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/17.unary_operators/04.prefix_decrement_operator/prefix_decrement.sts rename to migrator/test/staticTS/CTS/07.expressions/17.unary_operators/04.prefix_decrement_operator/prefix_decrement.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/17.unary_operators/05.unary_plus_operator/unary_plus.sts b/migrator/test/staticTS/CTS/07.expressions/17.unary_operators/05.unary_plus_operator/unary_plus.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/17.unary_operators/05.unary_plus_operator/unary_plus.sts rename to migrator/test/staticTS/CTS/07.expressions/17.unary_operators/05.unary_plus_operator/unary_plus.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/17.unary_operators/06.unary_minus_operator/unary_minus_corner.sts b/migrator/test/staticTS/CTS/07.expressions/17.unary_operators/06.unary_minus_operator/unary_minus_corner.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/17.unary_operators/06.unary_minus_operator/unary_minus_corner.sts rename to migrator/test/staticTS/CTS/07.expressions/17.unary_operators/06.unary_minus_operator/unary_minus_corner.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/17.unary_operators/06.unary_minus_operator/unary_minus_inbound.sts b/migrator/test/staticTS/CTS/07.expressions/17.unary_operators/06.unary_minus_operator/unary_minus_inbound.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/17.unary_operators/06.unary_minus_operator/unary_minus_inbound.sts rename to migrator/test/staticTS/CTS/07.expressions/17.unary_operators/06.unary_minus_operator/unary_minus_inbound.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/17.unary_operators/06.unary_minus_operator/unary_minus_onbound.sts b/migrator/test/staticTS/CTS/07.expressions/17.unary_operators/06.unary_minus_operator/unary_minus_onbound.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/17.unary_operators/06.unary_minus_operator/unary_minus_onbound.sts rename to migrator/test/staticTS/CTS/07.expressions/17.unary_operators/06.unary_minus_operator/unary_minus_onbound.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/17.unary_operators/07.bitwise_complement_operator/bitwise_complement.sts b/migrator/test/staticTS/CTS/07.expressions/17.unary_operators/07.bitwise_complement_operator/bitwise_complement.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/17.unary_operators/07.bitwise_complement_operator/bitwise_complement.sts rename to migrator/test/staticTS/CTS/07.expressions/17.unary_operators/07.bitwise_complement_operator/bitwise_complement.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/17.unary_operators/07.bitwise_complement_operator/tbd.bitwise_long_int.sts b/migrator/test/staticTS/CTS/07.expressions/17.unary_operators/07.bitwise_complement_operator/tbd.bitwise_long_int.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/17.unary_operators/07.bitwise_complement_operator/tbd.bitwise_long_int.sts rename to migrator/test/staticTS/CTS/07.expressions/17.unary_operators/07.bitwise_complement_operator/tbd.bitwise_long_int.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/17.unary_operators/08.logical_complement_operator/logical_complement.sts b/migrator/test/staticTS/CTS/07.expressions/17.unary_operators/08.logical_complement_operator/logical_complement.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/17.unary_operators/08.logical_complement_operator/logical_complement.sts rename to migrator/test/staticTS/CTS/07.expressions/17.unary_operators/08.logical_complement_operator/logical_complement.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/19.multiplicative_operators/01.multiplication_operator/integer_mul.sts b/migrator/test/staticTS/CTS/07.expressions/19.multiplicative_operators/01.multiplication_operator/integer_mul.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/19.multiplicative_operators/01.multiplication_operator/integer_mul.sts rename to migrator/test/staticTS/CTS/07.expressions/19.multiplicative_operators/01.multiplication_operator/integer_mul.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/19.multiplicative_operators/01.multiplication_operator/nan_inf.sts b/migrator/test/staticTS/CTS/07.expressions/19.multiplicative_operators/01.multiplication_operator/nan_inf.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/19.multiplicative_operators/01.multiplication_operator/nan_inf.sts rename to migrator/test/staticTS/CTS/07.expressions/19.multiplicative_operators/01.multiplication_operator/nan_inf.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/19.multiplicative_operators/02.division_operator/nan_inf.sts b/migrator/test/staticTS/CTS/07.expressions/19.multiplicative_operators/02.division_operator/nan_inf.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/19.multiplicative_operators/02.division_operator/nan_inf.sts rename to migrator/test/staticTS/CTS/07.expressions/19.multiplicative_operators/02.division_operator/nan_inf.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/19.multiplicative_operators/02.division_operator/tbd.float_div_overflow.sts b/migrator/test/staticTS/CTS/07.expressions/19.multiplicative_operators/02.division_operator/tbd.float_div_overflow.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/19.multiplicative_operators/02.division_operator/tbd.float_div_overflow.sts rename to migrator/test/staticTS/CTS/07.expressions/19.multiplicative_operators/02.division_operator/tbd.float_div_overflow.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/19.multiplicative_operators/02.division_operator/tbd.float_division.sts b/migrator/test/staticTS/CTS/07.expressions/19.multiplicative_operators/02.division_operator/tbd.float_division.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/19.multiplicative_operators/02.division_operator/tbd.float_division.sts rename to migrator/test/staticTS/CTS/07.expressions/19.multiplicative_operators/02.division_operator/tbd.float_division.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/19.multiplicative_operators/02.division_operator/tbd.int_div_overflow.sts b/migrator/test/staticTS/CTS/07.expressions/19.multiplicative_operators/02.division_operator/tbd.int_div_overflow.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/19.multiplicative_operators/02.division_operator/tbd.int_div_overflow.sts rename to migrator/test/staticTS/CTS/07.expressions/19.multiplicative_operators/02.division_operator/tbd.int_div_overflow.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/19.multiplicative_operators/03.remainder_operator/integer_remainder.sts b/migrator/test/staticTS/CTS/07.expressions/19.multiplicative_operators/03.remainder_operator/integer_remainder.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/19.multiplicative_operators/03.remainder_operator/integer_remainder.sts rename to migrator/test/staticTS/CTS/07.expressions/19.multiplicative_operators/03.remainder_operator/integer_remainder.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/19.multiplicative_operators/03.remainder_operator/nan_inf.sts b/migrator/test/staticTS/CTS/07.expressions/19.multiplicative_operators/03.remainder_operator/nan_inf.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/19.multiplicative_operators/03.remainder_operator/nan_inf.sts rename to migrator/test/staticTS/CTS/07.expressions/19.multiplicative_operators/03.remainder_operator/nan_inf.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/20.additive_operators/01.string_concatenation_operator/string_concat.sts b/migrator/test/staticTS/CTS/07.expressions/20.additive_operators/01.string_concatenation_operator/string_concat.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/20.additive_operators/01.string_concatenation_operator/string_concat.sts rename to migrator/test/staticTS/CTS/07.expressions/20.additive_operators/01.string_concatenation_operator/string_concat.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/20.additive_operators/02.additive_operators_for_numeric_types/nan_inf.sts b/migrator/test/staticTS/CTS/07.expressions/20.additive_operators/02.additive_operators_for_numeric_types/nan_inf.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/20.additive_operators/02.additive_operators_for_numeric_types/nan_inf.sts rename to migrator/test/staticTS/CTS/07.expressions/20.additive_operators/02.additive_operators_for_numeric_types/nan_inf.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/21.shift_operators/list.right_shift_negative.yaml b/migrator/test/staticTS/CTS/07.expressions/21.shift_operators/list.right_shift_negative.yaml new file mode 100644 index 0000000000000000000000000000000000000000..3954a926656278324a3c8dce704ab4502f5f96e4 --- /dev/null +++ b/migrator/test/staticTS/CTS/07.expressions/21.shift_operators/list.right_shift_negative.yaml @@ -0,0 +1,4 @@ +--- # List of shift operators and numeric errors + +- {type: int, value: "0x80000000"} +- {type: long, value: "-1"} diff --git a/migrator/test/staticTS/CTS/07.expressions/21.shift_operators/list.shift_errors.yaml b/migrator/test/staticTS/CTS/07.expressions/21.shift_operators/list.shift_errors.yaml new file mode 100644 index 0000000000000000000000000000000000000000..e03a95d9c425709c906c86b1495587b0605db481 --- /dev/null +++ b/migrator/test/staticTS/CTS/07.expressions/21.shift_operators/list.shift_errors.yaml @@ -0,0 +1,7 @@ +--- # List of shift operators and numeric errors + +- {type: int, shift: "<<", value: "0x20"} +- {type: int, shift: ">>", value: "0x20"} + +- {type: long, shift: "<<", value: "0x40"} +- {type: long, shift: ">>", value: "0x40"} diff --git a/migrator/test/staticTS/CTS/07.expressions/21.shift_operators/n.shift_int.ets b/migrator/test/staticTS/CTS/07.expressions/21.shift_operators/n.shift_int.ets new file mode 100644 index 0000000000000000000000000000000000000000..c9996541d468c0581f0224028bf0ae3fe5b002b8 --- /dev/null +++ b/migrator/test/staticTS/CTS/07.expressions/21.shift_operators/n.shift_int.ets @@ -0,0 +1,11 @@ +{% for se in shift_errors %} +/*--- +desc: Shift of int type, large shift value +---*/ + +function main(): void { + let v: {{.se.type}} = 1; + let k = v {{.se.shift}} {{.se.value}}; +} + +{% endfor %} \ No newline at end of file diff --git a/migrator/test/staticTS/CTS/07.expressions/21.shift_operators/rshift_int.ets b/migrator/test/staticTS/CTS/07.expressions/21.shift_operators/rshift_int.ets new file mode 100644 index 0000000000000000000000000000000000000000..4d06a7f2d19fa31107e9ccf457f55f7176a13e3b --- /dev/null +++ b/migrator/test/staticTS/CTS/07.expressions/21.shift_operators/rshift_int.ets @@ -0,0 +1,15 @@ +{% for rn in right_shift_negative %} +/*--- +desc: Corner case for right shift +corner-case: true +---*/ + +function main(): void { + let n: {{.rn.type}} = {{.rn.value}}; + let s = 1; + + let a = n >>> s; + let b = (n >> s) + (2 << ~s); + assert a == b; +} +{% endfor %} \ No newline at end of file diff --git a/migrator/test/staticTS/CTS/07.expressions/22.relational_operators/01.numerical_comparison_operators/float_comparison.sts b/migrator/test/staticTS/CTS/07.expressions/22.relational_operators/01.numerical_comparison_operators/float_comparison.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/22.relational_operators/01.numerical_comparison_operators/float_comparison.sts rename to migrator/test/staticTS/CTS/07.expressions/22.relational_operators/01.numerical_comparison_operators/float_comparison.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/22.relational_operators/01.numerical_comparison_operators/integer_comparison.sts b/migrator/test/staticTS/CTS/07.expressions/22.relational_operators/01.numerical_comparison_operators/integer_comparison.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/22.relational_operators/01.numerical_comparison_operators/integer_comparison.sts rename to migrator/test/staticTS/CTS/07.expressions/22.relational_operators/01.numerical_comparison_operators/integer_comparison.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/23.type_comparison_operator/instanceof.sts b/migrator/test/staticTS/CTS/07.expressions/23.type_comparison_operator_instanceof/instanceof.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/23.type_comparison_operator/instanceof.sts rename to migrator/test/staticTS/CTS/07.expressions/23.type_comparison_operator_instanceof/instanceof.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/23.type_comparison_operator/list.instanceof.yaml b/migrator/test/staticTS/CTS/07.expressions/23.type_comparison_operator_instanceof/list.instanceof.yaml similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/23.type_comparison_operator/list.instanceof.yaml rename to migrator/test/staticTS/CTS/07.expressions/23.type_comparison_operator_instanceof/list.instanceof.yaml diff --git a/migrator/test/staticTS/CTS/07.expressions/24.equality_operator/01.numerical_equality_operators/float_equality_00.sts b/migrator/test/staticTS/CTS/07.expressions/24.equality_operator/01.numerical_equality_operators/float_equality_00.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/24.equality_operator/01.numerical_equality_operators/float_equality_00.sts rename to migrator/test/staticTS/CTS/07.expressions/24.equality_operator/01.numerical_equality_operators/float_equality_00.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/24.equality_operator/01.numerical_equality_operators/float_equality_01.sts b/migrator/test/staticTS/CTS/07.expressions/24.equality_operator/01.numerical_equality_operators/float_equality_01.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/24.equality_operator/01.numerical_equality_operators/float_equality_01.sts rename to migrator/test/staticTS/CTS/07.expressions/24.equality_operator/01.numerical_equality_operators/float_equality_01.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/24.equality_operator/01.numerical_equality_operators/float_equality_02.sts b/migrator/test/staticTS/CTS/07.expressions/24.equality_operator/01.numerical_equality_operators/float_equality_02.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/24.equality_operator/01.numerical_equality_operators/float_equality_02.sts rename to migrator/test/staticTS/CTS/07.expressions/24.equality_operator/01.numerical_equality_operators/float_equality_02.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/24.equality_operator/01.numerical_equality_operators/float_equality_03.sts b/migrator/test/staticTS/CTS/07.expressions/24.equality_operator/01.numerical_equality_operators/float_equality_03.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/24.equality_operator/01.numerical_equality_operators/float_equality_03.sts rename to migrator/test/staticTS/CTS/07.expressions/24.equality_operator/01.numerical_equality_operators/float_equality_03.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/24.equality_operator/01.numerical_equality_operators/float_equality_04.sts b/migrator/test/staticTS/CTS/07.expressions/24.equality_operator/01.numerical_equality_operators/float_equality_04.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/24.equality_operator/01.numerical_equality_operators/float_equality_04.sts rename to migrator/test/staticTS/CTS/07.expressions/24.equality_operator/01.numerical_equality_operators/float_equality_04.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/24.equality_operator/02.boolean_equality_operators/boolean_eq.sts b/migrator/test/staticTS/CTS/07.expressions/24.equality_operator/02.boolean_equality_operators/boolean_eq.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/24.equality_operator/02.boolean_equality_operators/boolean_eq.sts rename to migrator/test/staticTS/CTS/07.expressions/24.equality_operator/02.boolean_equality_operators/boolean_eq.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/24.equality_operator/03.string_equality_operators/string_eq.sts b/migrator/test/staticTS/CTS/07.expressions/24.equality_operator/03.string_equality_operators/string_eq.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/24.equality_operator/03.string_equality_operators/string_eq.sts rename to migrator/test/staticTS/CTS/07.expressions/24.equality_operator/03.string_equality_operators/string_eq.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/24.equality_operator/general_equality_00.sts b/migrator/test/staticTS/CTS/07.expressions/24.equality_operator/general_equality_00.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/24.equality_operator/general_equality_00.sts rename to migrator/test/staticTS/CTS/07.expressions/24.equality_operator/general_equality_00.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/24.equality_operator/general_equality_01.sts b/migrator/test/staticTS/CTS/07.expressions/24.equality_operator/general_equality_01.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/24.equality_operator/general_equality_01.sts rename to migrator/test/staticTS/CTS/07.expressions/24.equality_operator/general_equality_01.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/24.equality_operator/general_equality_02.sts b/migrator/test/staticTS/CTS/07.expressions/24.equality_operator/general_equality_02.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/24.equality_operator/general_equality_02.sts rename to migrator/test/staticTS/CTS/07.expressions/24.equality_operator/general_equality_02.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/25.bitwise_and_logical_operators/01.integer_bitwise_operators/integer_and.sts b/migrator/test/staticTS/CTS/07.expressions/25.bitwise_and_logical_operators/01.integer_bitwise_operators/integer_and.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/25.bitwise_and_logical_operators/01.integer_bitwise_operators/integer_and.sts rename to migrator/test/staticTS/CTS/07.expressions/25.bitwise_and_logical_operators/01.integer_bitwise_operators/integer_and.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/25.bitwise_and_logical_operators/01.integer_bitwise_operators/integer_or.sts b/migrator/test/staticTS/CTS/07.expressions/25.bitwise_and_logical_operators/01.integer_bitwise_operators/integer_or.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/25.bitwise_and_logical_operators/01.integer_bitwise_operators/integer_or.sts rename to migrator/test/staticTS/CTS/07.expressions/25.bitwise_and_logical_operators/01.integer_bitwise_operators/integer_or.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/25.bitwise_and_logical_operators/01.integer_bitwise_operators/integer_xor.sts b/migrator/test/staticTS/CTS/07.expressions/25.bitwise_and_logical_operators/01.integer_bitwise_operators/integer_xor.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/25.bitwise_and_logical_operators/01.integer_bitwise_operators/integer_xor.sts rename to migrator/test/staticTS/CTS/07.expressions/25.bitwise_and_logical_operators/01.integer_bitwise_operators/integer_xor.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/25.bitwise_and_logical_operators/01.integer_bitwise_operators/tbd.large_size_operations.sts b/migrator/test/staticTS/CTS/07.expressions/25.bitwise_and_logical_operators/01.integer_bitwise_operators/tbd.large_size_operations.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/25.bitwise_and_logical_operators/01.integer_bitwise_operators/tbd.large_size_operations.sts rename to migrator/test/staticTS/CTS/07.expressions/25.bitwise_and_logical_operators/01.integer_bitwise_operators/tbd.large_size_operations.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/25.bitwise_and_logical_operators/02.logical_bitwise_operators/logical_bitwise_bool.sts b/migrator/test/staticTS/CTS/07.expressions/25.bitwise_and_logical_operators/02.logical_bitwise_operators/logical_bitwise_bool.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/25.bitwise_and_logical_operators/02.logical_bitwise_operators/logical_bitwise_bool.sts rename to migrator/test/staticTS/CTS/07.expressions/25.bitwise_and_logical_operators/02.logical_bitwise_operators/logical_bitwise_bool.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/25.bitwise_and_logical_operators/02.logical_bitwise_operators/logical_bitwise_boolean.sts b/migrator/test/staticTS/CTS/07.expressions/25.bitwise_and_logical_operators/02.logical_bitwise_operators/logical_bitwise_boolean.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/25.bitwise_and_logical_operators/02.logical_bitwise_operators/logical_bitwise_boolean.sts rename to migrator/test/staticTS/CTS/07.expressions/25.bitwise_and_logical_operators/02.logical_bitwise_operators/logical_bitwise_boolean.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/26.conditional_and_operator/conditional_and_bool.sts b/migrator/test/staticTS/CTS/07.expressions/26.conditional_and_operator/conditional_and_bool.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/26.conditional_and_operator/conditional_and_bool.sts rename to migrator/test/staticTS/CTS/07.expressions/26.conditional_and_operator/conditional_and_bool.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/26.conditional_and_operator/conditional_and_boolean.sts b/migrator/test/staticTS/CTS/07.expressions/26.conditional_and_operator/conditional_and_boolean.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/26.conditional_and_operator/conditional_and_boolean.sts rename to migrator/test/staticTS/CTS/07.expressions/26.conditional_and_operator/conditional_and_boolean.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/26.conditional_and_operator/tbd.n.conditional_and_bool.sts b/migrator/test/staticTS/CTS/07.expressions/26.conditional_and_operator/tbd.n.conditional_and_bool.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/26.conditional_and_operator/tbd.n.conditional_and_bool.sts rename to migrator/test/staticTS/CTS/07.expressions/26.conditional_and_operator/tbd.n.conditional_and_bool.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/27.conditional_or_operator/conditional_or_bool.sts b/migrator/test/staticTS/CTS/07.expressions/27.conditional_or_operator/conditional_or_bool.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/27.conditional_or_operator/conditional_or_bool.sts rename to migrator/test/staticTS/CTS/07.expressions/27.conditional_or_operator/conditional_or_bool.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/27.conditional_or_operator/conditional_or_boolean.sts b/migrator/test/staticTS/CTS/07.expressions/27.conditional_or_operator/conditional_or_boolean.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/27.conditional_or_operator/conditional_or_boolean.sts rename to migrator/test/staticTS/CTS/07.expressions/27.conditional_or_operator/conditional_or_boolean.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/27.conditional_or_operator/tbd.n.conditional_or_bool.sts b/migrator/test/staticTS/CTS/07.expressions/27.conditional_or_operator/tbd.n.conditional_or_bool.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/27.conditional_or_operator/tbd.n.conditional_or_bool.sts rename to migrator/test/staticTS/CTS/07.expressions/27.conditional_or_operator/tbd.n.conditional_or_bool.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/29.conditional_expressions/conditional_expression_evaluation.sts b/migrator/test/staticTS/CTS/07.expressions/29.conditional_expressions/conditional_expression_evaluation.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/29.conditional_expressions/conditional_expression_evaluation.sts rename to migrator/test/staticTS/CTS/07.expressions/29.conditional_expressions/conditional_expression_evaluation.ets diff --git a/migrator/test/staticTS/CTS/07.expressions/29.conditional_expressions/conditional_expression_order.sts b/migrator/test/staticTS/CTS/07.expressions/29.conditional_expressions/conditional_expression_order.ets similarity index 100% rename from migrator/test/staticTS/CTS/07.expressions/29.conditional_expressions/conditional_expression_order.sts rename to migrator/test/staticTS/CTS/07.expressions/29.conditional_expressions/conditional_expression_order.ets diff --git a/migrator/test/staticTS/CTS/08.statements/01.expression_statement/expression_statement.sts b/migrator/test/staticTS/CTS/08.statements/01.expression_statement/expression_statement.ets similarity index 100% rename from migrator/test/staticTS/CTS/08.statements/01.expression_statement/expression_statement.sts rename to migrator/test/staticTS/CTS/08.statements/01.expression_statement/expression_statement.ets diff --git a/migrator/test/staticTS/CTS/08.statements/02.block/block_statement.sts b/migrator/test/staticTS/CTS/08.statements/02.block/block_statement.ets similarity index 100% rename from migrator/test/staticTS/CTS/08.statements/02.block/block_statement.sts rename to migrator/test/staticTS/CTS/08.statements/02.block/block_statement.ets diff --git a/migrator/test/staticTS/CTS/08.statements/03.labeled_statement/labeled_statement.sts b/migrator/test/staticTS/CTS/08.statements/03.labeled_statement/labeled_statement.ets similarity index 100% rename from migrator/test/staticTS/CTS/08.statements/03.labeled_statement/labeled_statement.sts rename to migrator/test/staticTS/CTS/08.statements/03.labeled_statement/labeled_statement.ets diff --git a/migrator/test/staticTS/CTS/08.statements/04.local_declarations/local_class.sts b/migrator/test/staticTS/CTS/08.statements/04.local_declarations/local_class.ets similarity index 100% rename from migrator/test/staticTS/CTS/08.statements/04.local_declarations/local_class.sts rename to migrator/test/staticTS/CTS/08.statements/04.local_declarations/local_class.ets diff --git a/migrator/test/staticTS/CTS/08.statements/04.local_declarations/local_const.sts b/migrator/test/staticTS/CTS/08.statements/04.local_declarations/local_const.ets similarity index 100% rename from migrator/test/staticTS/CTS/08.statements/04.local_declarations/local_const.sts rename to migrator/test/staticTS/CTS/08.statements/04.local_declarations/local_const.ets diff --git a/migrator/test/staticTS/CTS/08.statements/04.local_declarations/local_var.sts b/migrator/test/staticTS/CTS/08.statements/04.local_declarations/local_var.ets similarity index 100% rename from migrator/test/staticTS/CTS/08.statements/04.local_declarations/local_var.sts rename to migrator/test/staticTS/CTS/08.statements/04.local_declarations/local_var.ets diff --git a/migrator/test/staticTS/CTS/08.statements/04.local_declarations/n.local_class.sts b/migrator/test/staticTS/CTS/08.statements/04.local_declarations/n.local_class.ets similarity index 100% rename from migrator/test/staticTS/CTS/08.statements/04.local_declarations/n.local_class.sts rename to migrator/test/staticTS/CTS/08.statements/04.local_declarations/n.local_class.ets diff --git a/migrator/test/staticTS/CTS/08.statements/04.local_declarations/n.local_const.sts b/migrator/test/staticTS/CTS/08.statements/04.local_declarations/n.local_const.ets similarity index 100% rename from migrator/test/staticTS/CTS/08.statements/04.local_declarations/n.local_const.sts rename to migrator/test/staticTS/CTS/08.statements/04.local_declarations/n.local_const.ets diff --git a/migrator/test/staticTS/CTS/08.statements/04.local_declarations/n.local_var.sts b/migrator/test/staticTS/CTS/08.statements/04.local_declarations/n.local_var.ets similarity index 100% rename from migrator/test/staticTS/CTS/08.statements/04.local_declarations/n.local_var.sts rename to migrator/test/staticTS/CTS/08.statements/04.local_declarations/n.local_var.ets diff --git a/migrator/test/staticTS/CTS/08.statements/05.if_statement/if.ets b/migrator/test/staticTS/CTS/08.statements/05.if_statement/if.ets new file mode 100644 index 0000000000000000000000000000000000000000..5b7b8eea2920b37affc26d2b1c40ff6d34ad9db4 --- /dev/null +++ b/migrator/test/staticTS/CTS/08.statements/05.if_statement/if.ets @@ -0,0 +1,11 @@ +/*--- +desc: If statement +---*/ + +function main(): void { + let i = 1; + if (i > 0) { + i--; + } + assert i == 0; +} \ No newline at end of file diff --git a/migrator/test/staticTS/CTS/08.statements/05.if_statement/if_not_executed.ets b/migrator/test/staticTS/CTS/08.statements/05.if_statement/if_not_executed.ets new file mode 100644 index 0000000000000000000000000000000000000000..436fdc40623958c20fb57bc41064fea0e143f7b9 --- /dev/null +++ b/migrator/test/staticTS/CTS/08.statements/05.if_statement/if_not_executed.ets @@ -0,0 +1,9 @@ +/*--- +desc: If statement (not executed) +---*/ + +function main(): void { + if (false) { + assert false; + } +} \ No newline at end of file diff --git a/migrator/test/staticTS/CTS/08.statements/05.if_statement/nested_if.ets b/migrator/test/staticTS/CTS/08.statements/05.if_statement/nested_if.ets new file mode 100644 index 0000000000000000000000000000000000000000..a187f68d04ae2a9460913f016314f17b63cad620 --- /dev/null +++ b/migrator/test/staticTS/CTS/08.statements/05.if_statement/nested_if.ets @@ -0,0 +1,11 @@ +/*--- +desc: Nested if statement +---*/ + +function main(): void { + if (false) { + if (true) { + assert false; + } + } else assert true; +} \ No newline at end of file diff --git a/migrator/test/staticTS/CTS/08.statements/06.while_and_do_statements/do.sts b/migrator/test/staticTS/CTS/08.statements/06.while_and_do_statements/do.ets similarity index 100% rename from migrator/test/staticTS/CTS/08.statements/06.while_and_do_statements/do.sts rename to migrator/test/staticTS/CTS/08.statements/06.while_and_do_statements/do.ets diff --git a/migrator/test/staticTS/CTS/08.statements/06.while_and_do_statements/while.sts b/migrator/test/staticTS/CTS/08.statements/06.while_and_do_statements/while.ets similarity index 100% rename from migrator/test/staticTS/CTS/08.statements/06.while_and_do_statements/while.sts rename to migrator/test/staticTS/CTS/08.statements/06.while_and_do_statements/while.ets diff --git a/migrator/test/staticTS/CTS/08.statements/06.while_and_do_statements/while_not_executed.sts b/migrator/test/staticTS/CTS/08.statements/06.while_and_do_statements/while_not_executed.ets similarity index 100% rename from migrator/test/staticTS/CTS/08.statements/06.while_and_do_statements/while_not_executed.sts rename to migrator/test/staticTS/CTS/08.statements/06.while_and_do_statements/while_not_executed.ets diff --git a/migrator/test/staticTS/CTS/08.statements/07.for_statement/for_existing.ets b/migrator/test/staticTS/CTS/08.statements/07.for_statement/for_existing.ets new file mode 100644 index 0000000000000000000000000000000000000000..e1276ec8d8ae894a4ef37f7a0bb72bc71882344f --- /dev/null +++ b/migrator/test/staticTS/CTS/08.statements/07.for_statement/for_existing.ets @@ -0,0 +1,12 @@ +/*--- +desc: For loop with existing variable +---*/ + +function main(): void { + let i = 0; + let sum = 0; + for (i = 1; i < 4; i++) { + sum += i; + } + assert sum == 6; +} \ No newline at end of file diff --git a/migrator/test/staticTS/CTS/08.statements/07.for_statement/for_new.ets b/migrator/test/staticTS/CTS/08.statements/07.for_statement/for_new.ets new file mode 100644 index 0000000000000000000000000000000000000000..38937439a61076cbf63ccaf0ba09e0d9899d90da --- /dev/null +++ b/migrator/test/staticTS/CTS/08.statements/07.for_statement/for_new.ets @@ -0,0 +1,11 @@ +/*--- +desc: For loop with new variable +---*/ + +function main(): void { + let sum = 0; + for (let i: int = 1; i < 4; i++) { + sum += i; + } + assert sum == 6; +} \ No newline at end of file diff --git a/migrator/test/staticTS/CTS/08.statements/07.for_statement/for_new_implicit.ets b/migrator/test/staticTS/CTS/08.statements/07.for_statement/for_new_implicit.ets new file mode 100644 index 0000000000000000000000000000000000000000..cec77c012651d128d09a8bb187b9dd253992c01d --- /dev/null +++ b/migrator/test/staticTS/CTS/08.statements/07.for_statement/for_new_implicit.ets @@ -0,0 +1,11 @@ +/*--- +desc: For loop with new variable (implicit type) +---*/ + +function main(): void { + let sum = 0; + for (let i = 1; i < 4; i++) { + sum += i; + } + assert sum == 6; +} \ No newline at end of file diff --git a/migrator/test/staticTS/CTS/08.statements/08.for_of_statement/for_of_new.ets b/migrator/test/staticTS/CTS/08.statements/08.for_of_statement/for_of_new.ets new file mode 100644 index 0000000000000000000000000000000000000000..b7958305cfd3e04a16b14f6df099639980ebeca9 --- /dev/null +++ b/migrator/test/staticTS/CTS/08.statements/08.for_of_statement/for_of_new.ets @@ -0,0 +1,12 @@ +/*--- +desc: For of loop with new variable +---*/ + +function main(): void { + let sum = 0; + let arr: int[] = [1,2,3]; + for (let i of arr) { + sum += i; + } + assert sum == 6; +} \ No newline at end of file diff --git a/migrator/test/staticTS/CTS/08.statements/08.for_of_statement/for_of_new_type.ets b/migrator/test/staticTS/CTS/08.statements/08.for_of_statement/for_of_new_type.ets new file mode 100644 index 0000000000000000000000000000000000000000..5e7291886f0c937e4eb0a434696eca6b370a5f02 --- /dev/null +++ b/migrator/test/staticTS/CTS/08.statements/08.for_of_statement/for_of_new_type.ets @@ -0,0 +1,12 @@ +/*--- +desc: For of loop with new typed variable +---*/ + +function main(): void { + let sum = 0; + let arr: int[] = [1,2,3]; + for (let i: int of arr) { + sum += i; + } + assert sum == 6; +} \ No newline at end of file diff --git a/migrator/test/staticTS/CTS/08.statements/09.break_statement/break.sts b/migrator/test/staticTS/CTS/08.statements/09.break_statement/break.ets similarity index 100% rename from migrator/test/staticTS/CTS/08.statements/09.break_statement/break.sts rename to migrator/test/staticTS/CTS/08.statements/09.break_statement/break.ets diff --git a/migrator/test/staticTS/CTS/08.statements/10.continue_statement/continue_while.sts b/migrator/test/staticTS/CTS/08.statements/10.continue_statement/continue_while.ets similarity index 100% rename from migrator/test/staticTS/CTS/08.statements/10.continue_statement/continue_while.sts rename to migrator/test/staticTS/CTS/08.statements/10.continue_statement/continue_while.ets diff --git a/migrator/test/staticTS/CTS/08.statements/11.return_statement/return.sts b/migrator/test/staticTS/CTS/08.statements/11.return_statement/return.ets similarity index 100% rename from migrator/test/staticTS/CTS/08.statements/11.return_statement/return.sts rename to migrator/test/staticTS/CTS/08.statements/11.return_statement/return.ets diff --git a/migrator/test/staticTS/CTS/08.statements/12.switch_statement/n.switch_duplicate.ets b/migrator/test/staticTS/CTS/08.statements/12.switch_statement/n.switch_duplicate.ets new file mode 100644 index 0000000000000000000000000000000000000000..6e79f09200456daf69813bbcc6d5c2d3a334682a --- /dev/null +++ b/migrator/test/staticTS/CTS/08.statements/12.switch_statement/n.switch_duplicate.ets @@ -0,0 +1,18 @@ +/*--- +desc: Switch statement, duplicate value +---*/ + +function f(i: int): void { + switch (i) { + case 0: assert i == 0; break; + case 0: assert i == 1; break; + case 0: assert i == 2; break; + default: assert false; + } +} + +function main(): void { + f(0); + f(1); + f(2); +} \ No newline at end of file diff --git a/migrator/test/staticTS/CTS/08.statements/12.switch_statement/switch.ets b/migrator/test/staticTS/CTS/08.statements/12.switch_statement/switch.ets new file mode 100644 index 0000000000000000000000000000000000000000..7126274d53db5b5a45af3ff265916b1d2a2a2b85 --- /dev/null +++ b/migrator/test/staticTS/CTS/08.statements/12.switch_statement/switch.ets @@ -0,0 +1,18 @@ +/*--- +desc: Switch statement +---*/ + +function f(i: int): void { + switch (i) { + case 0: assert i == 0; break; + case 1: assert i == 1; break; + case 2: assert i == 2; break; + default: assert false; + } +} + +function main(): void { + f(0); + f(1); + f(2); +} \ No newline at end of file diff --git a/migrator/test/staticTS/CTS/08.statements/12.switch_statement/switch_block.ets b/migrator/test/staticTS/CTS/08.statements/12.switch_statement/switch_block.ets new file mode 100644 index 0000000000000000000000000000000000000000..74aab7972f5c0c8ba891da1acffac507fcf32db6 --- /dev/null +++ b/migrator/test/staticTS/CTS/08.statements/12.switch_statement/switch_block.ets @@ -0,0 +1,18 @@ +/*--- +desc: Switch statement with block +---*/ + +function f(i: int): void { + switch (i) { + case 0: { assert i == 0; } + case 1: { assert i == 1; } + case 2: { assert i == 2; } + default: { assert false; } + } +} + +function main(): void { + f(0); + f(1); + f(2); +} \ No newline at end of file diff --git a/migrator/test/staticTS/CTS/08.statements/12.switch_statement/switch_char.ets b/migrator/test/staticTS/CTS/08.statements/12.switch_statement/switch_char.ets new file mode 100644 index 0000000000000000000000000000000000000000..d4b484af4f22159404a2429503fed03c422569a6 --- /dev/null +++ b/migrator/test/staticTS/CTS/08.statements/12.switch_statement/switch_char.ets @@ -0,0 +1,18 @@ +/*--- +desc: Switch statement with char +---*/ + +function f(i: char): void { + switch (i) { + case '0': { assert i == '0'; } + case '1': { assert i == '1'; } + case '2': { assert i == '2'; } + default: { assert false; } + } +} + +function main(): void { + f('0'); + f('1'); + f('2'); +} \ No newline at end of file diff --git a/migrator/test/staticTS/CTS/08.statements/12.switch_statement/switch_enum.ets b/migrator/test/staticTS/CTS/08.statements/12.switch_statement/switch_enum.ets new file mode 100644 index 0000000000000000000000000000000000000000..d980c4fe43fc5a5ed4732a470fda5bb1a5c65839 --- /dev/null +++ b/migrator/test/staticTS/CTS/08.statements/12.switch_statement/switch_enum.ets @@ -0,0 +1,19 @@ +/*--- +desc: Switch statement with enum +---*/ + +enum Color { Red, Yellow, Green } + +function f(i: Color): void { + switch (i) { + case Red: assert i == Color.Red; break; + case Yellow: assert i == Color.Yellow; break; + case Green: assert i == Color.Green; break; + } +} + +function main(): void { + f(Color.Red); + f(Color.Yellow); + f(Color.Green); +} \ No newline at end of file diff --git a/migrator/test/staticTS/CTS/08.statements/13.assert_statement/assert.sts b/migrator/test/staticTS/CTS/08.statements/13.assert_statement/assert.ets similarity index 100% rename from migrator/test/staticTS/CTS/08.statements/13.assert_statement/assert.sts rename to migrator/test/staticTS/CTS/08.statements/13.assert_statement/assert.ets diff --git a/migrator/test/staticTS/CTS/08.statements/13.assert_statement/n.assert.sts b/migrator/test/staticTS/CTS/08.statements/13.assert_statement/ne.assert.ets similarity index 100% rename from migrator/test/staticTS/CTS/08.statements/13.assert_statement/n.assert.sts rename to migrator/test/staticTS/CTS/08.statements/13.assert_statement/ne.assert.ets diff --git a/migrator/test/staticTS/CTS/08.statements/13.assert_statement/n.assert_str.sts b/migrator/test/staticTS/CTS/08.statements/13.assert_statement/ne.assert_str.ets similarity index 100% rename from migrator/test/staticTS/CTS/08.statements/13.assert_statement/n.assert_str.sts rename to migrator/test/staticTS/CTS/08.statements/13.assert_statement/ne.assert_str.ets diff --git a/migrator/test/staticTS/CTS/08.statements/16.panic_statement/n.panic_statement.sts b/migrator/test/staticTS/CTS/08.statements/16.panic_statement/ne.panic_statement.ets similarity index 100% rename from migrator/test/staticTS/CTS/08.statements/16.panic_statement/n.panic_statement.sts rename to migrator/test/staticTS/CTS/08.statements/16.panic_statement/ne.panic_statement.ets diff --git a/migrator/test/staticTS/CTS/09.classes/01.class_declaration/01.class_modifiers/01.abstract_classes/abstract.ets b/migrator/test/staticTS/CTS/09.classes/01.class_declaration/01.class_modifiers/01.abstract_classes/abstract.ets new file mode 100644 index 0000000000000000000000000000000000000000..87c6a76260aaa21a20fe63b357973691fef87c2e --- /dev/null +++ b/migrator/test/staticTS/CTS/09.classes/01.class_declaration/01.class_modifiers/01.abstract_classes/abstract.ets @@ -0,0 +1,7 @@ +/*--- +desc: Abstract class +---*/ + +abstract class A {} + +function main(): void {} \ No newline at end of file diff --git a/migrator/test/staticTS/CTS/09.classes/01.class_declaration/01.class_modifiers/01.abstract_classes/abstract_method.ets b/migrator/test/staticTS/CTS/09.classes/01.class_declaration/01.class_modifiers/01.abstract_classes/abstract_method.ets new file mode 100644 index 0000000000000000000000000000000000000000..08454c20bcb204474d2f1e7f3a9b73ee1aec0cab --- /dev/null +++ b/migrator/test/staticTS/CTS/09.classes/01.class_declaration/01.class_modifiers/01.abstract_classes/abstract_method.ets @@ -0,0 +1,9 @@ +/*--- +desc: Abstract class with abstract method +---*/ + +abstract class A { + abstract m(): void; +} + +function main(): void {} \ No newline at end of file diff --git a/migrator/test/staticTS/CTS/09.classes/01.class_declaration/01.class_modifiers/01.abstract_classes/n.abstract_instantiate.ets b/migrator/test/staticTS/CTS/09.classes/01.class_declaration/01.class_modifiers/01.abstract_classes/n.abstract_instantiate.ets new file mode 100644 index 0000000000000000000000000000000000000000..8611e925d408254c68988ef7bbc4665855331d9d --- /dev/null +++ b/migrator/test/staticTS/CTS/09.classes/01.class_declaration/01.class_modifiers/01.abstract_classes/n.abstract_instantiate.ets @@ -0,0 +1,9 @@ +/*--- +desc: Abstract class instantiation +---*/ + +abstract class A {} + +function main(): void { + let a = new A(); +} \ No newline at end of file diff --git a/migrator/test/staticTS/CTS/09.classes/01.class_declaration/01.class_modifiers/01.abstract_classes/n.abstract_method.ets b/migrator/test/staticTS/CTS/09.classes/01.class_declaration/01.class_modifiers/01.abstract_classes/n.abstract_method.ets new file mode 100644 index 0000000000000000000000000000000000000000..46e5bf3b0c5af61f6a39429a128e56bcb861b83e --- /dev/null +++ b/migrator/test/staticTS/CTS/09.classes/01.class_declaration/01.class_modifiers/01.abstract_classes/n.abstract_method.ets @@ -0,0 +1,9 @@ +/*--- +desc: Non-abstract class with abstract method +---*/ + +class A { + abstract m(): void; +} + +function main(): void {} \ No newline at end of file diff --git a/migrator/test/staticTS/CTS/09.classes/01.class_declaration/01.class_modifiers/01.abstract_classes/n.abstract_open.ets b/migrator/test/staticTS/CTS/09.classes/01.class_declaration/01.class_modifiers/01.abstract_classes/n.abstract_open.ets new file mode 100644 index 0000000000000000000000000000000000000000..331aab3c49299c7f058b1c398955b910438d022d --- /dev/null +++ b/migrator/test/staticTS/CTS/09.classes/01.class_declaration/01.class_modifiers/01.abstract_classes/n.abstract_open.ets @@ -0,0 +1,8 @@ +/*--- +desc: Class can't be both abstract and open +---*/ + +abstract open class A {} +open abstract class B {} + +function main(): void {} \ No newline at end of file diff --git a/migrator/test/staticTS/CTS/09.classes/01.class_declaration/01.class_modifiers/02.open_classes/n.open_class.ets b/migrator/test/staticTS/CTS/09.classes/01.class_declaration/01.class_modifiers/02.open_classes/n.open_class.ets new file mode 100644 index 0000000000000000000000000000000000000000..f9d6784f302d86b65408306543ef1804196759df --- /dev/null +++ b/migrator/test/staticTS/CTS/09.classes/01.class_declaration/01.class_modifiers/02.open_classes/n.open_class.ets @@ -0,0 +1,9 @@ +/*--- +desc: Open class can be subclassed +---*/ + +class A{} + +class B extends A{} + +function main(): void {} \ No newline at end of file diff --git a/migrator/test/staticTS/CTS/09.classes/01.class_declaration/01.class_modifiers/02.open_classes/open_class.ets b/migrator/test/staticTS/CTS/09.classes/01.class_declaration/01.class_modifiers/02.open_classes/open_class.ets new file mode 100644 index 0000000000000000000000000000000000000000..a361a56d906540f0fb4ea1a99b8680a52dc17eb6 --- /dev/null +++ b/migrator/test/staticTS/CTS/09.classes/01.class_declaration/01.class_modifiers/02.open_classes/open_class.ets @@ -0,0 +1,9 @@ +/*--- +desc: Open class can be subclassed +---*/ + +open class A{} + +class B extends A{} + +function main(): void {} \ No newline at end of file diff --git a/migrator/test/staticTS/CTS/09.classes/01.class_declaration/04.class_body/class_members.ets b/migrator/test/staticTS/CTS/09.classes/01.class_declaration/04.class_body/class_members.ets new file mode 100644 index 0000000000000000000000000000000000000000..4b8d4f4b3484ee5d90c6b8cb6f89815ef2e36ee7 --- /dev/null +++ b/migrator/test/staticTS/CTS/09.classes/01.class_declaration/04.class_body/class_members.ets @@ -0,0 +1,11 @@ +{% for cm in class_members %} +/*--- +desc: Class members +---*/ + +class A { + {{.cm}} +} + +function main(): void {} +{% endfor %} \ No newline at end of file diff --git a/migrator/test/staticTS/CTS/09.classes/01.class_declaration/04.class_body/list.class_members.yaml b/migrator/test/staticTS/CTS/09.classes/01.class_declaration/04.class_body/list.class_members.yaml new file mode 100644 index 0000000000000000000000000000000000000000..69974389b0b214c7c6eaff68b49dfa50aa43bdbf --- /dev/null +++ b/migrator/test/staticTS/CTS/09.classes/01.class_declaration/04.class_body/list.class_members.yaml @@ -0,0 +1,7 @@ +--- # List of valid class members + +- "f: int;" +- "m(): void {}" +- "class B{}" +- "interface I{}" +- "enum E{V1, V2}" diff --git a/migrator/test/staticTS/CTS/09.classes/01.class_declaration/04.class_body/n.class_members.ets b/migrator/test/staticTS/CTS/09.classes/01.class_declaration/04.class_body/n.class_members.ets new file mode 100644 index 0000000000000000000000000000000000000000..9b3746d48225a21dac7d6b54b749858622a418ae --- /dev/null +++ b/migrator/test/staticTS/CTS/09.classes/01.class_declaration/04.class_body/n.class_members.ets @@ -0,0 +1,12 @@ +{% for cm in class_members %} +/*--- +desc: Class members appears twice +---*/ + +class A { + {{.cm}} + {{.cm}} +} + +function main(): void {} +{% endfor %} \ No newline at end of file diff --git a/migrator/test/staticTS/CTS/09.classes/01.class_declaration/point.ets b/migrator/test/staticTS/CTS/09.classes/01.class_declaration/point.ets new file mode 100644 index 0000000000000000000000000000000000000000..51bea8e6cf644ad544bcb9ec5a33b9260f70675c --- /dev/null +++ b/migrator/test/staticTS/CTS/09.classes/01.class_declaration/point.ets @@ -0,0 +1,14 @@ +/*--- +desc: Point class from documentation +---*/ + +import std.math; + +class Point { + public x: double; + public y: double; + public length(): double { + return math.sqrt(this.x * this.x + this.y * this.y); + } + static origin = new Point(0, 0); +} \ No newline at end of file diff --git a/migrator/test/staticTS/CTS/10.interfaces/01.interface_declarations/empty_interface_declaration.sts b/migrator/test/staticTS/CTS/10.interfaces/01.interface_declarations/empty_interface_declaration.ets similarity index 100% rename from migrator/test/staticTS/CTS/10.interfaces/01.interface_declarations/empty_interface_declaration.sts rename to migrator/test/staticTS/CTS/10.interfaces/01.interface_declarations/empty_interface_declaration.ets diff --git a/migrator/test/staticTS/CTS/10.interfaces/01.interface_declarations/empty_interface_declaration_with_type_params.sts b/migrator/test/staticTS/CTS/10.interfaces/01.interface_declarations/empty_interface_declaration_with_type_params.ets similarity index 100% rename from migrator/test/staticTS/CTS/10.interfaces/01.interface_declarations/empty_interface_declaration_with_type_params.sts rename to migrator/test/staticTS/CTS/10.interfaces/01.interface_declarations/empty_interface_declaration_with_type_params.ets diff --git a/migrator/test/staticTS/CTS/10.interfaces/01.interface_declarations/interface_fields.sts b/migrator/test/staticTS/CTS/10.interfaces/01.interface_declarations/interface_fields.ets similarity index 100% rename from migrator/test/staticTS/CTS/10.interfaces/01.interface_declarations/interface_fields.sts rename to migrator/test/staticTS/CTS/10.interfaces/01.interface_declarations/interface_fields.ets diff --git a/migrator/test/staticTS/CTS/10.interfaces/01.interface_declarations/interface_fields_without_types.sts b/migrator/test/staticTS/CTS/10.interfaces/01.interface_declarations/interface_fields_without_types.ets similarity index 100% rename from migrator/test/staticTS/CTS/10.interfaces/01.interface_declarations/interface_fields_without_types.sts rename to migrator/test/staticTS/CTS/10.interfaces/01.interface_declarations/interface_fields_without_types.ets diff --git a/migrator/test/staticTS/CTS/10.interfaces/01.interface_declarations/list.default_value.yaml b/migrator/test/staticTS/CTS/10.interfaces/01.interface_declarations/list.default_value.yaml index 9ffc292f9149ff299af735ba7f392e8bbb9bbce6..7b2339b3d3b3c2859b00fae568a102244d38e1be 100644 --- a/migrator/test/staticTS/CTS/10.interfaces/01.interface_declarations/list.default_value.yaml +++ b/migrator/test/staticTS/CTS/10.interfaces/01.interface_declarations/list.default_value.yaml @@ -7,4 +7,4 @@ - {type: float, value: 0.0} - {type: double, value: 0.0} - {type: char, value: '\u0000'} -- {type: boolean, value: false} +- {type: boolean, value: "false"} diff --git a/migrator/test/staticTS/CTS/10.interfaces/01.interface_declarations/n.interface_extends_without_type.sts b/migrator/test/staticTS/CTS/10.interfaces/01.interface_declarations/n.interface_extends_without_type.ets similarity index 100% rename from migrator/test/staticTS/CTS/10.interfaces/01.interface_declarations/n.interface_extends_without_type.sts rename to migrator/test/staticTS/CTS/10.interfaces/01.interface_declarations/n.interface_extends_without_type.ets diff --git a/migrator/test/staticTS/CTS/10.interfaces/01.interface_declarations/several_interface_fields.sts b/migrator/test/staticTS/CTS/10.interfaces/01.interface_declarations/several_interface_fields.ets similarity index 100% rename from migrator/test/staticTS/CTS/10.interfaces/01.interface_declarations/several_interface_fields.sts rename to migrator/test/staticTS/CTS/10.interfaces/01.interface_declarations/several_interface_fields.ets diff --git a/migrator/test/staticTS/CTS/10.interfaces/05.interface_field_declarations/interface_field_decl.sts b/migrator/test/staticTS/CTS/10.interfaces/05.interface_field_declarations/interface_field_decl.ets similarity index 100% rename from migrator/test/staticTS/CTS/10.interfaces/05.interface_field_declarations/interface_field_decl.sts rename to migrator/test/staticTS/CTS/10.interfaces/05.interface_field_declarations/interface_field_decl.ets diff --git a/migrator/test/staticTS/CTS/10.interfaces/06.interface_method_declaration/01.static_interface_methods/n.static_interface_methods.sts b/migrator/test/staticTS/CTS/10.interfaces/06.interface_method_declaration/01.static_interface_methods/n.static_interface_methods.ets similarity index 100% rename from migrator/test/staticTS/CTS/10.interfaces/06.interface_method_declaration/01.static_interface_methods/n.static_interface_methods.sts rename to migrator/test/staticTS/CTS/10.interfaces/06.interface_method_declaration/01.static_interface_methods/n.static_interface_methods.ets diff --git a/migrator/test/staticTS/CTS/10.interfaces/06.interface_method_declaration/01.static_interface_methods/static_interface_methods.sts b/migrator/test/staticTS/CTS/10.interfaces/06.interface_method_declaration/01.static_interface_methods/static_interface_methods.ets similarity index 100% rename from migrator/test/staticTS/CTS/10.interfaces/06.interface_method_declaration/01.static_interface_methods/static_interface_methods.sts rename to migrator/test/staticTS/CTS/10.interfaces/06.interface_method_declaration/01.static_interface_methods/static_interface_methods.ets diff --git a/migrator/test/staticTS/CTS/10.interfaces/06.interface_method_declaration/02.private_interface_methods/n.private_interface_methods.sts b/migrator/test/staticTS/CTS/10.interfaces/06.interface_method_declaration/02.private_interface_methods/n.private_interface_methods.ets similarity index 100% rename from migrator/test/staticTS/CTS/10.interfaces/06.interface_method_declaration/02.private_interface_methods/n.private_interface_methods.sts rename to migrator/test/staticTS/CTS/10.interfaces/06.interface_method_declaration/02.private_interface_methods/n.private_interface_methods.ets diff --git a/migrator/test/staticTS/CTS/10.interfaces/06.interface_method_declaration/02.private_interface_methods/n.private_interface_methods_static.sts b/migrator/test/staticTS/CTS/10.interfaces/06.interface_method_declaration/02.private_interface_methods/n.private_interface_methods_static.ets similarity index 100% rename from migrator/test/staticTS/CTS/10.interfaces/06.interface_method_declaration/02.private_interface_methods/n.private_interface_methods_static.sts rename to migrator/test/staticTS/CTS/10.interfaces/06.interface_method_declaration/02.private_interface_methods/n.private_interface_methods_static.ets diff --git a/migrator/test/staticTS/CTS/10.interfaces/06.interface_method_declaration/02.private_interface_methods/private_interface_methods.sts b/migrator/test/staticTS/CTS/10.interfaces/06.interface_method_declaration/02.private_interface_methods/private_interface_methods.ets similarity index 100% rename from migrator/test/staticTS/CTS/10.interfaces/06.interface_method_declaration/02.private_interface_methods/private_interface_methods.sts rename to migrator/test/staticTS/CTS/10.interfaces/06.interface_method_declaration/02.private_interface_methods/private_interface_methods.ets diff --git a/migrator/test/staticTS/CTS/11.enums/01.enum_constants/any_number_of_constants.sts b/migrator/test/staticTS/CTS/11.enums/01.enum_constants/any_number_of_constants.ets similarity index 100% rename from migrator/test/staticTS/CTS/11.enums/01.enum_constants/any_number_of_constants.sts rename to migrator/test/staticTS/CTS/11.enums/01.enum_constants/any_number_of_constants.ets diff --git a/migrator/test/staticTS/CTS/11.enums/01.enum_constants/n.empty_enum.sts b/migrator/test/staticTS/CTS/11.enums/01.enum_constants/n.empty_enum.ets similarity index 100% rename from migrator/test/staticTS/CTS/11.enums/01.enum_constants/n.empty_enum.sts rename to migrator/test/staticTS/CTS/11.enums/01.enum_constants/n.empty_enum.ets diff --git a/migrator/test/staticTS/CTS/11.enums/01.enum_constants/n.repeating_constants.sts b/migrator/test/staticTS/CTS/11.enums/01.enum_constants/n.repeating_constants.ets similarity index 100% rename from migrator/test/staticTS/CTS/11.enums/01.enum_constants/n.repeating_constants.sts rename to migrator/test/staticTS/CTS/11.enums/01.enum_constants/n.repeating_constants.ets diff --git a/migrator/test/staticTS/CTS/11.enums/01.enum_constants/n.trailing_comma_enum.sts b/migrator/test/staticTS/CTS/11.enums/01.enum_constants/n.trailing_comma_enum.ets similarity index 100% rename from migrator/test/staticTS/CTS/11.enums/01.enum_constants/n.trailing_comma_enum.sts rename to migrator/test/staticTS/CTS/11.enums/01.enum_constants/n.trailing_comma_enum.ets diff --git a/migrator/test/staticTS/CTS/11.enums/01.enum_constants/simple_enum.sts b/migrator/test/staticTS/CTS/11.enums/01.enum_constants/simple_enum.ets similarity index 100% rename from migrator/test/staticTS/CTS/11.enums/01.enum_constants/simple_enum.sts rename to migrator/test/staticTS/CTS/11.enums/01.enum_constants/simple_enum.ets diff --git a/migrator/test/staticTS/CTS/11.enums/02.enum_type_methods/enum_type_methods_valueof.sts b/migrator/test/staticTS/CTS/11.enums/02.enum_type_methods/enum_type_methods_valueof.ets similarity index 100% rename from migrator/test/staticTS/CTS/11.enums/02.enum_type_methods/enum_type_methods_valueof.sts rename to migrator/test/staticTS/CTS/11.enums/02.enum_type_methods/enum_type_methods_valueof.ets diff --git a/migrator/test/staticTS/CTS/11.enums/02.enum_type_methods/enum_type_methods_values.sts b/migrator/test/staticTS/CTS/11.enums/02.enum_type_methods/enum_type_methods_values.ets similarity index 100% rename from migrator/test/staticTS/CTS/11.enums/02.enum_type_methods/enum_type_methods_values.sts rename to migrator/test/staticTS/CTS/11.enums/02.enum_type_methods/enum_type_methods_values.ets diff --git a/migrator/test/staticTS/CTS/11.enums/03.enum_constant_methods/enum_constant_ordinals.sts b/migrator/test/staticTS/CTS/11.enums/03.enum_constant_methods/enum_constant_ordinals.ets similarity index 100% rename from migrator/test/staticTS/CTS/11.enums/03.enum_constant_methods/enum_constant_ordinals.sts rename to migrator/test/staticTS/CTS/11.enums/03.enum_constant_methods/enum_constant_ordinals.ets diff --git a/migrator/test/staticTS/CTS/11.enums/03.enum_constant_methods/enum_constant_to_string.sts b/migrator/test/staticTS/CTS/11.enums/03.enum_constant_methods/enum_constant_to_string.ets similarity index 100% rename from migrator/test/staticTS/CTS/11.enums/03.enum_constant_methods/enum_constant_to_string.sts rename to migrator/test/staticTS/CTS/11.enums/03.enum_constant_methods/enum_constant_to_string.ets diff --git a/migrator/test/staticTS/CTS/13.packages/02.import_declarations/import.sts b/migrator/test/staticTS/CTS/13.packages/02.import_declarations/import.ets similarity index 100% rename from migrator/test/staticTS/CTS/13.packages/02.import_declarations/import.sts rename to migrator/test/staticTS/CTS/13.packages/02.import_declarations/import.ets diff --git a/migrator/test/staticTS/CTS/13.packages/02.import_declarations/import_as.sts b/migrator/test/staticTS/CTS/13.packages/02.import_declarations/import_as.ets similarity index 100% rename from migrator/test/staticTS/CTS/13.packages/02.import_declarations/import_as.sts rename to migrator/test/staticTS/CTS/13.packages/02.import_declarations/import_as.ets diff --git a/migrator/test/staticTS/CTS/13.packages/02.import_declarations/n.import_all_as.sts b/migrator/test/staticTS/CTS/13.packages/02.import_declarations/n.import_all_as.ets similarity index 100% rename from migrator/test/staticTS/CTS/13.packages/02.import_declarations/n.import_all_as.sts rename to migrator/test/staticTS/CTS/13.packages/02.import_declarations/n.import_all_as.ets diff --git a/migrator/test/staticTS/CTS/13.packages/05.export_declarations/export_declarations.sts b/migrator/test/staticTS/CTS/13.packages/05.export_declarations/export_declarations.ets similarity index 100% rename from migrator/test/staticTS/CTS/13.packages/05.export_declarations/export_declarations.sts rename to migrator/test/staticTS/CTS/13.packages/05.export_declarations/export_declarations.ets diff --git a/migrator/test/staticTS/CTS/13.packages/05.export_declarations/n.exported_grouped_declarations.sts b/migrator/test/staticTS/CTS/13.packages/05.export_declarations/n.exported_grouped_declarations.ets similarity index 100% rename from migrator/test/staticTS/CTS/13.packages/05.export_declarations/n.exported_grouped_declarations.sts rename to migrator/test/staticTS/CTS/13.packages/05.export_declarations/n.exported_grouped_declarations.ets diff --git a/migrator/test/staticTS/CTS/13.packages/06.program_entry_point/multiple_entrypoints.sts b/migrator/test/staticTS/CTS/13.packages/06.program_entry_point/multiple_entrypoints.ets similarity index 100% rename from migrator/test/staticTS/CTS/13.packages/06.program_entry_point/multiple_entrypoints.sts rename to migrator/test/staticTS/CTS/13.packages/06.program_entry_point/multiple_entrypoints.ets diff --git a/migrator/test/staticTS/formatChecker/run_tests.py b/migrator/test/staticTS/formatChecker/run_tests.py index de8286f20a225c201088f1a770f664f558409625..2eb69cb1c56fd19f82480811f66585caa6daecb2 100644 --- a/migrator/test/staticTS/formatChecker/run_tests.py +++ b/migrator/test/staticTS/formatChecker/run_tests.py @@ -18,7 +18,7 @@ from pathlib import Path from utils.file_structure import walk_test_subdirs from utils.metainformation import InvalidMetaException, find_all_metas from utils.exceptions import InvalidFileFormatException, InvalidFileStructureException -from utils.constants import JAR_EXTENSION, TEMPLATE_EXTENSION, NEGATIVE_PREFIX +from utils.constants import JAR_EXTENSION, TEMPLATE_EXTENSION, NEGATIVE_PREFIX, NEGATIVE_EXECUTION_PREFIX import subprocess import argparse import os.path as ospath @@ -82,7 +82,7 @@ class RunStats: self.passed.append(path) def test_should_pass(filepath: Path) -> bool: - return not filepath.name.startswith(NEGATIVE_PREFIX) + return not (filepath.name.startswith(NEGATIVE_PREFIX) or filepath.name.startswith(NEGATIVE_EXECUTION_PREFIX)) def run_test(filepath: Path, runnerpath: Path) -> bool: """ diff --git a/migrator/test/staticTS/formatChecker/utils/constants.py b/migrator/test/staticTS/formatChecker/utils/constants.py index 7d52e295a935e13f3d43ce87ace42fcec344019d..11e2f71d1d42bf0e631fd882e151c5589987a01c 100644 --- a/migrator/test/staticTS/formatChecker/utils/constants.py +++ b/migrator/test/staticTS/formatChecker/utils/constants.py @@ -15,6 +15,7 @@ JAR_EXTENSION = ".jar" # Prefixes LIST_PREFIX = "list." NEGATIVE_PREFIX = "n." +NEGATIVE_EXECUTION_PREFIX = "ne." SKIP_PREFIX = "tbd." # Jinja diff --git a/migrator/test/staticTS/formatChecker/utils/test_case.py b/migrator/test/staticTS/formatChecker/utils/test_case.py index c2e02b19a87d363330e652327fe2399363f8efe9..7cc02347ff98f8f57732b9e1b111a3d5f4e729ca 100644 --- a/migrator/test/staticTS/formatChecker/utils/test_case.py +++ b/migrator/test/staticTS/formatChecker/utils/test_case.py @@ -3,11 +3,11 @@ from pathlib import Path from re import template from typing import Tuple -from utils.constants import NEGATIVE_PREFIX, SKIP_PREFIX +from utils.constants import NEGATIVE_PREFIX, NEGATIVE_EXECUTION_PREFIX, SKIP_PREFIX def is_negative(path: Path) -> bool: - return path.name.startswith(NEGATIVE_PREFIX) + return path.name.startswith(NEGATIVE_PREFIX) or path.name.startswith(NEGATIVE_EXECUTION_PREFIX) def should_be_skipped(path: Path) -> bool: