2016-11-21 Thomas Preud'homme <thomas.preudhomme@arm.com>
[official-gcc.git] / gcc / testsuite / gnat.dg / array3.adb
blob79769256370564adc2095285213c6d42c9e1e108
1 -- { dg-do run }
3 with Ada.Containers.Vectors;
4 with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
5 procedure array3 is
6 type Method_Kinds is (Signal, Slot, Method);
8 package Unbounded_String_Vectors is
9 new Ada.Containers.Vectors
10 (Positive, Ada.Strings.Unbounded.Unbounded_String);
12 Params_Vector : Unbounded_String_Vectors.Vector;
14 type Method_Info is record
15 Name : Ada.Strings.Unbounded.Unbounded_String;
16 Signature : Ada.Strings.Unbounded.Unbounded_String;
17 Parameters : Unbounded_String_Vectors.Vector;
18 Kind : Method_Kinds;
19 end record;
21 package Method_Info_Vectors is
22 new Ada.Containers.Vectors (Positive, Method_Info);
24 Signals : Method_Info_Vectors.Vector;
25 begin
27 Unbounded_String_Vectors.Append
28 (Params_Vector,
29 Ada.Strings.Unbounded.To_Unbounded_String ("AAA"));
31 Method_Info_Vectors.Append
32 (Signals,
33 (Name => To_Unbounded_String (""),
34 Signature => To_Unbounded_String (""),
35 Parameters => Params_Vector,
36 Kind => Signal));
37 end;