From 0f572c4dccac8cd6a149bbc88c9d8423e9c71ce9 Mon Sep 17 00:00:00 2001 From: Emmanuel Briot Date: Mon, 28 Aug 2023 07:32:53 +0200 Subject: [PATCH] Add test for #6 --- test/corpus/choices.txt | 45 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 test/corpus/choices.txt diff --git a/test/corpus/choices.txt b/test/corpus/choices.txt new file mode 100644 index 0000000..25fe11f --- /dev/null +++ b/test/corpus/choices.txt @@ -0,0 +1,45 @@ +================================================================================ +Discrete Choices and characters +================================================================================ + +declare + type Color_Type is (Red, 'W'); + Color : Color_Type := 'W'; +begin + case Color is + when Red => null; + when 'W' => null; + end case; +end; + +-------------------------------------------------------------------------------- +(compilation + (compilation_unit + (block_statement + (non_empty_declarative_part + (full_type_declaration + (identifier) + (enumeration_type_definition + (identifier) + (character_literal))) + (object_declaration + (identifier) + (identifier) + (expression + (term + (character_literal))))) + (handled_sequence_of_statements + (case_statement + (expression + (term + (identifier))) + (case_statement_alternative + (discrete_choice_list + (discrete_choice + (identifier))) + (null_statement)) + (case_statement_alternative + (discrete_choice_list + (discrete_choice + (character_literal))) + (null_statement)))))))