Skip to content

Commit

Permalink
dda/basic: reorganize test sources
Browse files Browse the repository at this point in the history
  • Loading branch information
pmderodat committed Dec 19, 2024
1 parent 7b5566f commit 246b467
Show file tree
Hide file tree
Showing 18 changed files with 239 additions and 202 deletions.
4 changes: 4 additions & 0 deletions testsuite/tests/dda/basic/arrays.ads
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package Arrays is
type Bool_Array is array (Positive range <>) of Boolean;
subtype Bool_Couple is Bool_Array (1 .. 2);
end Arrays;
18 changes: 18 additions & 0 deletions testsuite/tests/dda/basic/arrays.ads.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[
{
"name": "Arrays.Bool_Array",
"location": "arrays.ads:2:9",
"Alignment": 1,
"Component_Size": 8,
"Scalar_Storage_Order": "System.Low_Order_First"
}
,
{
"name": "Arrays.Bool_Couple",
"location": "arrays.ads:3:12",
"Size": 16,
"Alignment": 1,
"Component_Size": 8,
"Scalar_Storage_Order": "System.Low_Order_First"
}
]
3 changes: 3 additions & 0 deletions testsuite/tests/dda/basic/enums.ads
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package Enums is
type E1 is (A, B, C, D);
end Enums;
9 changes: 9 additions & 0 deletions testsuite/tests/dda/basic/enums.ads.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[
{
"name": "Enums.E1",
"location": "enums.ads:2:9",
"Object_Size": 8,
"Value_Size": 2,
"Alignment": 1
}
]
6 changes: 6 additions & 0 deletions testsuite/tests/dda/basic/fixed.ads
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package Fixed is
type F1 is delta 0.1 range -1.0 .. 1.0;
type F2 is delta 0.1 range -1.0 .. 1.0 with Small => 0.03333333;
type F3 is delta 0.1 range -1.0 .. 1.0 with Small => 1.0 / 30.0;
type F4 is delta 0.1 digits 14;
end Fixed;
41 changes: 41 additions & 0 deletions testsuite/tests/dda/basic/fixed.ads.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[
{
"name": "Fixed.F1",
"location": "fixed.ads:2:9",
"Object_Size": 8,
"Value_Size": 6,
"Alignment": 1,
"Small": { "code": "/", "operands": [ 1.0, 4.0 ] },
"Range": [ { "code": "/", "operands": [ -16.0, 4.0 ] }, { "code": "/", "operands": [ 16.0, 4.0 ] } ]
}
,
{
"name": "Fixed.F2",
"location": "fixed.ads:3:9",
"Object_Size": 8,
"Value_Size": 6,
"Alignment": 1,
"Small": 3.333333E-2,
"Range": [ -1.03333323E0, 1.03333323E0 ]
}
,
{
"name": "Fixed.F3",
"location": "fixed.ads:4:9",
"Object_Size": 8,
"Value_Size": 6,
"Alignment": 1,
"Small": { "code": "/", "operands": [ 1.0, 30.0 ] },
"Range": [ -1.0, 1.0 ]
}
,
{
"name": "Fixed.F4",
"location": "fixed.ads:5:9",
"Object_Size": 64,
"Value_Size": 48,
"Alignment": 8,
"Small": 0.1,
"Range": [ -9999999999999.9, 9999999999999.9 ]
}
]
3 changes: 3 additions & 0 deletions testsuite/tests/dda/basic/ints.ads
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package Ints is
type I1 is range -256 .. 255;
end Ints;
9 changes: 9 additions & 0 deletions testsuite/tests/dda/basic/ints.ads.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[
{
"name": "Ints.I1",
"location": "ints.ads:2:9",
"Object_Size": 16,
"Value_Size": 9,
"Alignment": 2
}
]
4 changes: 4 additions & 0 deletions testsuite/tests/dda/basic/mods.ads
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package Mods is
type M1 is mod 2 ** 15;
type M2 is mod 2 ** 32;
end Mods;
16 changes: 16 additions & 0 deletions testsuite/tests/dda/basic/mods.ads.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[
{
"name": "Mods.M1",
"location": "mods.ads:2:9",
"Object_Size": 16,
"Value_Size": 15,
"Alignment": 2
}
,
{
"name": "Mods.M2",
"location": "mods.ads:3:9",
"Size": 32,
"Alignment": 4
}
]
31 changes: 0 additions & 31 deletions testsuite/tests/dda/basic/pkg.ads

This file was deleted.

150 changes: 0 additions & 150 deletions testsuite/tests/dda/basic/pkg.ads.json

This file was deleted.

5 changes: 5 additions & 0 deletions testsuite/tests/dda/basic/reals.ads
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package Reals is
type R1 is digits 7;
type R2 is digits 7 range 0.0 .. 1.0;
type R3 is new Float;
end Reals;
22 changes: 22 additions & 0 deletions testsuite/tests/dda/basic/reals.ads.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[
{
"name": "Reals.R1",
"location": "reals.ads:2:9",
"Size": 64,
"Alignment": 8
}
,
{
"name": "Reals.R2",
"location": "reals.ads:3:9",
"Size": 64,
"Alignment": 8
}
,
{
"name": "Reals.R3",
"location": "reals.ads:4:9",
"Size": 32,
"Alignment": 4
}
]
9 changes: 9 additions & 0 deletions testsuite/tests/dda/basic/records.ads
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package Records is
type Rec1 is record
B : Boolean;
C : Character;
I : Integer;
end record;

type Rec2 is null record;
end Records;
41 changes: 41 additions & 0 deletions testsuite/tests/dda/basic/records.ads.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[
{
"name": "Records.Rec1",
"location": "records.ads:2:9",
"Size": 64,
"Alignment": 4,
"record": [
{
"name": "B",
"Position": 0,
"First_Bit": 0,
"Size": 8
},
{
"name": "C",
"Position": 1,
"First_Bit": 0,
"Size": 8
},
{
"name": "I",
"Position": 4,
"First_Bit": 0,
"Size": 32
}
],
"Bit_Order": "System.Low_Order_First",
"Scalar_Storage_Order": "System.Low_Order_First"
}
,
{
"name": "Records.Rec2",
"location": "records.ads:8:9",
"Size": 0,
"Alignment": 1,
"record": [
],
"Bit_Order": "System.Low_Order_First",
"Scalar_Storage_Order": "System.Low_Order_First"
}
]
Loading

0 comments on commit 246b467

Please sign in to comment.