...
 
Commits (2)
......@@ -302,7 +302,7 @@ def choice_adb_image (options : Dict[str, Tuple[str, str]]) -> List [str]:
for field, (EnumID, sort) in options.items():
if not first:
result[-1] += ","
result.append (f'when {EnumID} => {sort}_Pkg.Image (Elm.{field})')
result.append (f'when {EnumID} => "{field}: " & {sort}_Pkg.Image (Elm.{field})')
first = False
return result
......@@ -371,7 +371,7 @@ def choice_adb_template (sort: str, options: Dict[str, Tuple[str, str]]) -> str:
function Image (Elm : asn1Scc{sort}) return String is
begin
return "{{" & {sort}_selection_Pkg.Image (Elm.Kind) & ":"
return "{{"
& (case Elm.Kind is
{indent(18, choice_adb_image(options))})
& "}}";
......
......@@ -33,9 +33,6 @@ procedure test_generic is
use MySeq3_Pkg;
use MySeq4_Pkg;
use MyChoice_Pkg;
--use Boolean_Pkg;
--use MyReal_Pkg;
--use MyInt2_Pkg;
-- Test cases
MyIt : MyInteger_Pkg.Instance;
......@@ -57,6 +54,7 @@ procedure test_generic is
SeqOfEnumItm : asn1SccMySeqOfEnum;
i : Natural := 1;
count : Natural := 0;
package F_IO is new Ada.Text_IO.Float_IO (asn1SccMyReal);
begin
-- test: compute all possible values of the integer type
......@@ -186,7 +184,8 @@ begin
New_Line;
Put_Line ("REAL WITH DISJOINT SET OF VALUES");
for each of Real loop
Put (each'Img & " ");
F_IO.Put (Item => each, Exp => 0, Aft => 3);
Put (" ");
end loop;
New_Line;
New_Line;
......