diff --git a/extensions/default_unparsing_config.json b/extensions/default_unparsing_config.json index 933cf3df8..59a53fe38 100644 --- a/extensions/default_unparsing_config.json +++ b/extensions/default_unparsing_config.json @@ -73,6 +73,12 @@ ] } }, + "AccessToSubpDef": { + "node": { + "kind": "group", + "document": "recurse" + } + }, "AcceptStmt": { "node": { "kind": "group", @@ -325,18 +331,11 @@ ] }, { - "kind": "continuationLineIndent", - "contents": [ - { - "kind": "group", - "document": [ - { - "kind": "recurse_field", - "field": "f_type_def" - } - ] - } - ] + "kind": "group", + "document": { + "kind": "recurse_field", + "field": "f_type_def" + } } ] } @@ -380,22 +379,32 @@ }, "whitespace", { - "kind": "text", - "text": "(" - }, - { - "kind": "recurse_field", - "field": "f_indices" - }, - { - "kind": "text", - "text": ")" + "kind": "innerRoot", + "contents": [ + { + "kind": "text", + "text": "(" + }, + { + "kind": "align", + "width": " ", + "contents": { + "kind": "recurse_field", + "field": "f_indices" + } + }, + { + "kind": "text", + "text": ")" + } + ] }, "line", { "kind": "text", "text": "of" }, + "whitespace", { "kind": "recurse_field", "field": "f_component_type" @@ -1352,71 +1361,91 @@ { "kind": "group", "document": [ - { - "kind": "text", - "text": "type" - }, - "whitespace", - { - "kind": "recurse_field", - "field": "f_name" - }, - { - "kind": "continuationLineIndent", - "contents": { - "kind": "recurse_field", - "field": "f_discriminants" - } - }, - "line", - { - "kind": "text", - "text": "is" - } - ] - }, - { - "kind": "continuationLineIndent", - "contents": [ - "line", { "kind": "group", "document": [ + { + "kind": "text", + "text": "type" + }, + "whitespace", { "kind": "recurse_field", - "field": "f_type_def" + "field": "f_name" }, { "kind": "recurse_field", - "field": "f_aspects" + "field": "f_discriminants" + }, + { + "kind": "ifKind", + "field": "f_discriminants", + "default": "line", + "null": "whitespace", + "matchers": [] + }, + { + "kind": "text", + "text": "is" + } + ] + }, + { + "kind": "ifKind", + "field": "f_type_def", + "default": { + "kind": "continuationLineIndent", + "contents": [ + "line", + { + "kind": "recurse_field", + "field": "f_type_def" + } + ] + }, + "matchers": [ + { + "kind": "DerivedTypeDef", + "document": { + "kind": "recurse_field", + "field": "f_type_def" + } + }, + { + "kind": "RecordTypeDef", + "document": { + "kind": "recurse_field", + "field": "f_type_def" + } } ] } ] }, + { + "kind": "recurse_field", + "field": "f_aspects" + }, { "kind": "text", "text": ";" } ] - } - }, - "ConstrainedArrayIndices": { - "node": { - "kind": "align", - "width": " ", - "contents": { - "kind": "group", - "document": [ - { - "kind": "innerRoot", - "contents": { - "kind": "recurse_field", - "field": "f_list" - } - } - ] - } + }, + "fields": { + "f_discriminants": [ + { + "kind": "continuationLineIndent", + "contents": [ + "line", + "recurse" + ] + } + ], + "f_aspects": [ + "line", + "recurse" + ] } }, "ConstraintList": { @@ -1458,10 +1487,7 @@ "fields": { "f_range": [ "line", - { - "kind": "innerRoot", - "contents": "recurse" - } + "recurse" ] } }, @@ -1613,102 +1639,159 @@ ] }, "DerivedTypeDef": { - "node": { - "kind": "group", - "document": [ - { - "kind": "recurse_field", - "field": "f_has_abstract" - }, - { - "kind": "recurse_field", - "field": "f_has_limited" - }, - { - "kind": "recurse_field", - "field": "f_has_synchronized" - }, - { - "kind": "text", - "text": "new" - }, - { - "kind": "innerRoot", - "contents": { - "kind": "group", - "document": [ + "node": [ + { + "kind": "group", + "document": [ + { + "kind": "continuationLineIndent", + "contents": [ { - "kind": "recurse_field", - "field": "f_subtype_indication" + "kind": "group", + "document": [ + "softline", + { + "kind": "recurse_field", + "field": "f_has_abstract" + }, + { + "kind": "recurse_field", + "field": "f_has_limited" + }, + { + "kind": "recurse_field", + "field": "f_has_synchronized" + } + ] }, { - "kind": "recurse_field", - "field": "f_interfaces" + "kind": "group", + "document": [ + "line", + { + "kind": "text", + "text": "new" + }, + { + "kind": "innerRoot", + "contents": { + "kind": "group", + "document": [ + { + "kind": "recurse_field", + "field": "f_subtype_indication" + } + ] + } + }, + { + "kind": "recurse_field", + "field": "f_interfaces" + } + ] } ] } - }, + ], + "id": "derived_part" + }, + { + "kind": "recurse_field", + "field": "f_record_extension" + }, + { + "kind": "recurse_field", + "field": "f_has_with_private" + } + ], + "fields": { + "f_interfaces": [ + "line", { - "kind": "recurse_field", - "field": "f_record_extension" + "kind": "text", + "text": "and" }, + "whitespace", + "recurse" + ], + "f_record_extension": [ { - "kind": "recurse_field", - "field": "f_has_with_private" + "kind": "ifBreak", + "groupId": "derived_part", + "flatContents": [ + { + "kind": "group", + "document": [ + "line", + { + "kind": "text", + "text": "with" + } + ] + }, + "whitespace", + "recurse" + ], + "breakContents": [ + "hardlineWithoutBreakParent", + { + "kind": "text", + "text": "with" + }, + "whitespace", + "recurse" + ] } ] - }, - "fields": { - "f_interfaces": { - "kind": "ifEmpty", - "then": "recurse", - "else": { - "kind": "align", - "width": " ", - "contents": "recurse" - } - }, - "f_record_extension": { - "kind": "ifEmpty", - "then": "recurse", - "else": [ - "hardlineWithoutBreakParent", - "recurse" - ] - } } }, "DiscriminantSpec": { - "node": { - "kind": "group", - "document": [ - { - "kind": "group", - "document": [ - { - "kind": "group", - "document": { + "node": [ + { + "kind": "group", + "document": [ + { + "kind": "recurse_field", + "field": "f_ids" + }, + "whitespace" + ] + }, + { + "kind": "tableSeparator", + "text": ":" + }, + { + "kind": "group", + "document": [ + { + "kind": "continuationLineIndent", + "contents": [ + "line", + { "kind": "recurse_field", - "field": "f_ids" + "field": "f_type_expr" } - }, - "whitespace", - { - "kind": "text", - "text": ":" - }, - { - "kind": "continuationLineIndent", - "contents": [ - "line", - { - "kind": "recurse_field", - "field": "f_type_expr" - } - ] - } - ], - "id": "name_and_type" + ] + } + ], + "id": "spec_type" + }, + { + "kind": "recurse_field", + "field": "f_default_expr" + }, + { + "kind": "recurse_field", + "field": "f_aspects" + } + ], + "fields": { + "f_default_expr": [ + "whitespace", + { + "kind": "tableSeparator", + "text": ":=" }, { "kind": "ifBreak", @@ -1719,14 +1802,8 @@ "contents": { "kind": "group", "document": [ - { - "kind": "recurse_field", - "field": "f_default_expr" - }, - { - "kind": "recurse_field", - "field": "f_aspects" - } + "line", + "recurse" ] } } @@ -1736,38 +1813,23 @@ "contents": { "kind": "group", "document": [ - { - "kind": "recurse_field", - "field": "f_default_expr" - }, - { - "kind": "recurse_field", - "field": "f_aspects" - } + "line", + "recurse" ] } }, - "groupId": "name_and_type" + "groupId": "spec_type" } ] - }, - "fields": { - "f_default_expr": [ - "whitespace", - { - "kind": "text", - "text": ":=" - }, - "line", - "recurse" - ] } }, "DiscriminantSpecList": { - "sep": [ - "recurse", - "line" - ] + "table": { + "split": [ + "empty_line" + ], + "must_break": true + } }, "DottedName": { "node": { @@ -3503,13 +3565,22 @@ "field": "f_interfaces" } ] + }, + "fields": { + "f_interfaces": [ + "line", + { + "kind": "text", + "text": "and" + }, + "recurse" + ] } }, "KnownDiscriminantPart": { "node": { "kind": "group", "document": [ - "line", { "kind": "text", "text": "(" @@ -4400,13 +4471,10 @@ } }, "ParentList": { - "node": { - "kind": "group", - "document": [ - "hardline", - "recurse" - ] - } + "sep": [ + "line", + "recurse" + ] }, "PragmaArgumentAssoc": { "node": { @@ -4667,6 +4735,7 @@ "kind": "text", "text": "protected" }, + "whitespace", { "kind": "text", "text": "type" @@ -4677,12 +4746,20 @@ "field": "f_name" }, { - "kind": "recurse_field", - "field": "f_discriminants" - }, - { - "kind": "recurse_field", - "field": "f_aspects" + "kind": "continuationLineIndent", + "contents": [ + { + "kind": "group", + "document": { + "kind": "recurse_field", + "field": "f_discriminants" + } + }, + { + "kind": "recurse_field", + "field": "f_aspects" + } + ] }, "line", { @@ -4711,17 +4788,14 @@ ] }, "fields": { - "f_discriminants": { - "kind": "continuationLineIndent", - "contents": "recurse" - }, - "f_aspects": { - "kind": "continuationLineIndent", - "contents": [ - "hardline", - "recurse" - ] - } + "f_aspects": [ + "line", + "recurse" + ], + "f_discriminants": [ + "line", + "recurse" + ] } }, "QualExpr": { @@ -4868,61 +4942,56 @@ "node": { "kind": "group", "document": [ - "breakParent", { - "kind": "continuationLineIndent", - "contents": [ - { - "kind": "text", - "text": "record" - }, - { - "kind": "recurse_field", - "field": "f_components" - } - ] - }, - "hardlineWithoutBreakParent", - { - "kind": "group", - "document": [ - { - "kind": "text", - "text": "end" - }, - "whitespace", - { - "kind": "text", - "text": "record" - } - ] - } - ] - } - }, - "RecordTypeDef": { - "node": { - "kind": "group", - "document": [ - { - "kind": "recurse_field", - "field": "f_has_abstract" + "kind": "text", + "text": "record" }, { - "kind": "recurse_field", - "field": "f_has_tagged" + "kind": "indent", + "contents": { + "kind": "recurse_field", + "field": "f_components" + } }, + "hardline", { - "kind": "recurse_field", - "field": "f_has_limited" + "kind": "text", + "text": "end" }, + "whitespace", { - "kind": "recurse_field", - "field": "f_record_def" + "kind": "text", + "text": "record" } ] } }, + "RecordTypeDef": { + "node": [ + { + "kind": "group", + "document": [ + "line", + { + "kind": "recurse_field", + "field": "f_has_abstract" + }, + { + "kind": "recurse_field", + "field": "f_has_tagged" + }, + { + "kind": "recurse_field", + "field": "f_has_limited" + } + ] + }, + { + "kind": "recurse_field", + "field": "f_record_def" + } + ] + }, "RecordRepClause": { "node": { "kind": "group", @@ -5033,12 +5102,6 @@ ] } }, - "SignedIntTypeDef": { - "node": { - "kind": "recurse_field", - "field": "f_range" - } - }, "SingleProtectedDecl": { "node": { "kind": "group", @@ -5456,53 +5519,67 @@ } }, "TaskDef": { - "node": { - "kind": "group", - "document": [ - { - "kind": "text", - "text": "is" - }, - { - "kind": "recurse_field", - "field": "f_interfaces" - }, + "node": [ + { + "kind": "text", + "text": "is" + }, + { + "kind": "group", + "document": [ + { + "kind": "recurse_field", + "field": "f_interfaces" + }, + { + "kind": "group", + "document": [ + { + "kind": "indent", + "contents": [ + { + "kind": "recurse_field", + "field": "f_public_part" + } + ] + }, + "hardlineWithoutBreakParent", + { + "kind": "recurse_field", + "field": "f_private_part" + }, + { + "kind": "text", + "text": "end" + }, + { + "kind": "recurse_field", + "field": "f_end_name" + } + ] + } + ] + } + ], + "fields": { + "f_interfaces": [ { - "kind": "indent", + "kind": "continuationLineIndent", "contents": [ + "line", { - "kind": "recurse_field", - "field": "f_public_part" - } + "kind": "text", + "text": "new" + }, + "recurse" ] }, - "hardline", - { - "kind": "recurse_field", - "field": "f_private_part" - }, + "line", { "kind": "text", - "text": "end" - }, - { - "kind": "recurse_field", - "field": "f_end_name" + "text": "with" } - ] - }, - "fields": { - "f_interfaces": { - "kind": "ifEmpty", - "then": "recurse", - "else": [ - { - "kind": "indent", - "contents": "recurse" - }, - "hardline" - ] - }, + ], "f_private_part": { "kind": "ifEmpty", "then": "recurse", @@ -5535,34 +5612,48 @@ "kind": "group", "document": [ { - "kind": "text", - "text": "task" - }, - "whitespace", - { - "kind": "text", - "text": "type" - }, - "whitespace", - { - "kind": "recurse_field", - "field": "f_name" - }, - { - "kind": "recurse_field", - "field": "f_discriminants" + "kind": "group", + "document": [ + { + "kind": "text", + "text": "task" + }, + "whitespace", + { + "kind": "text", + "text": "type" + }, + "whitespace", + { + "kind": "recurse_field", + "field": "f_name" + }, + { + "kind": "continuationLineIndent", + "contents": [ + { + "kind": "recurse_field", + "field": "f_discriminants" + }, + { + "kind": "recurse_field", + "field": "f_aspects" + } + ] + }, + { + "kind": "ifBreak", + "flatContents": "line", + "breakContents": "hardlineWithoutBreakParent" + } + ] }, { "kind": "recurse_field", - "field": "f_aspects" + "field": "f_definition" } ] }, - "line", - { - "kind": "recurse_field", - "field": "f_definition" - }, { "kind": "text", "text": ";" @@ -5570,21 +5661,14 @@ ] }, "fields": { - "f_discriminants": { - "kind": "continuationLineIndent", - "contents": "recurse" - }, - "f_aspects": { - "kind": "ifEmpty", - "then": "recurse", - "else": { - "kind": "continuationLineIndent", - "contents": [ - "hardlineWithoutBreakParent", - "recurse" - ] - } - } + "f_discriminants": [ + "line", + "recurse" + ], + "f_aspects": [ + "line", + "recurse" + ] } }, "TypeAccessDef": { @@ -5614,24 +5698,6 @@ ] } }, - "UnconstrainedArrayIndices": { - "node": { - "kind": "align", - "width": " ", - "contents": { - "kind": "group", - "document": [ - { - "kind": "innerRoot", - "contents": { - "kind": "recurse_field", - "field": "f_types" - } - } - ] - } - } - }, "UnconstrainedArrayIndexList": { "sep": [ "recurse", diff --git a/testsuite/tests/unparsing/anonymous_type_decl/array_type/long_element_type/test.out b/testsuite/tests/unparsing/anonymous_type_decl/array_type/long_element_type/test.out index 5b736c099..81b268534 100644 --- a/testsuite/tests/unparsing/anonymous_type_decl/array_type/long_element_type/test.out +++ b/testsuite/tests/unparsing/anonymous_type_decl/array_type/long_element_type/test.out @@ -1,2 +1,2 @@ array (Buffer_Index) - of Veeeeeeeeeeeeeeery_Looooooooooooonnnnnnnnnnnng_Element_Type +of Veeeeeeeeeeeeeeery_Looooooooooooonnnnnnnnnnnng_Element_Type diff --git a/testsuite/tests/unparsing/anonymous_type_decl/array_type/long_element_type/test.yaml b/testsuite/tests/unparsing/anonymous_type_decl/array_type/long_element_type/test.yaml index 7eb90196b..c5f976729 100644 --- a/testsuite/tests/unparsing/anonymous_type_decl/array_type/long_element_type/test.yaml +++ b/testsuite/tests/unparsing/anonymous_type_decl/array_type/long_element_type/test.yaml @@ -1,7 +1,7 @@ description: | This test checks the formatting of an anonymous array type declaration. It is expected the declaration breaks before `of` keywords and the new - line be indented. - + line to have the same indentation as the `array` keyword. + driver: unparser rule: anonymous_type_decl diff --git a/testsuite/tests/unparsing/anonymous_type_decl/array_type/long_index/test.out b/testsuite/tests/unparsing/anonymous_type_decl/array_type/long_index/test.out index d3892322a..b3b422415 100644 --- a/testsuite/tests/unparsing/anonymous_type_decl/array_type/long_index/test.out +++ b/testsuite/tests/unparsing/anonymous_type_decl/array_type/long_index/test.out @@ -1,2 +1,2 @@ array (Veeeeeeeerrrrrrry_Loooooooooooooooooooooooooooooong_Buffer_Indexxxxxxxx) - of Character +of Character diff --git a/testsuite/tests/unparsing/anonymous_type_decl/array_type/long_index/test.yaml b/testsuite/tests/unparsing/anonymous_type_decl/array_type/long_index/test.yaml index 7eb90196b..c60190d1d 100644 --- a/testsuite/tests/unparsing/anonymous_type_decl/array_type/long_index/test.yaml +++ b/testsuite/tests/unparsing/anonymous_type_decl/array_type/long_index/test.yaml @@ -2,6 +2,6 @@ description: | This test checks the formatting of an anonymous array type declaration. It is expected the declaration breaks before `of` keywords and the new line be indented. - + driver: unparser rule: anonymous_type_decl diff --git a/testsuite/tests/unparsing/anonymous_type_decl/array_type/long_indices/input.ada b/testsuite/tests/unparsing/anonymous_type_decl/array_type/long_indices/input.ada new file mode 100644 index 000000000..104896171 --- /dev/null +++ b/testsuite/tests/unparsing/anonymous_type_decl/array_type/long_indices/input.ada @@ -0,0 +1 @@ +array (Buffer_Index_1, Buffer_Index_2, Buffer_Index_3, Buffer_Index_4, Buffer_Index_5) of Character.Long_Dotted_Name.Long_Dotted_Name.Long_Dotted_Name.Long_Dotted_Name diff --git a/testsuite/tests/unparsing/anonymous_type_decl/array_type/long_indices/test.out b/testsuite/tests/unparsing/anonymous_type_decl/array_type/long_indices/test.out new file mode 100644 index 000000000..fd1dd8f3a --- /dev/null +++ b/testsuite/tests/unparsing/anonymous_type_decl/array_type/long_indices/test.out @@ -0,0 +1,10 @@ +array (Buffer_Index_1, + Buffer_Index_2, + Buffer_Index_3, + Buffer_Index_4, + Buffer_Index_5) +of Character + .Long_Dotted_Name + .Long_Dotted_Name + .Long_Dotted_Name + .Long_Dotted_Name diff --git a/testsuite/tests/unparsing/anonymous_type_decl/array_type/long_indices/test.yaml b/testsuite/tests/unparsing/anonymous_type_decl/array_type/long_indices/test.yaml new file mode 100644 index 000000000..5196141bc --- /dev/null +++ b/testsuite/tests/unparsing/anonymous_type_decl/array_type/long_indices/test.yaml @@ -0,0 +1,10 @@ +description: | + This test checks the formatting of an anonymous array type declaration with + multiple indices. + It is expected the declaration breaks before `of` keywords and the new + line to have the same indentation as the `array` keyword. + Is is also expected that the indices have continuation line indentation + relative to where the `array` keyword ends. + +driver: unparser +rule: anonymous_type_decl diff --git a/testsuite/tests/unparsing/anonymous_type_decl/array_type/simple_decl/test.yaml b/testsuite/tests/unparsing/anonymous_type_decl/array_type/simple_decl/test.yaml index e9f84a8fe..95b843fed 100644 --- a/testsuite/tests/unparsing/anonymous_type_decl/array_type/simple_decl/test.yaml +++ b/testsuite/tests/unparsing/anonymous_type_decl/array_type/simple_decl/test.yaml @@ -1,6 +1,6 @@ description: | This test checks the formatting of an anonymous array type declaration. It is expected the declaration stays on a single line. - + driver: unparser rule: anonymous_type_decl diff --git a/testsuite/tests/unparsing/derived_type_def/derived_with_interface/test.out b/testsuite/tests/unparsing/derived_type_def/derived_with_interface/test.out deleted file mode 100644 index 67166f5f6..000000000 --- a/testsuite/tests/unparsing/derived_type_def/derived_with_interface/test.out +++ /dev/null @@ -1,4 +0,0 @@ -type Derived_Interface is - new Int1 and - Int2 with - null record; diff --git a/testsuite/tests/unparsing/derived_type_def/derived_with_interface_list_and_record_extension/test.out b/testsuite/tests/unparsing/derived_type_def/derived_with_interface_list_and_record_extension/test.out deleted file mode 100644 index 9e87cdc5c..000000000 --- a/testsuite/tests/unparsing/derived_type_def/derived_with_interface_list_and_record_extension/test.out +++ /dev/null @@ -1,7 +0,0 @@ -type Painted_Point is - new Poooooooooooooiiiiiiiiiint1 and - Poooooooooooooooooiiiiint2 and - Point3 with - record - Paint : Color := White; - end record; diff --git a/testsuite/tests/unparsing/derived_type_def/derived_with_record_extension/test.out b/testsuite/tests/unparsing/derived_type_def/derived_with_record_extension/test.out deleted file mode 100644 index 90f9ad964..000000000 --- a/testsuite/tests/unparsing/derived_type_def/derived_with_record_extension/test.out +++ /dev/null @@ -1,5 +0,0 @@ -type Painted_Point is - new Poooooooooooooiiiiiiiiiint1 with - record - Paint : Color := White; - end record; diff --git a/testsuite/tests/unparsing/interface_type_def/base_type/test.out b/testsuite/tests/unparsing/interface_type_def/base_type/test.out deleted file mode 100644 index 8df35ddc2..000000000 --- a/testsuite/tests/unparsing/interface_type_def/base_type/test.out +++ /dev/null @@ -1,4 +0,0 @@ -type Base_Type is - interface and - Interface_1 and - Interface_2; diff --git a/testsuite/tests/unparsing/interface_type_def/synchro_and_interface_list/test.out b/testsuite/tests/unparsing/interface_type_def/synchro_and_interface_list/test.out deleted file mode 100644 index e4a1d2b0d..000000000 --- a/testsuite/tests/unparsing/interface_type_def/synchro_and_interface_list/test.out +++ /dev/null @@ -1,4 +0,0 @@ -type Combo_Sync_Interface is - synchronized interface and - My_Interface_1 and - My_Interface_2; diff --git a/testsuite/tests/unparsing/protected_type_decl/with_aspects/test.out b/testsuite/tests/unparsing/protected_type_decl/with_aspects/test.out index cdfdf70ab..fcb411420 100644 --- a/testsuite/tests/unparsing/protected_type_decl/with_aspects/test.out +++ b/testsuite/tests/unparsing/protected_type_decl/with_aspects/test.out @@ -1,5 +1,6 @@ protected type Worker - (Priority_Level : System.Priority; Buffer_Parameter : access Buffer) + (Priority_Level : System.Priority; + Buffer_Parameter : access Buffer) with Priority => Prio is entry Fill; diff --git a/testsuite/tests/unparsing/protected_type_decl/with_known_discriminant/test.out b/testsuite/tests/unparsing/protected_type_decl/with_known_discriminant/test.out index 0a1a38132..0ab4d040f 100644 --- a/testsuite/tests/unparsing/protected_type_decl/with_known_discriminant/test.out +++ b/testsuite/tests/unparsing/protected_type_decl/with_known_discriminant/test.out @@ -1,6 +1,6 @@ protected type Buffer (Nb_Elements_In_Buffer : Integer := 100; - Need_To_Activate_All : Boolean := False) + Need_To_Activate_All : Boolean := False) is procedure Activate; procedure Release; diff --git a/testsuite/tests/unparsing/record_type_def/record_mixed_with_variant/test.out b/testsuite/tests/unparsing/record_type_def/record_mixed_with_variant/test.out deleted file mode 100644 index 34696bc33..000000000 --- a/testsuite/tests/unparsing/record_type_def/record_mixed_with_variant/test.out +++ /dev/null @@ -1,13 +0,0 @@ -type Expr (Kind : Expr_Kind_Type) is - record - - Count : Integer; - - case Kind is - when Bin_Op_A | Bin_Op_B => - L, R : Expr_Access; - - when Num => - Val : Integer; - end case; - end record; diff --git a/testsuite/tests/unparsing/record_type_def/record_with_component_default_expr/test.out b/testsuite/tests/unparsing/record_type_def/record_with_component_default_expr/test.out deleted file mode 100644 index 75e96b81b..000000000 --- a/testsuite/tests/unparsing/record_type_def/record_with_component_default_expr/test.out +++ /dev/null @@ -1,6 +0,0 @@ -type Date is - record - A : Integer range 1 .. 31 := 15; - B : Real := 0.15; - C : String := "my_str"; - end record; diff --git a/testsuite/tests/unparsing/record_type_def/record_with_discriminants/test.out b/testsuite/tests/unparsing/record_type_def/record_with_discriminants/test.out deleted file mode 100644 index 204b6cbf8..000000000 --- a/testsuite/tests/unparsing/record_type_def/record_with_discriminants/test.out +++ /dev/null @@ -1,4 +0,0 @@ -type Point (X, Y : Natural := 0) is - record - A, B : Real; - end record; diff --git a/testsuite/tests/unparsing/record_type_def/record_with_discriminants_null_component/test.out b/testsuite/tests/unparsing/record_type_def/record_with_discriminants_null_component/test.out deleted file mode 100644 index 4c8d676ad..000000000 --- a/testsuite/tests/unparsing/record_type_def/record_with_discriminants_null_component/test.out +++ /dev/null @@ -1,4 +0,0 @@ -type Point (X, Y : Natural := 0) is - record - null; - end record; diff --git a/testsuite/tests/unparsing/record_type_def/record_with_long_discriminants/input.ada b/testsuite/tests/unparsing/record_type_def/record_with_long_discriminants/input.ada deleted file mode 100644 index 90aee09e8..000000000 --- a/testsuite/tests/unparsing/record_type_def/record_with_long_discriminants/input.ada +++ /dev/null @@ -1,3 +0,0 @@ -type Point (Xxxxxxxxxxxxx,Yxxxxxxxxxxxxxxx : Natural := 0; Zzzzzzzzzzzzzzzzzzzzzzzzzz : Real := 0.0) is record - A,B : Real; -end record; diff --git a/testsuite/tests/unparsing/record_type_def/record_with_long_discriminants/test.out b/testsuite/tests/unparsing/record_type_def/record_with_long_discriminants/test.out deleted file mode 100644 index 23bc20718..000000000 --- a/testsuite/tests/unparsing/record_type_def/record_with_long_discriminants/test.out +++ /dev/null @@ -1,7 +0,0 @@ -type Point - (Xxxxxxxxxxxxx, Yxxxxxxxxxxxxxxx : Natural := 0; - Zzzzzzzzzzzzzzzzzzzzzzzzzz : Real := 0.0) -is - record - A, B : Real; - end record; diff --git a/testsuite/tests/unparsing/record_type_def/record_with_variant/input.ada b/testsuite/tests/unparsing/record_type_def/record_with_variant/input.ada deleted file mode 100644 index 7f3b6febf..000000000 --- a/testsuite/tests/unparsing/record_type_def/record_with_variant/input.ada +++ /dev/null @@ -1,9 +0,0 @@ -type Expr (Kind : Expr_Kind_Type) is record - - case Kind is - when Bin_Op_A | Bin_Op_B => - L, R : Expr_Access; - when Num => - Val : Integer; - end case; -end record; diff --git a/testsuite/tests/unparsing/record_type_def/record_with_variant/test.out b/testsuite/tests/unparsing/record_type_def/record_with_variant/test.out deleted file mode 100644 index 5d946c55d..000000000 --- a/testsuite/tests/unparsing/record_type_def/record_with_variant/test.out +++ /dev/null @@ -1,11 +0,0 @@ -type Expr (Kind : Expr_Kind_Type) is - record - - case Kind is - when Bin_Op_A | Bin_Op_B => - L, R : Expr_Access; - - when Num => - Val : Integer; - end case; - end record; diff --git a/testsuite/tests/unparsing/record_type_def/simple_record/test.out b/testsuite/tests/unparsing/record_type_def/simple_record/test.out deleted file mode 100644 index 82744165c..000000000 --- a/testsuite/tests/unparsing/record_type_def/simple_record/test.out +++ /dev/null @@ -1,6 +0,0 @@ -type Date is - record - Day : Integer range 1 .. 31; - Month : Month_Enum; - Year : Integer range 0 .. 4000; - end record; diff --git a/testsuite/tests/unparsing/signed_int_type_def/long_range/input.ada b/testsuite/tests/unparsing/signed_int_type_def/long_range/input.ada deleted file mode 100644 index 92325e6e5..000000000 --- a/testsuite/tests/unparsing/signed_int_type_def/long_range/input.ada +++ /dev/null @@ -1 +0,0 @@ -type Some_Int_Num_Type is range lllllllllllllllloooooooooooooooooowwwwwwwwwwwwww .. hhhhhhhhhhhiiiiiiiiiiiiiiigggggggggggghhhhhhhhhhhhhh; \ No newline at end of file diff --git a/testsuite/tests/unparsing/task_type_decl/simple_task_type/test.out b/testsuite/tests/unparsing/task_type_decl/simple_task_type/test.out index 1c4ce0eb2..e8073cd2c 100644 --- a/testsuite/tests/unparsing/task_type_decl/simple_task_type/test.out +++ b/testsuite/tests/unparsing/task_type_decl/simple_task_type/test.out @@ -1,5 +1,4 @@ -task type Server -is +task type Server is entry Next_Work_Item (WI : in Work_Item); entry Shut_Down; end Server; diff --git a/testsuite/tests/unparsing/task_type_decl/with_aspects/input.ada b/testsuite/tests/unparsing/task_type_decl/with_aspects/input.ada new file mode 100644 index 000000000..af47decae --- /dev/null +++ b/testsuite/tests/unparsing/task_type_decl/with_aspects/input.ada @@ -0,0 +1,5 @@ +task type Worker(Priority_Level : System.Priority; Buffer_Parameter : access Buffer) + with Priority => Prio is + entry Fill; + entry Drain; +end Worker; diff --git a/testsuite/tests/unparsing/task_type_decl/with_aspects/test.out b/testsuite/tests/unparsing/task_type_decl/with_aspects/test.out new file mode 100644 index 000000000..0cb168efd --- /dev/null +++ b/testsuite/tests/unparsing/task_type_decl/with_aspects/test.out @@ -0,0 +1,8 @@ +task type Worker + (Priority_Level : System.Priority; + Buffer_Parameter : access Buffer) + with Priority => Prio +is + entry Fill; + entry Drain; +end Worker; diff --git a/testsuite/tests/unparsing/task_type_decl/with_aspects/test.yaml b/testsuite/tests/unparsing/task_type_decl/with_aspects/test.yaml new file mode 100644 index 000000000..0f1f7a6cc --- /dev/null +++ b/testsuite/tests/unparsing/task_type_decl/with_aspects/test.yaml @@ -0,0 +1,11 @@ +description: | + This test checks the formatting of a protected type declaration + with known discriminant, aspects and public. + It is expected the declaration breaks before the discriminant + specification, before `with` and `is` keywords and be formatted + by indenting the discriminant specification, the aspects and the + public part content and keeping the `protected`, `is` and `end` + keywords aligned. + +driver: unparser +rule: task_type_decl diff --git a/testsuite/tests/unparsing/task_type_decl/with_known_discriminant/input.ada b/testsuite/tests/unparsing/task_type_decl/with_known_discriminant/input.ada index c205b35c6..736476bfc 100644 --- a/testsuite/tests/unparsing/task_type_decl/with_known_discriminant/input.ada +++ b/testsuite/tests/unparsing/task_type_decl/with_known_discriminant/input.ada @@ -1,5 +1,4 @@ -task type Keyboard_Driver(ID : Keyboard_ID := New_ID) is - new Serial_Device with +task type Keyboard_Driver (ID : Keyboard_ID := New_ID) is new Serial_Device with entry Read (C : out Character); entry Write(C : in Character); end Keyboard_Driver; diff --git a/testsuite/tests/unparsing/task_type_decl/with_known_discriminant/test.out b/testsuite/tests/unparsing/task_type_decl/with_known_discriminant/test.out index 7b8f932c0..560c1857b 100644 --- a/testsuite/tests/unparsing/task_type_decl/with_known_discriminant/test.out +++ b/testsuite/tests/unparsing/task_type_decl/with_known_discriminant/test.out @@ -1,6 +1,5 @@ -task type Keyboard_Driver (ID : Keyboard_ID := New_ID) -is new - Serial_Device +task type Keyboard_Driver (ID : Keyboard_ID := New_ID) is + new Serial_Device with entry Read (C : out Character); entry Write (C : in Character); diff --git a/testsuite/tests/unparsing/type_def/access_to_subp_def/input.ada b/testsuite/tests/unparsing/type_def/access_to_subp_def/input.ada new file mode 100644 index 000000000..3f7d6e779 --- /dev/null +++ b/testsuite/tests/unparsing/type_def/access_to_subp_def/input.ada @@ -0,0 +1,3 @@ +procedure Find_Matching_Parents + (Match_1 : access protected function (Node : Libadalang.Analysis.Ada_Node'Class) return Boolean; + Match_2 : not null access protected function (Node : Libadalang.Analysis.Ada_Node'Class) return Boolean); diff --git a/testsuite/tests/unparsing/type_def/access_to_subp_def/test.out b/testsuite/tests/unparsing/type_def/access_to_subp_def/test.out new file mode 100644 index 000000000..52268cf04 --- /dev/null +++ b/testsuite/tests/unparsing/type_def/access_to_subp_def/test.out @@ -0,0 +1,7 @@ +procedure Find_Matching_Parents + (Match_1 : + access protected function + (Node : Libadalang.Analysis.Ada_Node'Class) return Boolean; + Match_2 : + not null access protected function + (Node : Libadalang.Analysis.Ada_Node'Class) return Boolean); diff --git a/testsuite/tests/unparsing/type_def/access_to_subp_def/test.yaml b/testsuite/tests/unparsing/type_def/access_to_subp_def/test.yaml new file mode 100644 index 000000000..2e30d0bee --- /dev/null +++ b/testsuite/tests/unparsing/type_def/access_to_subp_def/test.yaml @@ -0,0 +1,6 @@ +driver: unparser +rule: subp_decl +description: | + Test that `f_has_not_null`, `f_has_protected` and `f_subp_spec` do not have + line breaks between them. Also test that `f_subp_spec` has its parameters + correctly indented. diff --git a/testsuite/tests/unparsing/array_type_def/constrained_array/constraint_list_as_range/input.ada b/testsuite/tests/unparsing/type_def/array_type_def/constrained_array/constraint_list_as_range/input.ada similarity index 100% rename from testsuite/tests/unparsing/array_type_def/constrained_array/constraint_list_as_range/input.ada rename to testsuite/tests/unparsing/type_def/array_type_def/constrained_array/constraint_list_as_range/input.ada diff --git a/testsuite/tests/unparsing/array_type_def/constrained_array/constraint_list_as_range/test.out b/testsuite/tests/unparsing/type_def/array_type_def/constrained_array/constraint_list_as_range/test.out similarity index 100% rename from testsuite/tests/unparsing/array_type_def/constrained_array/constraint_list_as_range/test.out rename to testsuite/tests/unparsing/type_def/array_type_def/constrained_array/constraint_list_as_range/test.out diff --git a/testsuite/tests/unparsing/array_type_def/constrained_array/constraint_list_as_range/test.yaml b/testsuite/tests/unparsing/type_def/array_type_def/constrained_array/constraint_list_as_range/test.yaml similarity index 100% rename from testsuite/tests/unparsing/array_type_def/constrained_array/constraint_list_as_range/test.yaml rename to testsuite/tests/unparsing/type_def/array_type_def/constrained_array/constraint_list_as_range/test.yaml diff --git a/testsuite/tests/unparsing/array_type_def/constrained_array/constraint_list_as_subtype_indication/input.ada b/testsuite/tests/unparsing/type_def/array_type_def/constrained_array/constraint_list_as_subtype_indication/input.ada similarity index 100% rename from testsuite/tests/unparsing/array_type_def/constrained_array/constraint_list_as_subtype_indication/input.ada rename to testsuite/tests/unparsing/type_def/array_type_def/constrained_array/constraint_list_as_subtype_indication/input.ada diff --git a/testsuite/tests/unparsing/array_type_def/constrained_array/constraint_list_as_subtype_indication/test.out b/testsuite/tests/unparsing/type_def/array_type_def/constrained_array/constraint_list_as_subtype_indication/test.out similarity index 100% rename from testsuite/tests/unparsing/array_type_def/constrained_array/constraint_list_as_subtype_indication/test.out rename to testsuite/tests/unparsing/type_def/array_type_def/constrained_array/constraint_list_as_subtype_indication/test.out diff --git a/testsuite/tests/unparsing/array_type_def/constrained_array/constraint_list_as_subtype_indication/test.yaml b/testsuite/tests/unparsing/type_def/array_type_def/constrained_array/constraint_list_as_subtype_indication/test.yaml similarity index 100% rename from testsuite/tests/unparsing/array_type_def/constrained_array/constraint_list_as_subtype_indication/test.yaml rename to testsuite/tests/unparsing/type_def/array_type_def/constrained_array/constraint_list_as_subtype_indication/test.yaml diff --git a/testsuite/tests/unparsing/array_type_def/constrained_array/long_component_type/input.ada b/testsuite/tests/unparsing/type_def/array_type_def/constrained_array/long_component_type/input.ada similarity index 100% rename from testsuite/tests/unparsing/array_type_def/constrained_array/long_component_type/input.ada rename to testsuite/tests/unparsing/type_def/array_type_def/constrained_array/long_component_type/input.ada diff --git a/testsuite/tests/unparsing/array_type_def/constrained_array/long_component_type/test.out b/testsuite/tests/unparsing/type_def/array_type_def/constrained_array/long_component_type/test.out similarity index 100% rename from testsuite/tests/unparsing/array_type_def/constrained_array/long_component_type/test.out rename to testsuite/tests/unparsing/type_def/array_type_def/constrained_array/long_component_type/test.out diff --git a/testsuite/tests/unparsing/array_type_def/constrained_array/long_component_type/test.yaml b/testsuite/tests/unparsing/type_def/array_type_def/constrained_array/long_component_type/test.yaml similarity index 100% rename from testsuite/tests/unparsing/array_type_def/constrained_array/long_component_type/test.yaml rename to testsuite/tests/unparsing/type_def/array_type_def/constrained_array/long_component_type/test.yaml diff --git a/testsuite/tests/unparsing/array_type_def/constrained_array/long_constraint_list/input.ada b/testsuite/tests/unparsing/type_def/array_type_def/constrained_array/long_constraint_list/input.ada similarity index 100% rename from testsuite/tests/unparsing/array_type_def/constrained_array/long_constraint_list/input.ada rename to testsuite/tests/unparsing/type_def/array_type_def/constrained_array/long_constraint_list/input.ada diff --git a/testsuite/tests/unparsing/array_type_def/constrained_array/long_constraint_list/test.out b/testsuite/tests/unparsing/type_def/array_type_def/constrained_array/long_constraint_list/test.out similarity index 100% rename from testsuite/tests/unparsing/array_type_def/constrained_array/long_constraint_list/test.out rename to testsuite/tests/unparsing/type_def/array_type_def/constrained_array/long_constraint_list/test.out diff --git a/testsuite/tests/unparsing/array_type_def/constrained_array/long_constraint_list/test.yaml b/testsuite/tests/unparsing/type_def/array_type_def/constrained_array/long_constraint_list/test.yaml similarity index 100% rename from testsuite/tests/unparsing/array_type_def/constrained_array/long_constraint_list/test.yaml rename to testsuite/tests/unparsing/type_def/array_type_def/constrained_array/long_constraint_list/test.yaml diff --git a/testsuite/tests/unparsing/array_type_def/constrained_array/long_type_name/input.ada b/testsuite/tests/unparsing/type_def/array_type_def/constrained_array/long_type_name/input.ada similarity index 100% rename from testsuite/tests/unparsing/array_type_def/constrained_array/long_type_name/input.ada rename to testsuite/tests/unparsing/type_def/array_type_def/constrained_array/long_type_name/input.ada diff --git a/testsuite/tests/unparsing/array_type_def/constrained_array/long_type_name/test.out b/testsuite/tests/unparsing/type_def/array_type_def/constrained_array/long_type_name/test.out similarity index 100% rename from testsuite/tests/unparsing/array_type_def/constrained_array/long_type_name/test.out rename to testsuite/tests/unparsing/type_def/array_type_def/constrained_array/long_type_name/test.out diff --git a/testsuite/tests/unparsing/array_type_def/constrained_array/long_type_name/test.yaml b/testsuite/tests/unparsing/type_def/array_type_def/constrained_array/long_type_name/test.yaml similarity index 100% rename from testsuite/tests/unparsing/array_type_def/constrained_array/long_type_name/test.yaml rename to testsuite/tests/unparsing/type_def/array_type_def/constrained_array/long_type_name/test.yaml diff --git a/testsuite/tests/unparsing/array_type_def/constrained_array/multidimensional_constraint/input.ada b/testsuite/tests/unparsing/type_def/array_type_def/constrained_array/multidimensional_constraint/input.ada similarity index 100% rename from testsuite/tests/unparsing/array_type_def/constrained_array/multidimensional_constraint/input.ada rename to testsuite/tests/unparsing/type_def/array_type_def/constrained_array/multidimensional_constraint/input.ada diff --git a/testsuite/tests/unparsing/array_type_def/constrained_array/multidimensional_constraint/test.out b/testsuite/tests/unparsing/type_def/array_type_def/constrained_array/multidimensional_constraint/test.out similarity index 100% rename from testsuite/tests/unparsing/array_type_def/constrained_array/multidimensional_constraint/test.out rename to testsuite/tests/unparsing/type_def/array_type_def/constrained_array/multidimensional_constraint/test.out diff --git a/testsuite/tests/unparsing/array_type_def/constrained_array/multidimensional_constraint/test.yaml b/testsuite/tests/unparsing/type_def/array_type_def/constrained_array/multidimensional_constraint/test.yaml similarity index 100% rename from testsuite/tests/unparsing/array_type_def/constrained_array/multidimensional_constraint/test.yaml rename to testsuite/tests/unparsing/type_def/array_type_def/constrained_array/multidimensional_constraint/test.yaml diff --git a/testsuite/tests/unparsing/array_type_def/constrained_array/multidimensional_long_constraint/input.ada b/testsuite/tests/unparsing/type_def/array_type_def/constrained_array/multidimensional_long_constraint/input.ada similarity index 100% rename from testsuite/tests/unparsing/array_type_def/constrained_array/multidimensional_long_constraint/input.ada rename to testsuite/tests/unparsing/type_def/array_type_def/constrained_array/multidimensional_long_constraint/input.ada diff --git a/testsuite/tests/unparsing/array_type_def/constrained_array/multidimensional_long_constraint/test.out b/testsuite/tests/unparsing/type_def/array_type_def/constrained_array/multidimensional_long_constraint/test.out similarity index 100% rename from testsuite/tests/unparsing/array_type_def/constrained_array/multidimensional_long_constraint/test.out rename to testsuite/tests/unparsing/type_def/array_type_def/constrained_array/multidimensional_long_constraint/test.out diff --git a/testsuite/tests/unparsing/array_type_def/constrained_array/multidimensional_long_constraint/test.yaml b/testsuite/tests/unparsing/type_def/array_type_def/constrained_array/multidimensional_long_constraint/test.yaml similarity index 100% rename from testsuite/tests/unparsing/array_type_def/constrained_array/multidimensional_long_constraint/test.yaml rename to testsuite/tests/unparsing/type_def/array_type_def/constrained_array/multidimensional_long_constraint/test.yaml diff --git a/testsuite/tests/unparsing/array_type_def/constrained_array/simple_constraint/input.ada b/testsuite/tests/unparsing/type_def/array_type_def/constrained_array/simple_constraint/input.ada similarity index 100% rename from testsuite/tests/unparsing/array_type_def/constrained_array/simple_constraint/input.ada rename to testsuite/tests/unparsing/type_def/array_type_def/constrained_array/simple_constraint/input.ada diff --git a/testsuite/tests/unparsing/array_type_def/constrained_array/simple_constraint/test.out b/testsuite/tests/unparsing/type_def/array_type_def/constrained_array/simple_constraint/test.out similarity index 100% rename from testsuite/tests/unparsing/array_type_def/constrained_array/simple_constraint/test.out rename to testsuite/tests/unparsing/type_def/array_type_def/constrained_array/simple_constraint/test.out diff --git a/testsuite/tests/unparsing/array_type_def/constrained_array/simple_constraint/test.yaml b/testsuite/tests/unparsing/type_def/array_type_def/constrained_array/simple_constraint/test.yaml similarity index 100% rename from testsuite/tests/unparsing/array_type_def/constrained_array/simple_constraint/test.yaml rename to testsuite/tests/unparsing/type_def/array_type_def/constrained_array/simple_constraint/test.yaml diff --git a/testsuite/tests/unparsing/array_type_def/constrained_array/very_long_constraint_list/input.ada b/testsuite/tests/unparsing/type_def/array_type_def/constrained_array/very_long_constraint_list/input.ada similarity index 100% rename from testsuite/tests/unparsing/array_type_def/constrained_array/very_long_constraint_list/input.ada rename to testsuite/tests/unparsing/type_def/array_type_def/constrained_array/very_long_constraint_list/input.ada diff --git a/testsuite/tests/unparsing/array_type_def/constrained_array/very_long_constraint_list/test.out b/testsuite/tests/unparsing/type_def/array_type_def/constrained_array/very_long_constraint_list/test.out similarity index 100% rename from testsuite/tests/unparsing/array_type_def/constrained_array/very_long_constraint_list/test.out rename to testsuite/tests/unparsing/type_def/array_type_def/constrained_array/very_long_constraint_list/test.out diff --git a/testsuite/tests/unparsing/array_type_def/constrained_array/very_long_constraint_list/test.yaml b/testsuite/tests/unparsing/type_def/array_type_def/constrained_array/very_long_constraint_list/test.yaml similarity index 100% rename from testsuite/tests/unparsing/array_type_def/constrained_array/very_long_constraint_list/test.yaml rename to testsuite/tests/unparsing/type_def/array_type_def/constrained_array/very_long_constraint_list/test.yaml diff --git a/testsuite/tests/unparsing/array_type_def/unconstrained_array/multidimensional_constraint/input.ada b/testsuite/tests/unparsing/type_def/array_type_def/unconstrained_array/multidimensional_constraint/input.ada similarity index 100% rename from testsuite/tests/unparsing/array_type_def/unconstrained_array/multidimensional_constraint/input.ada rename to testsuite/tests/unparsing/type_def/array_type_def/unconstrained_array/multidimensional_constraint/input.ada diff --git a/testsuite/tests/unparsing/array_type_def/unconstrained_array/multidimensional_constraint/test.out b/testsuite/tests/unparsing/type_def/array_type_def/unconstrained_array/multidimensional_constraint/test.out similarity index 100% rename from testsuite/tests/unparsing/array_type_def/unconstrained_array/multidimensional_constraint/test.out rename to testsuite/tests/unparsing/type_def/array_type_def/unconstrained_array/multidimensional_constraint/test.out diff --git a/testsuite/tests/unparsing/array_type_def/unconstrained_array/multidimensional_constraint/test.yaml b/testsuite/tests/unparsing/type_def/array_type_def/unconstrained_array/multidimensional_constraint/test.yaml similarity index 100% rename from testsuite/tests/unparsing/array_type_def/unconstrained_array/multidimensional_constraint/test.yaml rename to testsuite/tests/unparsing/type_def/array_type_def/unconstrained_array/multidimensional_constraint/test.yaml diff --git a/testsuite/tests/unparsing/array_type_def/unconstrained_array/multidimensional_long_constraint/input.ada b/testsuite/tests/unparsing/type_def/array_type_def/unconstrained_array/multidimensional_long_constraint/input.ada similarity index 100% rename from testsuite/tests/unparsing/array_type_def/unconstrained_array/multidimensional_long_constraint/input.ada rename to testsuite/tests/unparsing/type_def/array_type_def/unconstrained_array/multidimensional_long_constraint/input.ada diff --git a/testsuite/tests/unparsing/array_type_def/unconstrained_array/multidimensional_long_constraint/test.out b/testsuite/tests/unparsing/type_def/array_type_def/unconstrained_array/multidimensional_long_constraint/test.out similarity index 100% rename from testsuite/tests/unparsing/array_type_def/unconstrained_array/multidimensional_long_constraint/test.out rename to testsuite/tests/unparsing/type_def/array_type_def/unconstrained_array/multidimensional_long_constraint/test.out diff --git a/testsuite/tests/unparsing/array_type_def/unconstrained_array/multidimensional_long_constraint/test.yaml b/testsuite/tests/unparsing/type_def/array_type_def/unconstrained_array/multidimensional_long_constraint/test.yaml similarity index 100% rename from testsuite/tests/unparsing/array_type_def/unconstrained_array/multidimensional_long_constraint/test.yaml rename to testsuite/tests/unparsing/type_def/array_type_def/unconstrained_array/multidimensional_long_constraint/test.yaml diff --git a/testsuite/tests/unparsing/array_type_def/unconstrained_array/simple_constraint/input.ada b/testsuite/tests/unparsing/type_def/array_type_def/unconstrained_array/simple_constraint/input.ada similarity index 100% rename from testsuite/tests/unparsing/array_type_def/unconstrained_array/simple_constraint/input.ada rename to testsuite/tests/unparsing/type_def/array_type_def/unconstrained_array/simple_constraint/input.ada diff --git a/testsuite/tests/unparsing/array_type_def/unconstrained_array/simple_constraint/test.out b/testsuite/tests/unparsing/type_def/array_type_def/unconstrained_array/simple_constraint/test.out similarity index 100% rename from testsuite/tests/unparsing/array_type_def/unconstrained_array/simple_constraint/test.out rename to testsuite/tests/unparsing/type_def/array_type_def/unconstrained_array/simple_constraint/test.out diff --git a/testsuite/tests/unparsing/array_type_def/unconstrained_array/simple_constraint/test.yaml b/testsuite/tests/unparsing/type_def/array_type_def/unconstrained_array/simple_constraint/test.yaml similarity index 100% rename from testsuite/tests/unparsing/array_type_def/unconstrained_array/simple_constraint/test.yaml rename to testsuite/tests/unparsing/type_def/array_type_def/unconstrained_array/simple_constraint/test.yaml diff --git a/testsuite/tests/unparsing/derived_type_def/derived_integer_type/input.ada b/testsuite/tests/unparsing/type_def/derived_type_def/derived_integer_type/input.ada similarity index 100% rename from testsuite/tests/unparsing/derived_type_def/derived_integer_type/input.ada rename to testsuite/tests/unparsing/type_def/derived_type_def/derived_integer_type/input.ada diff --git a/testsuite/tests/unparsing/derived_type_def/derived_integer_type/test.out b/testsuite/tests/unparsing/type_def/derived_type_def/derived_integer_type/test.out similarity index 100% rename from testsuite/tests/unparsing/derived_type_def/derived_integer_type/test.out rename to testsuite/tests/unparsing/type_def/derived_type_def/derived_integer_type/test.out diff --git a/testsuite/tests/unparsing/derived_type_def/derived_integer_type/test.yaml b/testsuite/tests/unparsing/type_def/derived_type_def/derived_integer_type/test.yaml similarity index 100% rename from testsuite/tests/unparsing/derived_type_def/derived_integer_type/test.yaml rename to testsuite/tests/unparsing/type_def/derived_type_def/derived_integer_type/test.yaml diff --git a/testsuite/tests/unparsing/derived_type_def/derived_with_abstract/input.ada b/testsuite/tests/unparsing/type_def/derived_type_def/derived_with_abstract/input.ada similarity index 100% rename from testsuite/tests/unparsing/derived_type_def/derived_with_abstract/input.ada rename to testsuite/tests/unparsing/type_def/derived_type_def/derived_with_abstract/input.ada diff --git a/testsuite/tests/unparsing/derived_type_def/derived_with_abstract/test.out b/testsuite/tests/unparsing/type_def/derived_type_def/derived_with_abstract/test.out similarity index 100% rename from testsuite/tests/unparsing/derived_type_def/derived_with_abstract/test.out rename to testsuite/tests/unparsing/type_def/derived_type_def/derived_with_abstract/test.out diff --git a/testsuite/tests/unparsing/derived_type_def/derived_with_abstract/test.yaml b/testsuite/tests/unparsing/type_def/derived_type_def/derived_with_abstract/test.yaml similarity index 100% rename from testsuite/tests/unparsing/derived_type_def/derived_with_abstract/test.yaml rename to testsuite/tests/unparsing/type_def/derived_type_def/derived_with_abstract/test.yaml diff --git a/testsuite/tests/unparsing/derived_type_def/derived_with_interface/input.ada b/testsuite/tests/unparsing/type_def/derived_type_def/derived_with_interface/input.ada similarity index 100% rename from testsuite/tests/unparsing/derived_type_def/derived_with_interface/input.ada rename to testsuite/tests/unparsing/type_def/derived_type_def/derived_with_interface/input.ada diff --git a/testsuite/tests/unparsing/type_def/derived_type_def/derived_with_interface/test.out b/testsuite/tests/unparsing/type_def/derived_type_def/derived_with_interface/test.out new file mode 100644 index 000000000..96cbcb5f9 --- /dev/null +++ b/testsuite/tests/unparsing/type_def/derived_type_def/derived_with_interface/test.out @@ -0,0 +1 @@ +type Derived_Interface is new Int1 and Int2 with null record; diff --git a/testsuite/tests/unparsing/derived_type_def/derived_with_interface/test.yaml b/testsuite/tests/unparsing/type_def/derived_type_def/derived_with_interface/test.yaml similarity index 100% rename from testsuite/tests/unparsing/derived_type_def/derived_with_interface/test.yaml rename to testsuite/tests/unparsing/type_def/derived_type_def/derived_with_interface/test.yaml diff --git a/testsuite/tests/unparsing/derived_type_def/derived_with_limited/input.ada b/testsuite/tests/unparsing/type_def/derived_type_def/derived_with_limited/input.ada similarity index 100% rename from testsuite/tests/unparsing/derived_type_def/derived_with_limited/input.ada rename to testsuite/tests/unparsing/type_def/derived_type_def/derived_with_limited/input.ada diff --git a/testsuite/tests/unparsing/derived_type_def/derived_with_limited/test.out b/testsuite/tests/unparsing/type_def/derived_type_def/derived_with_limited/test.out similarity index 100% rename from testsuite/tests/unparsing/derived_type_def/derived_with_limited/test.out rename to testsuite/tests/unparsing/type_def/derived_type_def/derived_with_limited/test.out diff --git a/testsuite/tests/unparsing/derived_type_def/derived_with_limited/test.yaml b/testsuite/tests/unparsing/type_def/derived_type_def/derived_with_limited/test.yaml similarity index 100% rename from testsuite/tests/unparsing/derived_type_def/derived_with_limited/test.yaml rename to testsuite/tests/unparsing/type_def/derived_type_def/derived_with_limited/test.yaml diff --git a/testsuite/tests/unparsing/derived_type_def/derived_with_private/input.ada b/testsuite/tests/unparsing/type_def/derived_type_def/derived_with_private/input.ada similarity index 100% rename from testsuite/tests/unparsing/derived_type_def/derived_with_private/input.ada rename to testsuite/tests/unparsing/type_def/derived_type_def/derived_with_private/input.ada diff --git a/testsuite/tests/unparsing/derived_type_def/derived_with_private/test.out b/testsuite/tests/unparsing/type_def/derived_type_def/derived_with_private/test.out similarity index 100% rename from testsuite/tests/unparsing/derived_type_def/derived_with_private/test.out rename to testsuite/tests/unparsing/type_def/derived_type_def/derived_with_private/test.out diff --git a/testsuite/tests/unparsing/derived_type_def/derived_with_private/test.yaml b/testsuite/tests/unparsing/type_def/derived_type_def/derived_with_private/test.yaml similarity index 100% rename from testsuite/tests/unparsing/derived_type_def/derived_with_private/test.yaml rename to testsuite/tests/unparsing/type_def/derived_type_def/derived_with_private/test.yaml diff --git a/testsuite/tests/unparsing/derived_type_def/derived_with_record_extension/input.ada b/testsuite/tests/unparsing/type_def/derived_type_def/derived_with_record_extension/input.ada similarity index 100% rename from testsuite/tests/unparsing/derived_type_def/derived_with_record_extension/input.ada rename to testsuite/tests/unparsing/type_def/derived_type_def/derived_with_record_extension/input.ada diff --git a/testsuite/tests/unparsing/type_def/derived_type_def/derived_with_record_extension/test.out b/testsuite/tests/unparsing/type_def/derived_type_def/derived_with_record_extension/test.out new file mode 100644 index 000000000..0836549a9 --- /dev/null +++ b/testsuite/tests/unparsing/type_def/derived_type_def/derived_with_record_extension/test.out @@ -0,0 +1,3 @@ +type Painted_Point is new Poooooooooooooiiiiiiiiiint1 with record + Paint : Color := White; +end record; diff --git a/testsuite/tests/unparsing/derived_type_def/derived_with_record_extension/test.yaml b/testsuite/tests/unparsing/type_def/derived_type_def/derived_with_record_extension/test.yaml similarity index 100% rename from testsuite/tests/unparsing/derived_type_def/derived_with_record_extension/test.yaml rename to testsuite/tests/unparsing/type_def/derived_type_def/derived_with_record_extension/test.yaml diff --git a/testsuite/tests/unparsing/type_def/derived_type_def/discriminants_and_interface_list_and_record_extension/input.ada b/testsuite/tests/unparsing/type_def/derived_type_def/discriminants_and_interface_list_and_record_extension/input.ada new file mode 100644 index 000000000..27ec7f37c --- /dev/null +++ b/testsuite/tests/unparsing/type_def/derived_type_def/discriminants_and_interface_list_and_record_extension/input.ada @@ -0,0 +1,11 @@ +type Painted_Point + (Foo : Fooooooooooooooo := Foo_Bar; + Baar : Baaaaaaaaaar; + Baaaz : Baaaaaaaaaaaaaaz := Baz_Baz) +is abstract limited new Poooooooooooooiiiiiiiiiint1 + and Poooooooooooooooooiiiiint2 + and Point3 +with record + Paint_1 : Color := White; + Paint_222 : Color_X := White; +end record; diff --git a/testsuite/tests/unparsing/type_def/derived_type_def/discriminants_and_interface_list_and_record_extension/test.out b/testsuite/tests/unparsing/type_def/derived_type_def/discriminants_and_interface_list_and_record_extension/test.out new file mode 100644 index 000000000..67d371094 --- /dev/null +++ b/testsuite/tests/unparsing/type_def/derived_type_def/discriminants_and_interface_list_and_record_extension/test.out @@ -0,0 +1,12 @@ +type Painted_Point + (Foo : Fooooooooooooooo := Foo_Bar; + Baar : Baaaaaaaaaar; + Baaaz : Baaaaaaaaaaaaaaz := Baz_Baz) +is abstract limited + new Poooooooooooooiiiiiiiiiint1 + and Poooooooooooooooooiiiiint2 + and Point3 +with record + Paint_1 : Color := White; + Paint_222 : Color_X := White; +end record; diff --git a/testsuite/tests/unparsing/type_def/derived_type_def/discriminants_and_interface_list_and_record_extension/test.yaml b/testsuite/tests/unparsing/type_def/derived_type_def/discriminants_and_interface_list_and_record_extension/test.yaml new file mode 100644 index 000000000..e363ac8e8 --- /dev/null +++ b/testsuite/tests/unparsing/type_def/derived_type_def/discriminants_and_interface_list_and_record_extension/test.yaml @@ -0,0 +1,9 @@ +driver: unparser +rule: type_decl +description: | + This test checks the formatting of a derived type declaration with + non empty interface list, non empty discriminats and record extension. + It is expected the declaration breaks after `is abstract limited` and + `before `with record`. + The interface list be splitted in multiple lines and continuation line + indented. diff --git a/testsuite/tests/unparsing/derived_type_def/derived_with_interface_list_and_record_extension/input.ada b/testsuite/tests/unparsing/type_def/derived_type_def/interface_list_and_record_extension/input.ada similarity index 100% rename from testsuite/tests/unparsing/derived_type_def/derived_with_interface_list_and_record_extension/input.ada rename to testsuite/tests/unparsing/type_def/derived_type_def/interface_list_and_record_extension/input.ada diff --git a/testsuite/tests/unparsing/type_def/derived_type_def/interface_list_and_record_extension/test.out b/testsuite/tests/unparsing/type_def/derived_type_def/interface_list_and_record_extension/test.out new file mode 100644 index 000000000..388634db6 --- /dev/null +++ b/testsuite/tests/unparsing/type_def/derived_type_def/interface_list_and_record_extension/test.out @@ -0,0 +1,7 @@ +type Painted_Point is + new Poooooooooooooiiiiiiiiiint1 + and Poooooooooooooooooiiiiint2 + and Point3 +with record + Paint : Color := White; +end record; diff --git a/testsuite/tests/unparsing/derived_type_def/derived_with_interface_list_and_record_extension/test.yaml b/testsuite/tests/unparsing/type_def/derived_type_def/interface_list_and_record_extension/test.yaml similarity index 100% rename from testsuite/tests/unparsing/derived_type_def/derived_with_interface_list_and_record_extension/test.yaml rename to testsuite/tests/unparsing/type_def/derived_type_def/interface_list_and_record_extension/test.yaml diff --git a/testsuite/tests/unparsing/derived_type_def/simple_type/input.ada b/testsuite/tests/unparsing/type_def/derived_type_def/simple_type/input.ada similarity index 100% rename from testsuite/tests/unparsing/derived_type_def/simple_type/input.ada rename to testsuite/tests/unparsing/type_def/derived_type_def/simple_type/input.ada diff --git a/testsuite/tests/unparsing/derived_type_def/simple_type/test.out b/testsuite/tests/unparsing/type_def/derived_type_def/simple_type/test.out similarity index 100% rename from testsuite/tests/unparsing/derived_type_def/simple_type/test.out rename to testsuite/tests/unparsing/type_def/derived_type_def/simple_type/test.out diff --git a/testsuite/tests/unparsing/derived_type_def/simple_type/test.yaml b/testsuite/tests/unparsing/type_def/derived_type_def/simple_type/test.yaml similarity index 100% rename from testsuite/tests/unparsing/derived_type_def/simple_type/test.yaml rename to testsuite/tests/unparsing/type_def/derived_type_def/simple_type/test.yaml diff --git a/testsuite/tests/unparsing/type_def/derived_type_def/with_record_separate_line/input.ada b/testsuite/tests/unparsing/type_def/derived_type_def/with_record_separate_line/input.ada new file mode 100644 index 000000000..130b23a0c --- /dev/null +++ b/testsuite/tests/unparsing/type_def/derived_type_def/with_record_separate_line/input.ada @@ -0,0 +1 @@ +type Foo is new Bar and Baz and Corge and Garply and Fred and Fnoord with record A : B; end record; diff --git a/testsuite/tests/unparsing/type_def/derived_type_def/with_record_separate_line/test.out b/testsuite/tests/unparsing/type_def/derived_type_def/with_record_separate_line/test.out new file mode 100644 index 000000000..7d3037403 --- /dev/null +++ b/testsuite/tests/unparsing/type_def/derived_type_def/with_record_separate_line/test.out @@ -0,0 +1,4 @@ +type Foo is new Bar and Baz and Corge and Garply and Fred and Fnoord +with record + A : B; +end record; diff --git a/testsuite/tests/unparsing/type_def/derived_type_def/with_record_separate_line/test.yaml b/testsuite/tests/unparsing/type_def/derived_type_def/with_record_separate_line/test.yaml new file mode 100644 index 000000000..56b1c9b0c --- /dev/null +++ b/testsuite/tests/unparsing/type_def/derived_type_def/with_record_separate_line/test.yaml @@ -0,0 +1,6 @@ +description: | + This test checks the formatting of a simple derived type declaration. + It is expected the declaration stays on a single line. + +driver: unparser +rule: type_decl diff --git a/testsuite/tests/unparsing/enum_type_def/long_def/input.ada b/testsuite/tests/unparsing/type_def/enum_type_def/long_def/input.ada similarity index 100% rename from testsuite/tests/unparsing/enum_type_def/long_def/input.ada rename to testsuite/tests/unparsing/type_def/enum_type_def/long_def/input.ada diff --git a/testsuite/tests/unparsing/enum_type_def/long_def/test.out b/testsuite/tests/unparsing/type_def/enum_type_def/long_def/test.out similarity index 100% rename from testsuite/tests/unparsing/enum_type_def/long_def/test.out rename to testsuite/tests/unparsing/type_def/enum_type_def/long_def/test.out diff --git a/testsuite/tests/unparsing/enum_type_def/long_def/test.yaml b/testsuite/tests/unparsing/type_def/enum_type_def/long_def/test.yaml similarity index 100% rename from testsuite/tests/unparsing/enum_type_def/long_def/test.yaml rename to testsuite/tests/unparsing/type_def/enum_type_def/long_def/test.yaml diff --git a/testsuite/tests/unparsing/enum_type_def/long_literal_list/input.ada b/testsuite/tests/unparsing/type_def/enum_type_def/long_literal_list/input.ada similarity index 100% rename from testsuite/tests/unparsing/enum_type_def/long_literal_list/input.ada rename to testsuite/tests/unparsing/type_def/enum_type_def/long_literal_list/input.ada diff --git a/testsuite/tests/unparsing/enum_type_def/long_literal_list/test.out b/testsuite/tests/unparsing/type_def/enum_type_def/long_literal_list/test.out similarity index 100% rename from testsuite/tests/unparsing/enum_type_def/long_literal_list/test.out rename to testsuite/tests/unparsing/type_def/enum_type_def/long_literal_list/test.out diff --git a/testsuite/tests/unparsing/enum_type_def/long_literal_list/test.yaml b/testsuite/tests/unparsing/type_def/enum_type_def/long_literal_list/test.yaml similarity index 100% rename from testsuite/tests/unparsing/enum_type_def/long_literal_list/test.yaml rename to testsuite/tests/unparsing/type_def/enum_type_def/long_literal_list/test.yaml diff --git a/testsuite/tests/unparsing/enum_type_def/long_type_name/input.ada b/testsuite/tests/unparsing/type_def/enum_type_def/long_type_name/input.ada similarity index 100% rename from testsuite/tests/unparsing/enum_type_def/long_type_name/input.ada rename to testsuite/tests/unparsing/type_def/enum_type_def/long_type_name/input.ada diff --git a/testsuite/tests/unparsing/enum_type_def/long_type_name/test.out b/testsuite/tests/unparsing/type_def/enum_type_def/long_type_name/test.out similarity index 100% rename from testsuite/tests/unparsing/enum_type_def/long_type_name/test.out rename to testsuite/tests/unparsing/type_def/enum_type_def/long_type_name/test.out diff --git a/testsuite/tests/unparsing/enum_type_def/long_type_name/test.yaml b/testsuite/tests/unparsing/type_def/enum_type_def/long_type_name/test.yaml similarity index 100% rename from testsuite/tests/unparsing/enum_type_def/long_type_name/test.yaml rename to testsuite/tests/unparsing/type_def/enum_type_def/long_type_name/test.yaml diff --git a/testsuite/tests/unparsing/enum_type_def/short_def/input.ada b/testsuite/tests/unparsing/type_def/enum_type_def/short_def/input.ada similarity index 100% rename from testsuite/tests/unparsing/enum_type_def/short_def/input.ada rename to testsuite/tests/unparsing/type_def/enum_type_def/short_def/input.ada diff --git a/testsuite/tests/unparsing/enum_type_def/short_def/test.out b/testsuite/tests/unparsing/type_def/enum_type_def/short_def/test.out similarity index 100% rename from testsuite/tests/unparsing/enum_type_def/short_def/test.out rename to testsuite/tests/unparsing/type_def/enum_type_def/short_def/test.out diff --git a/testsuite/tests/unparsing/enum_type_def/short_def/test.yaml b/testsuite/tests/unparsing/type_def/enum_type_def/short_def/test.yaml similarity index 100% rename from testsuite/tests/unparsing/enum_type_def/short_def/test.yaml rename to testsuite/tests/unparsing/type_def/enum_type_def/short_def/test.yaml diff --git a/testsuite/tests/unparsing/interface_type_def/base_type/input.ada b/testsuite/tests/unparsing/type_def/interface_type_def/base_type/input.ada similarity index 100% rename from testsuite/tests/unparsing/interface_type_def/base_type/input.ada rename to testsuite/tests/unparsing/type_def/interface_type_def/base_type/input.ada diff --git a/testsuite/tests/unparsing/type_def/interface_type_def/base_type/test.out b/testsuite/tests/unparsing/type_def/interface_type_def/base_type/test.out new file mode 100644 index 000000000..ba0058640 --- /dev/null +++ b/testsuite/tests/unparsing/type_def/interface_type_def/base_type/test.out @@ -0,0 +1 @@ +type Base_Type is interface and Interface_1 and Interface_2; diff --git a/testsuite/tests/unparsing/interface_type_def/base_type/test.yaml b/testsuite/tests/unparsing/type_def/interface_type_def/base_type/test.yaml similarity index 100% rename from testsuite/tests/unparsing/interface_type_def/base_type/test.yaml rename to testsuite/tests/unparsing/type_def/interface_type_def/base_type/test.yaml diff --git a/testsuite/tests/unparsing/interface_type_def/limited_interface/input.ada b/testsuite/tests/unparsing/type_def/interface_type_def/limited_interface/input.ada similarity index 100% rename from testsuite/tests/unparsing/interface_type_def/limited_interface/input.ada rename to testsuite/tests/unparsing/type_def/interface_type_def/limited_interface/input.ada diff --git a/testsuite/tests/unparsing/interface_type_def/limited_interface/test.out b/testsuite/tests/unparsing/type_def/interface_type_def/limited_interface/test.out similarity index 100% rename from testsuite/tests/unparsing/interface_type_def/limited_interface/test.out rename to testsuite/tests/unparsing/type_def/interface_type_def/limited_interface/test.out diff --git a/testsuite/tests/unparsing/interface_type_def/limited_interface/test.yaml b/testsuite/tests/unparsing/type_def/interface_type_def/limited_interface/test.yaml similarity index 100% rename from testsuite/tests/unparsing/interface_type_def/limited_interface/test.yaml rename to testsuite/tests/unparsing/type_def/interface_type_def/limited_interface/test.yaml diff --git a/testsuite/tests/unparsing/interface_type_def/protected_interface/input.ada b/testsuite/tests/unparsing/type_def/interface_type_def/protected_interface/input.ada similarity index 100% rename from testsuite/tests/unparsing/interface_type_def/protected_interface/input.ada rename to testsuite/tests/unparsing/type_def/interface_type_def/protected_interface/input.ada diff --git a/testsuite/tests/unparsing/interface_type_def/protected_interface/test.out b/testsuite/tests/unparsing/type_def/interface_type_def/protected_interface/test.out similarity index 100% rename from testsuite/tests/unparsing/interface_type_def/protected_interface/test.out rename to testsuite/tests/unparsing/type_def/interface_type_def/protected_interface/test.out diff --git a/testsuite/tests/unparsing/interface_type_def/protected_interface/test.yaml b/testsuite/tests/unparsing/type_def/interface_type_def/protected_interface/test.yaml similarity index 100% rename from testsuite/tests/unparsing/interface_type_def/protected_interface/test.yaml rename to testsuite/tests/unparsing/type_def/interface_type_def/protected_interface/test.yaml diff --git a/testsuite/tests/unparsing/interface_type_def/simple_interface/input.ada b/testsuite/tests/unparsing/type_def/interface_type_def/simple_interface/input.ada similarity index 100% rename from testsuite/tests/unparsing/interface_type_def/simple_interface/input.ada rename to testsuite/tests/unparsing/type_def/interface_type_def/simple_interface/input.ada diff --git a/testsuite/tests/unparsing/interface_type_def/simple_interface/test.out b/testsuite/tests/unparsing/type_def/interface_type_def/simple_interface/test.out similarity index 100% rename from testsuite/tests/unparsing/interface_type_def/simple_interface/test.out rename to testsuite/tests/unparsing/type_def/interface_type_def/simple_interface/test.out diff --git a/testsuite/tests/unparsing/interface_type_def/simple_interface/test.yaml b/testsuite/tests/unparsing/type_def/interface_type_def/simple_interface/test.yaml similarity index 100% rename from testsuite/tests/unparsing/interface_type_def/simple_interface/test.yaml rename to testsuite/tests/unparsing/type_def/interface_type_def/simple_interface/test.yaml diff --git a/testsuite/tests/unparsing/type_def/interface_type_def/synchronized_and_long_interface_list/input.ada b/testsuite/tests/unparsing/type_def/interface_type_def/synchronized_and_long_interface_list/input.ada new file mode 100644 index 000000000..7cc679388 --- /dev/null +++ b/testsuite/tests/unparsing/type_def/interface_type_def/synchronized_and_long_interface_list/input.ada @@ -0,0 +1,6 @@ +type Combo_Sync_Interface is + synchronized interface + and My_Interface_1 + and My_Interface_2 + and My_Interface_3 + and My_Interface_4; diff --git a/testsuite/tests/unparsing/type_def/interface_type_def/synchronized_and_long_interface_list/test.out b/testsuite/tests/unparsing/type_def/interface_type_def/synchronized_and_long_interface_list/test.out new file mode 100644 index 000000000..7cc679388 --- /dev/null +++ b/testsuite/tests/unparsing/type_def/interface_type_def/synchronized_and_long_interface_list/test.out @@ -0,0 +1,6 @@ +type Combo_Sync_Interface is + synchronized interface + and My_Interface_1 + and My_Interface_2 + and My_Interface_3 + and My_Interface_4; diff --git a/testsuite/tests/unparsing/interface_type_def/synchro_and_interface_list/test.yaml b/testsuite/tests/unparsing/type_def/interface_type_def/synchronized_and_long_interface_list/test.yaml similarity index 100% rename from testsuite/tests/unparsing/interface_type_def/synchro_and_interface_list/test.yaml rename to testsuite/tests/unparsing/type_def/interface_type_def/synchronized_and_long_interface_list/test.yaml diff --git a/testsuite/tests/unparsing/interface_type_def/synchro_and_interface_list/input.ada b/testsuite/tests/unparsing/type_def/interface_type_def/synchronized_and_short_interface_list/input.ada similarity index 100% rename from testsuite/tests/unparsing/interface_type_def/synchro_and_interface_list/input.ada rename to testsuite/tests/unparsing/type_def/interface_type_def/synchronized_and_short_interface_list/input.ada diff --git a/testsuite/tests/unparsing/type_def/interface_type_def/synchronized_and_short_interface_list/test.out b/testsuite/tests/unparsing/type_def/interface_type_def/synchronized_and_short_interface_list/test.out new file mode 100644 index 000000000..8d25308ce --- /dev/null +++ b/testsuite/tests/unparsing/type_def/interface_type_def/synchronized_and_short_interface_list/test.out @@ -0,0 +1,2 @@ +type Combo_Sync_Interface is + synchronized interface and My_Interface_1 and My_Interface_2; diff --git a/testsuite/tests/unparsing/type_def/interface_type_def/synchronized_and_short_interface_list/test.yaml b/testsuite/tests/unparsing/type_def/interface_type_def/synchronized_and_short_interface_list/test.yaml new file mode 100644 index 000000000..9f7562815 --- /dev/null +++ b/testsuite/tests/unparsing/type_def/interface_type_def/synchronized_and_short_interface_list/test.yaml @@ -0,0 +1,9 @@ +description: | + This test checks the formatting of a synchronized interface + type declaration with not empty interface list. + It is expected the declaration break after `is` keyword and + all the interface list elements and be indented relative to + the type keyword with a line continuation indentation. + +driver: unparser +rule: type_decl diff --git a/testsuite/tests/unparsing/interface_type_def/synchronized_interface/input.ada b/testsuite/tests/unparsing/type_def/interface_type_def/synchronized_interface/input.ada similarity index 100% rename from testsuite/tests/unparsing/interface_type_def/synchronized_interface/input.ada rename to testsuite/tests/unparsing/type_def/interface_type_def/synchronized_interface/input.ada diff --git a/testsuite/tests/unparsing/interface_type_def/synchronized_interface/test.out b/testsuite/tests/unparsing/type_def/interface_type_def/synchronized_interface/test.out similarity index 100% rename from testsuite/tests/unparsing/interface_type_def/synchronized_interface/test.out rename to testsuite/tests/unparsing/type_def/interface_type_def/synchronized_interface/test.out diff --git a/testsuite/tests/unparsing/interface_type_def/synchronized_interface/test.yaml b/testsuite/tests/unparsing/type_def/interface_type_def/synchronized_interface/test.yaml similarity index 100% rename from testsuite/tests/unparsing/interface_type_def/synchronized_interface/test.yaml rename to testsuite/tests/unparsing/type_def/interface_type_def/synchronized_interface/test.yaml diff --git a/testsuite/tests/unparsing/interface_type_def/task_interface/input.ada b/testsuite/tests/unparsing/type_def/interface_type_def/task_interface/input.ada similarity index 100% rename from testsuite/tests/unparsing/interface_type_def/task_interface/input.ada rename to testsuite/tests/unparsing/type_def/interface_type_def/task_interface/input.ada diff --git a/testsuite/tests/unparsing/interface_type_def/task_interface/test.out b/testsuite/tests/unparsing/type_def/interface_type_def/task_interface/test.out similarity index 100% rename from testsuite/tests/unparsing/interface_type_def/task_interface/test.out rename to testsuite/tests/unparsing/type_def/interface_type_def/task_interface/test.out diff --git a/testsuite/tests/unparsing/interface_type_def/task_interface/test.yaml b/testsuite/tests/unparsing/type_def/interface_type_def/task_interface/test.yaml similarity index 100% rename from testsuite/tests/unparsing/interface_type_def/task_interface/test.yaml rename to testsuite/tests/unparsing/type_def/interface_type_def/task_interface/test.yaml diff --git a/testsuite/tests/unparsing/type_def/real_type_def/decimal_fixed_point_type_def/long/input.ada b/testsuite/tests/unparsing/type_def/real_type_def/decimal_fixed_point_type_def/long/input.ada new file mode 100644 index 000000000..799125591 --- /dev/null +++ b/testsuite/tests/unparsing/type_def/real_type_def/decimal_fixed_point_type_def/long/input.ada @@ -0,0 +1 @@ +type Decimal_Fixed_Point_Type_Decl_Looooooooooooooooong is delta 0.01 digits 15; diff --git a/testsuite/tests/unparsing/type_def/real_type_def/decimal_fixed_point_type_def/long/test.out b/testsuite/tests/unparsing/type_def/real_type_def/decimal_fixed_point_type_def/long/test.out new file mode 100644 index 000000000..ae1c35502 --- /dev/null +++ b/testsuite/tests/unparsing/type_def/real_type_def/decimal_fixed_point_type_def/long/test.out @@ -0,0 +1,2 @@ +type Decimal_Fixed_Point_Type_Decl_Looooooooooooooooong is + delta 0.01 digits 15; diff --git a/testsuite/tests/unparsing/decimal_fixed_point_type_def/test.yaml b/testsuite/tests/unparsing/type_def/real_type_def/decimal_fixed_point_type_def/long/test.yaml similarity index 100% rename from testsuite/tests/unparsing/decimal_fixed_point_type_def/test.yaml rename to testsuite/tests/unparsing/type_def/real_type_def/decimal_fixed_point_type_def/long/test.yaml diff --git a/testsuite/tests/unparsing/decimal_fixed_point_type_def/input.ada b/testsuite/tests/unparsing/type_def/real_type_def/decimal_fixed_point_type_def/short/input.ada similarity index 100% rename from testsuite/tests/unparsing/decimal_fixed_point_type_def/input.ada rename to testsuite/tests/unparsing/type_def/real_type_def/decimal_fixed_point_type_def/short/input.ada diff --git a/testsuite/tests/unparsing/decimal_fixed_point_type_def/test.out b/testsuite/tests/unparsing/type_def/real_type_def/decimal_fixed_point_type_def/short/test.out similarity index 100% rename from testsuite/tests/unparsing/decimal_fixed_point_type_def/test.out rename to testsuite/tests/unparsing/type_def/real_type_def/decimal_fixed_point_type_def/short/test.out diff --git a/testsuite/tests/unparsing/type_def/real_type_def/decimal_fixed_point_type_def/short/test.yaml b/testsuite/tests/unparsing/type_def/real_type_def/decimal_fixed_point_type_def/short/test.yaml new file mode 100644 index 000000000..fece53214 --- /dev/null +++ b/testsuite/tests/unparsing/type_def/real_type_def/decimal_fixed_point_type_def/short/test.yaml @@ -0,0 +1,8 @@ +description: | + This test checks the formatting of a simple decimal fixed point type + declaration. It is expected the declaration be splitted in two + lines after the is keyword and the new line be indented with a + line continuation indentation (i.e., 2 spaces) stays on the same line. + +driver: unparser +rule: type_decl diff --git a/testsuite/tests/unparsing/floating_point_type_def/long_name/input.ada b/testsuite/tests/unparsing/type_def/real_type_def/floating_point_type_def/long_name/input.ada similarity index 100% rename from testsuite/tests/unparsing/floating_point_type_def/long_name/input.ada rename to testsuite/tests/unparsing/type_def/real_type_def/floating_point_type_def/long_name/input.ada diff --git a/testsuite/tests/unparsing/floating_point_type_def/long_name/test.out b/testsuite/tests/unparsing/type_def/real_type_def/floating_point_type_def/long_name/test.out similarity index 100% rename from testsuite/tests/unparsing/floating_point_type_def/long_name/test.out rename to testsuite/tests/unparsing/type_def/real_type_def/floating_point_type_def/long_name/test.out diff --git a/testsuite/tests/unparsing/floating_point_type_def/long_name/test.yaml b/testsuite/tests/unparsing/type_def/real_type_def/floating_point_type_def/long_name/test.yaml similarity index 100% rename from testsuite/tests/unparsing/floating_point_type_def/long_name/test.yaml rename to testsuite/tests/unparsing/type_def/real_type_def/floating_point_type_def/long_name/test.yaml diff --git a/testsuite/tests/unparsing/floating_point_type_def/short_name/input.ada b/testsuite/tests/unparsing/type_def/real_type_def/floating_point_type_def/short_name/input.ada similarity index 100% rename from testsuite/tests/unparsing/floating_point_type_def/short_name/input.ada rename to testsuite/tests/unparsing/type_def/real_type_def/floating_point_type_def/short_name/input.ada diff --git a/testsuite/tests/unparsing/floating_point_type_def/short_name/test.out b/testsuite/tests/unparsing/type_def/real_type_def/floating_point_type_def/short_name/test.out similarity index 100% rename from testsuite/tests/unparsing/floating_point_type_def/short_name/test.out rename to testsuite/tests/unparsing/type_def/real_type_def/floating_point_type_def/short_name/test.out diff --git a/testsuite/tests/unparsing/floating_point_type_def/short_name/test.yaml b/testsuite/tests/unparsing/type_def/real_type_def/floating_point_type_def/short_name/test.yaml similarity index 100% rename from testsuite/tests/unparsing/floating_point_type_def/short_name/test.yaml rename to testsuite/tests/unparsing/type_def/real_type_def/floating_point_type_def/short_name/test.yaml diff --git a/testsuite/tests/unparsing/floating_point_type_def/without_range/input.ada b/testsuite/tests/unparsing/type_def/real_type_def/floating_point_type_def/without_range/input.ada similarity index 100% rename from testsuite/tests/unparsing/floating_point_type_def/without_range/input.ada rename to testsuite/tests/unparsing/type_def/real_type_def/floating_point_type_def/without_range/input.ada diff --git a/testsuite/tests/unparsing/floating_point_type_def/without_range/test.out b/testsuite/tests/unparsing/type_def/real_type_def/floating_point_type_def/without_range/test.out similarity index 100% rename from testsuite/tests/unparsing/floating_point_type_def/without_range/test.out rename to testsuite/tests/unparsing/type_def/real_type_def/floating_point_type_def/without_range/test.out diff --git a/testsuite/tests/unparsing/floating_point_type_def/without_range/test.yaml b/testsuite/tests/unparsing/type_def/real_type_def/floating_point_type_def/without_range/test.yaml similarity index 100% rename from testsuite/tests/unparsing/floating_point_type_def/without_range/test.yaml rename to testsuite/tests/unparsing/type_def/real_type_def/floating_point_type_def/without_range/test.yaml diff --git a/testsuite/tests/unparsing/ordinary_fixed_point_def/fraction/input.ada b/testsuite/tests/unparsing/type_def/real_type_def/ordinary_fixed_point_def/fraction/input.ada similarity index 100% rename from testsuite/tests/unparsing/ordinary_fixed_point_def/fraction/input.ada rename to testsuite/tests/unparsing/type_def/real_type_def/ordinary_fixed_point_def/fraction/input.ada diff --git a/testsuite/tests/unparsing/ordinary_fixed_point_def/fraction/test.out b/testsuite/tests/unparsing/type_def/real_type_def/ordinary_fixed_point_def/fraction/test.out similarity index 100% rename from testsuite/tests/unparsing/ordinary_fixed_point_def/fraction/test.out rename to testsuite/tests/unparsing/type_def/real_type_def/ordinary_fixed_point_def/fraction/test.out diff --git a/testsuite/tests/unparsing/ordinary_fixed_point_def/fraction/test.yaml b/testsuite/tests/unparsing/type_def/real_type_def/ordinary_fixed_point_def/fraction/test.yaml similarity index 100% rename from testsuite/tests/unparsing/ordinary_fixed_point_def/fraction/test.yaml rename to testsuite/tests/unparsing/type_def/real_type_def/ordinary_fixed_point_def/fraction/test.yaml diff --git a/testsuite/tests/unparsing/ordinary_fixed_point_def/simple_type/input.ada b/testsuite/tests/unparsing/type_def/real_type_def/ordinary_fixed_point_def/simple_type/input.ada similarity index 100% rename from testsuite/tests/unparsing/ordinary_fixed_point_def/simple_type/input.ada rename to testsuite/tests/unparsing/type_def/real_type_def/ordinary_fixed_point_def/simple_type/input.ada diff --git a/testsuite/tests/unparsing/ordinary_fixed_point_def/simple_type/test.out b/testsuite/tests/unparsing/type_def/real_type_def/ordinary_fixed_point_def/simple_type/test.out similarity index 100% rename from testsuite/tests/unparsing/ordinary_fixed_point_def/simple_type/test.out rename to testsuite/tests/unparsing/type_def/real_type_def/ordinary_fixed_point_def/simple_type/test.out diff --git a/testsuite/tests/unparsing/ordinary_fixed_point_def/simple_type/test.yaml b/testsuite/tests/unparsing/type_def/real_type_def/ordinary_fixed_point_def/simple_type/test.yaml similarity index 100% rename from testsuite/tests/unparsing/ordinary_fixed_point_def/simple_type/test.yaml rename to testsuite/tests/unparsing/type_def/real_type_def/ordinary_fixed_point_def/simple_type/test.yaml diff --git a/testsuite/tests/unparsing/type_def/record_type_def/complete_discriminants_one_line/input.ada b/testsuite/tests/unparsing/type_def/record_type_def/complete_discriminants_one_line/input.ada new file mode 100644 index 000000000..364f061d8 --- /dev/null +++ b/testsuite/tests/unparsing/type_def/record_type_def/complete_discriminants_one_line/input.ada @@ -0,0 +1,6 @@ +type Fooooooooooooooo (Baaaaaaaar : Baaaaaaaaaaz := Baaar_Bazzz) is +abstract tagged limited record + Day : Integer range 1 .. 31; + Month : Month_Enum; + Year : Integer range 0 .. 4000; +end record; diff --git a/testsuite/tests/unparsing/type_def/record_type_def/complete_discriminants_one_line/test.out b/testsuite/tests/unparsing/type_def/record_type_def/complete_discriminants_one_line/test.out new file mode 100644 index 000000000..364f061d8 --- /dev/null +++ b/testsuite/tests/unparsing/type_def/record_type_def/complete_discriminants_one_line/test.out @@ -0,0 +1,6 @@ +type Fooooooooooooooo (Baaaaaaaar : Baaaaaaaaaaz := Baaar_Bazzz) is +abstract tagged limited record + Day : Integer range 1 .. 31; + Month : Month_Enum; + Year : Integer range 0 .. 4000; +end record; diff --git a/testsuite/tests/unparsing/type_def/record_type_def/complete_discriminants_one_line/test.yaml b/testsuite/tests/unparsing/type_def/record_type_def/complete_discriminants_one_line/test.yaml new file mode 100644 index 000000000..8488bfb9d --- /dev/null +++ b/testsuite/tests/unparsing/type_def/record_type_def/complete_discriminants_one_line/test.yaml @@ -0,0 +1,6 @@ +driver: unparser +rule: type_decl +description: | + This test checks that `f_discriminants` are kept on the same line and + "`f_has_abstract` `f_has_tagged` `f_has_limited` `f_record_def`" are on a + seprate line. diff --git a/testsuite/tests/unparsing/type_def/record_type_def/complete_long/input.ada b/testsuite/tests/unparsing/type_def/record_type_def/complete_long/input.ada new file mode 100644 index 000000000..b7c8b5a49 --- /dev/null +++ b/testsuite/tests/unparsing/type_def/record_type_def/complete_long/input.ada @@ -0,0 +1,8 @@ +type Fooooooooooooooo + (Baaaaaaaar : Baaaaaaaaaaz := Baaar_Bazzz; + Garply : Corge := Garply_Corge) +is abstract tagged limited record + Day : Integer range 1 .. 31; + Month : Month_Enum; + Year : Integer range 0 .. 4000; +end record; diff --git a/testsuite/tests/unparsing/type_def/record_type_def/complete_long/test.out b/testsuite/tests/unparsing/type_def/record_type_def/complete_long/test.out new file mode 100644 index 000000000..b7c8b5a49 --- /dev/null +++ b/testsuite/tests/unparsing/type_def/record_type_def/complete_long/test.out @@ -0,0 +1,8 @@ +type Fooooooooooooooo + (Baaaaaaaar : Baaaaaaaaaaz := Baaar_Bazzz; + Garply : Corge := Garply_Corge) +is abstract tagged limited record + Day : Integer range 1 .. 31; + Month : Month_Enum; + Year : Integer range 0 .. 4000; +end record; diff --git a/testsuite/tests/unparsing/type_def/record_type_def/complete_long/test.yaml b/testsuite/tests/unparsing/type_def/record_type_def/complete_long/test.yaml new file mode 100644 index 000000000..ca610666b --- /dev/null +++ b/testsuite/tests/unparsing/type_def/record_type_def/complete_long/test.yaml @@ -0,0 +1,6 @@ +driver: unparser +rule: type_decl +description: + This test checks that long `f_discriminants` are formatted in multiple lines. + It also checks that `is` is in its own line followed by + "`f_has_abstract` `f_has_tagged` `f_has_limited` `f_record_def`". diff --git a/testsuite/tests/unparsing/type_def/record_type_def/complete_short/input.ada b/testsuite/tests/unparsing/type_def/record_type_def/complete_short/input.ada new file mode 100644 index 000000000..a1e3a823c --- /dev/null +++ b/testsuite/tests/unparsing/type_def/record_type_def/complete_short/input.ada @@ -0,0 +1,5 @@ +type Fooooooooooooooo (Bar : Baz) is abstract tagged limited record + Day : Integer range 1 .. 31; + Month : Month_Enum; + Year : Integer range 0 .. 4000; +end record; diff --git a/testsuite/tests/unparsing/type_def/record_type_def/complete_short/test.out b/testsuite/tests/unparsing/type_def/record_type_def/complete_short/test.out new file mode 100644 index 000000000..a1e3a823c --- /dev/null +++ b/testsuite/tests/unparsing/type_def/record_type_def/complete_short/test.out @@ -0,0 +1,5 @@ +type Fooooooooooooooo (Bar : Baz) is abstract tagged limited record + Day : Integer range 1 .. 31; + Month : Month_Enum; + Year : Integer range 0 .. 4000; +end record; diff --git a/testsuite/tests/unparsing/type_def/record_type_def/complete_short/test.yaml b/testsuite/tests/unparsing/type_def/record_type_def/complete_short/test.yaml new file mode 100644 index 000000000..595765b9b --- /dev/null +++ b/testsuite/tests/unparsing/type_def/record_type_def/complete_short/test.yaml @@ -0,0 +1,6 @@ +driver: unparser +rule: type_decl +description: + This test checks that there are no line breaks between `f_discriminants`, + `f_has_abstract`, `f_has_tagged`, `f_has_limited` and `f_record_def` if they + all fit on the same line. diff --git a/testsuite/tests/unparsing/record_type_def/null_record/input.ada b/testsuite/tests/unparsing/type_def/record_type_def/null_record/input.ada similarity index 100% rename from testsuite/tests/unparsing/record_type_def/null_record/input.ada rename to testsuite/tests/unparsing/type_def/record_type_def/null_record/input.ada diff --git a/testsuite/tests/unparsing/record_type_def/null_record/test.out b/testsuite/tests/unparsing/type_def/record_type_def/null_record/test.out similarity index 100% rename from testsuite/tests/unparsing/record_type_def/null_record/test.out rename to testsuite/tests/unparsing/type_def/record_type_def/null_record/test.out diff --git a/testsuite/tests/unparsing/record_type_def/null_record/test.yaml b/testsuite/tests/unparsing/type_def/record_type_def/null_record/test.yaml similarity index 100% rename from testsuite/tests/unparsing/record_type_def/null_record/test.yaml rename to testsuite/tests/unparsing/type_def/record_type_def/null_record/test.yaml diff --git a/testsuite/tests/unparsing/record_type_def/record_mixed_with_variant/input.ada b/testsuite/tests/unparsing/type_def/record_type_def/record_mixed_with_variant/input.ada similarity index 96% rename from testsuite/tests/unparsing/record_type_def/record_mixed_with_variant/input.ada rename to testsuite/tests/unparsing/type_def/record_type_def/record_mixed_with_variant/input.ada index 22855a39a..ad57aba5c 100644 --- a/testsuite/tests/unparsing/record_type_def/record_mixed_with_variant/input.ada +++ b/testsuite/tests/unparsing/type_def/record_type_def/record_mixed_with_variant/input.ada @@ -1,7 +1,5 @@ type Expr (Kind : Expr_Kind_Type) is record - Count : Integer; - case Kind is when Bin_Op_A | Bin_Op_B => L, R : Expr_Access; diff --git a/testsuite/tests/unparsing/type_def/record_type_def/record_mixed_with_variant/test.out b/testsuite/tests/unparsing/type_def/record_type_def/record_mixed_with_variant/test.out new file mode 100644 index 000000000..f13ea0c03 --- /dev/null +++ b/testsuite/tests/unparsing/type_def/record_type_def/record_mixed_with_variant/test.out @@ -0,0 +1,10 @@ +type Expr (Kind : Expr_Kind_Type) is record + Count : Integer; + case Kind is + when Bin_Op_A | Bin_Op_B => + L, R : Expr_Access; + + when Num => + Val : Integer; + end case; +end record; diff --git a/testsuite/tests/unparsing/record_type_def/record_mixed_with_variant/test.yaml b/testsuite/tests/unparsing/type_def/record_type_def/record_mixed_with_variant/test.yaml similarity index 100% rename from testsuite/tests/unparsing/record_type_def/record_mixed_with_variant/test.yaml rename to testsuite/tests/unparsing/type_def/record_type_def/record_mixed_with_variant/test.yaml diff --git a/testsuite/tests/unparsing/record_type_def/record_with_component_default_expr/input.ada b/testsuite/tests/unparsing/type_def/record_type_def/record_with_component_default_expr/input.ada similarity index 100% rename from testsuite/tests/unparsing/record_type_def/record_with_component_default_expr/input.ada rename to testsuite/tests/unparsing/type_def/record_type_def/record_with_component_default_expr/input.ada diff --git a/testsuite/tests/unparsing/type_def/record_type_def/record_with_component_default_expr/test.out b/testsuite/tests/unparsing/type_def/record_type_def/record_with_component_default_expr/test.out new file mode 100644 index 000000000..9a506034f --- /dev/null +++ b/testsuite/tests/unparsing/type_def/record_type_def/record_with_component_default_expr/test.out @@ -0,0 +1,5 @@ +type Date is record + A : Integer range 1 .. 31 := 15; + B : Real := 0.15; + C : String := "my_str"; +end record; diff --git a/testsuite/tests/unparsing/record_type_def/record_with_component_default_expr/test.yaml b/testsuite/tests/unparsing/type_def/record_type_def/record_with_component_default_expr/test.yaml similarity index 100% rename from testsuite/tests/unparsing/record_type_def/record_with_component_default_expr/test.yaml rename to testsuite/tests/unparsing/type_def/record_type_def/record_with_component_default_expr/test.yaml diff --git a/testsuite/tests/unparsing/record_type_def/record_with_discriminants/input.ada b/testsuite/tests/unparsing/type_def/record_type_def/record_with_discriminants/input.ada similarity index 78% rename from testsuite/tests/unparsing/record_type_def/record_with_discriminants/input.ada rename to testsuite/tests/unparsing/type_def/record_type_def/record_with_discriminants/input.ada index a0bd6d1fe..9b6bdc681 100644 --- a/testsuite/tests/unparsing/record_type_def/record_with_discriminants/input.ada +++ b/testsuite/tests/unparsing/type_def/record_type_def/record_with_discriminants/input.ada @@ -1,3 +1,3 @@ type Point (X,Y : Natural := 0) is record - A,B : Real; + A,B : Real; end record; diff --git a/testsuite/tests/unparsing/type_def/record_type_def/record_with_discriminants/test.out b/testsuite/tests/unparsing/type_def/record_type_def/record_with_discriminants/test.out new file mode 100644 index 000000000..67887247f --- /dev/null +++ b/testsuite/tests/unparsing/type_def/record_type_def/record_with_discriminants/test.out @@ -0,0 +1,3 @@ +type Point (X, Y : Natural := 0) is record + A, B : Real; +end record; diff --git a/testsuite/tests/unparsing/record_type_def/record_with_discriminants/test.yaml b/testsuite/tests/unparsing/type_def/record_type_def/record_with_discriminants/test.yaml similarity index 100% rename from testsuite/tests/unparsing/record_type_def/record_with_discriminants/test.yaml rename to testsuite/tests/unparsing/type_def/record_type_def/record_with_discriminants/test.yaml diff --git a/testsuite/tests/unparsing/record_type_def/record_with_discriminants_null_component/input.ada b/testsuite/tests/unparsing/type_def/record_type_def/record_with_discriminants_null_component/input.ada similarity index 100% rename from testsuite/tests/unparsing/record_type_def/record_with_discriminants_null_component/input.ada rename to testsuite/tests/unparsing/type_def/record_type_def/record_with_discriminants_null_component/input.ada diff --git a/testsuite/tests/unparsing/type_def/record_type_def/record_with_discriminants_null_component/test.out b/testsuite/tests/unparsing/type_def/record_type_def/record_with_discriminants_null_component/test.out new file mode 100644 index 000000000..f5d6c72e1 --- /dev/null +++ b/testsuite/tests/unparsing/type_def/record_type_def/record_with_discriminants_null_component/test.out @@ -0,0 +1,3 @@ +type Point (X, Y : Natural := 0) is record + null; +end record; diff --git a/testsuite/tests/unparsing/record_type_def/record_with_discriminants_null_component/test.yaml b/testsuite/tests/unparsing/type_def/record_type_def/record_with_discriminants_null_component/test.yaml similarity index 100% rename from testsuite/tests/unparsing/record_type_def/record_with_discriminants_null_component/test.yaml rename to testsuite/tests/unparsing/type_def/record_type_def/record_with_discriminants_null_component/test.yaml diff --git a/testsuite/tests/unparsing/type_def/record_type_def/record_with_long_discriminants/input.ada b/testsuite/tests/unparsing/type_def/record_type_def/record_with_long_discriminants/input.ada new file mode 100644 index 000000000..929046eca --- /dev/null +++ b/testsuite/tests/unparsing/type_def/record_type_def/record_with_long_discriminants/input.ada @@ -0,0 +1,6 @@ +type Point + (Xxxxxxxxxxxxx,Yxxxxxxxxxxxxxxx : Natural := 0; + Zzzzzzzzzzzzzzzzzzzzzzzzzz : Real := 0.0) +is record + A,B : Real; +end record; diff --git a/testsuite/tests/unparsing/type_def/record_type_def/record_with_long_discriminants/test.out b/testsuite/tests/unparsing/type_def/record_type_def/record_with_long_discriminants/test.out new file mode 100644 index 000000000..7be47a8dd --- /dev/null +++ b/testsuite/tests/unparsing/type_def/record_type_def/record_with_long_discriminants/test.out @@ -0,0 +1,6 @@ +type Point + (Xxxxxxxxxxxxx, Yxxxxxxxxxxxxxxx : Natural := 0; + Zzzzzzzzzzzzzzzzzzzzzzzzzz : Real := 0.0) +is record + A, B : Real; +end record; diff --git a/testsuite/tests/unparsing/record_type_def/record_with_long_discriminants/test.yaml b/testsuite/tests/unparsing/type_def/record_type_def/record_with_long_discriminants/test.yaml similarity index 100% rename from testsuite/tests/unparsing/record_type_def/record_with_long_discriminants/test.yaml rename to testsuite/tests/unparsing/type_def/record_type_def/record_with_long_discriminants/test.yaml diff --git a/testsuite/tests/unparsing/type_def/record_type_def/record_with_variant/input.ada b/testsuite/tests/unparsing/type_def/record_type_def/record_with_variant/input.ada new file mode 100644 index 000000000..c4d260cbc --- /dev/null +++ b/testsuite/tests/unparsing/type_def/record_type_def/record_with_variant/input.ada @@ -0,0 +1,8 @@ +type Expr (Kind : Expr_Kind_Type) is record + case Kind is + when Bin_Op_A | Bin_Op_B => + L, R : Expr_Access; + when Num => + Val : Integer; + end case; +end record; diff --git a/testsuite/tests/unparsing/type_def/record_type_def/record_with_variant/test.out b/testsuite/tests/unparsing/type_def/record_type_def/record_with_variant/test.out new file mode 100644 index 000000000..0f09c01db --- /dev/null +++ b/testsuite/tests/unparsing/type_def/record_type_def/record_with_variant/test.out @@ -0,0 +1,9 @@ +type Expr (Kind : Expr_Kind_Type) is record + case Kind is + when Bin_Op_A | Bin_Op_B => + L, R : Expr_Access; + + when Num => + Val : Integer; + end case; +end record; diff --git a/testsuite/tests/unparsing/record_type_def/record_with_variant/test.yaml b/testsuite/tests/unparsing/type_def/record_type_def/record_with_variant/test.yaml similarity index 100% rename from testsuite/tests/unparsing/record_type_def/record_with_variant/test.yaml rename to testsuite/tests/unparsing/type_def/record_type_def/record_with_variant/test.yaml diff --git a/testsuite/tests/unparsing/record_type_def/simple_record/input.ada b/testsuite/tests/unparsing/type_def/record_type_def/simple_record/input.ada similarity index 100% rename from testsuite/tests/unparsing/record_type_def/simple_record/input.ada rename to testsuite/tests/unparsing/type_def/record_type_def/simple_record/input.ada diff --git a/testsuite/tests/unparsing/type_def/record_type_def/simple_record/test.out b/testsuite/tests/unparsing/type_def/record_type_def/simple_record/test.out new file mode 100644 index 000000000..c8aeeb3a0 --- /dev/null +++ b/testsuite/tests/unparsing/type_def/record_type_def/simple_record/test.out @@ -0,0 +1,5 @@ +type Date is record + Day : Integer range 1 .. 31; + Month : Month_Enum; + Year : Integer range 0 .. 4000; +end record; diff --git a/testsuite/tests/unparsing/record_type_def/simple_record/test.yaml b/testsuite/tests/unparsing/type_def/record_type_def/simple_record/test.yaml similarity index 100% rename from testsuite/tests/unparsing/record_type_def/simple_record/test.yaml rename to testsuite/tests/unparsing/type_def/record_type_def/simple_record/test.yaml diff --git a/testsuite/tests/unparsing/type_def/signed_int_type_def/long_range/input.ada b/testsuite/tests/unparsing/type_def/signed_int_type_def/long_range/input.ada new file mode 100644 index 000000000..258bc41d3 --- /dev/null +++ b/testsuite/tests/unparsing/type_def/signed_int_type_def/long_range/input.ada @@ -0,0 +1 @@ +type Some_Int_Num_Type is range lllllllllllllllloooooooooooooooooowwwwwwwwwwwwww .. hhhhhhhhhhhiiiiiiiiiiiiiiigggggggggggghhhhhhhhhhhhhh; diff --git a/testsuite/tests/unparsing/signed_int_type_def/long_range/test.out b/testsuite/tests/unparsing/type_def/signed_int_type_def/long_range/test.out similarity index 100% rename from testsuite/tests/unparsing/signed_int_type_def/long_range/test.out rename to testsuite/tests/unparsing/type_def/signed_int_type_def/long_range/test.out diff --git a/testsuite/tests/unparsing/signed_int_type_def/long_range/test.yaml b/testsuite/tests/unparsing/type_def/signed_int_type_def/long_range/test.yaml similarity index 100% rename from testsuite/tests/unparsing/signed_int_type_def/long_range/test.yaml rename to testsuite/tests/unparsing/type_def/signed_int_type_def/long_range/test.yaml diff --git a/testsuite/tests/unparsing/signed_int_type_def/short_range/input.ada b/testsuite/tests/unparsing/type_def/signed_int_type_def/short_range/input.ada similarity index 100% rename from testsuite/tests/unparsing/signed_int_type_def/short_range/input.ada rename to testsuite/tests/unparsing/type_def/signed_int_type_def/short_range/input.ada diff --git a/testsuite/tests/unparsing/signed_int_type_def/short_range/test.out b/testsuite/tests/unparsing/type_def/signed_int_type_def/short_range/test.out similarity index 100% rename from testsuite/tests/unparsing/signed_int_type_def/short_range/test.out rename to testsuite/tests/unparsing/type_def/signed_int_type_def/short_range/test.out diff --git a/testsuite/tests/unparsing/signed_int_type_def/short_range/test.yaml b/testsuite/tests/unparsing/type_def/signed_int_type_def/short_range/test.yaml similarity index 100% rename from testsuite/tests/unparsing/signed_int_type_def/short_range/test.yaml rename to testsuite/tests/unparsing/type_def/signed_int_type_def/short_range/test.yaml diff --git a/testsuite/tests/unparsing/access_type_def/access_all/input.ada b/testsuite/tests/unparsing/type_def/type_access_def/access_all/input.ada similarity index 100% rename from testsuite/tests/unparsing/access_type_def/access_all/input.ada rename to testsuite/tests/unparsing/type_def/type_access_def/access_all/input.ada diff --git a/testsuite/tests/unparsing/access_type_def/access_all/test.out b/testsuite/tests/unparsing/type_def/type_access_def/access_all/test.out similarity index 100% rename from testsuite/tests/unparsing/access_type_def/access_all/test.out rename to testsuite/tests/unparsing/type_def/type_access_def/access_all/test.out diff --git a/testsuite/tests/unparsing/access_type_def/access_all/test.yaml b/testsuite/tests/unparsing/type_def/type_access_def/access_all/test.yaml similarity index 100% rename from testsuite/tests/unparsing/access_type_def/access_all/test.yaml rename to testsuite/tests/unparsing/type_def/type_access_def/access_all/test.yaml diff --git a/testsuite/tests/unparsing/access_type_def/long_subtype_indication/input.ada b/testsuite/tests/unparsing/type_def/type_access_def/long_subtype_indication/input.ada similarity index 100% rename from testsuite/tests/unparsing/access_type_def/long_subtype_indication/input.ada rename to testsuite/tests/unparsing/type_def/type_access_def/long_subtype_indication/input.ada diff --git a/testsuite/tests/unparsing/access_type_def/long_subtype_indication/test.out b/testsuite/tests/unparsing/type_def/type_access_def/long_subtype_indication/test.out similarity index 100% rename from testsuite/tests/unparsing/access_type_def/long_subtype_indication/test.out rename to testsuite/tests/unparsing/type_def/type_access_def/long_subtype_indication/test.out diff --git a/testsuite/tests/unparsing/access_type_def/long_subtype_indication/test.yaml b/testsuite/tests/unparsing/type_def/type_access_def/long_subtype_indication/test.yaml similarity index 100% rename from testsuite/tests/unparsing/access_type_def/long_subtype_indication/test.yaml rename to testsuite/tests/unparsing/type_def/type_access_def/long_subtype_indication/test.yaml diff --git a/testsuite/tests/unparsing/access_type_def/long_type_name/input.ada b/testsuite/tests/unparsing/type_def/type_access_def/long_type_name/input.ada similarity index 100% rename from testsuite/tests/unparsing/access_type_def/long_type_name/input.ada rename to testsuite/tests/unparsing/type_def/type_access_def/long_type_name/input.ada diff --git a/testsuite/tests/unparsing/access_type_def/long_type_name/test.out b/testsuite/tests/unparsing/type_def/type_access_def/long_type_name/test.out similarity index 100% rename from testsuite/tests/unparsing/access_type_def/long_type_name/test.out rename to testsuite/tests/unparsing/type_def/type_access_def/long_type_name/test.out diff --git a/testsuite/tests/unparsing/access_type_def/long_type_name/test.yaml b/testsuite/tests/unparsing/type_def/type_access_def/long_type_name/test.yaml similarity index 100% rename from testsuite/tests/unparsing/access_type_def/long_type_name/test.yaml rename to testsuite/tests/unparsing/type_def/type_access_def/long_type_name/test.yaml diff --git a/testsuite/tests/unparsing/access_type_def/not_null_access/input.ada b/testsuite/tests/unparsing/type_def/type_access_def/not_null_access/input.ada similarity index 100% rename from testsuite/tests/unparsing/access_type_def/not_null_access/input.ada rename to testsuite/tests/unparsing/type_def/type_access_def/not_null_access/input.ada diff --git a/testsuite/tests/unparsing/access_type_def/not_null_access/test.out b/testsuite/tests/unparsing/type_def/type_access_def/not_null_access/test.out similarity index 100% rename from testsuite/tests/unparsing/access_type_def/not_null_access/test.out rename to testsuite/tests/unparsing/type_def/type_access_def/not_null_access/test.out diff --git a/testsuite/tests/unparsing/access_type_def/not_null_access/test.yaml b/testsuite/tests/unparsing/type_def/type_access_def/not_null_access/test.yaml similarity index 100% rename from testsuite/tests/unparsing/access_type_def/not_null_access/test.yaml rename to testsuite/tests/unparsing/type_def/type_access_def/not_null_access/test.yaml diff --git a/testsuite/tests/unparsing/access_type_def/simple_access/input.ada b/testsuite/tests/unparsing/type_def/type_access_def/simple_access/input.ada similarity index 100% rename from testsuite/tests/unparsing/access_type_def/simple_access/input.ada rename to testsuite/tests/unparsing/type_def/type_access_def/simple_access/input.ada diff --git a/testsuite/tests/unparsing/access_type_def/simple_access/test.out b/testsuite/tests/unparsing/type_def/type_access_def/simple_access/test.out similarity index 100% rename from testsuite/tests/unparsing/access_type_def/simple_access/test.out rename to testsuite/tests/unparsing/type_def/type_access_def/simple_access/test.out diff --git a/testsuite/tests/unparsing/access_type_def/simple_access/test.yaml b/testsuite/tests/unparsing/type_def/type_access_def/simple_access/test.yaml similarity index 100% rename from testsuite/tests/unparsing/access_type_def/simple_access/test.yaml rename to testsuite/tests/unparsing/type_def/type_access_def/simple_access/test.yaml