CVS difference for acats/b5/b540001.a

Differences between 1.2 and version 1.3
Log of other versions for file acats/b5/b540001.a

--- acats/b5/b540001.a	2014/05/24 01:29:11	1.2
+++ acats/b5/b540001.a	2018/02/09 04:47:34	1.3
@@ -60,6 +60,8 @@
 --      14 Jan 12   RAD     Initial version.
 --      23 May 14   RLB     Split case statement test into separate
 --                          test; added extra test cases.
+--      08 Feb 18   RLB     Added error location indicators to reflect common
+--                          error reporting strategies.
 --
 --!
 
@@ -78,9 +80,11 @@
    subtype Non_Nil is Non_Zero;
    subtype Small is Integer range 0 .. 20;
    subtype Small_Even is Small
-      with Static_Predicate => Small_Even in 0 | 2 | 4 | 6 | 8 | 10 | 12 | 14 | 16 | 18 | 20;
+      with Static_Predicate => Small_Even in 0 | 2 | 4 | 6 | 8 | 10 |
+                                             12 | 14 | 16 | 18 | 20;
    subtype Small_Odd is Small
-      with Static_Predicate => Small_Odd in 1 | 3 | 5 | 7 | 9 | 11 | 13 | 15 | 17 | 19;
+      with Static_Predicate => Small_Odd in 1 | 3 | 5 | 7 | 9 | 11 | 13 |
+                                           15 | 17 | 19;
    subtype Small_Power_of_Two is Small
       with Static_Predicate => Small_Power_of_Two in 2 | 4 | 8 | 16;
    subtype Small_Power_of_Three is Small
@@ -139,65 +143,68 @@
    procedure Full_Coverage_1 (X : Integer; Y : Colors; Z : Score_Base) is
       -- Check 3.8.1(10.1/4) using 5.4(9/3) and 5.4(10).
    begin
-      case X is                             -- OK.
+      case X is
          when Zero => null;
          when Non_Zero => null;
-      end case;
-      case X is                             -- ERROR: Missing 0.
+      end case;                          -- OK. {3:7;1}
+      case X is
          when Non_Zero => null;
-      end case;
-      case X is                             -- OK.
+      end case;                          -- ERROR: {2:7;1} Missing 0.
+      case X is
          when Nil => null;
          when Non_Nil => null;
-      end case;
-      case X is                             -- ERROR: Missing negatives.
+      end case;                          -- OK. {3:7;1}
+      case X is
          when Nil => null;
          when Positive => null;
-      end case;
-      case X is                             -- ERROR: 1 specified twice.
+      end case;                          -- ERROR: {3:7;1} Missing negatives.
+      case X is
          when Non_Zero => null;
          when 0 | 1 => null;
-      end case;
+      end case;                          -- ERROR: {3:7;1} 1 specified twice.
 
-      case Y is                             -- OK.
+      case Y is
          when Total_Color => null;
          when Rainbow => null;
-      end case;
-      case Y is                             -- ERROR: Missing Black.
+      end case;                          -- OK. {3:7;1}
+      case Y is
          when Primary_Color => null;
          when Secondary_Color => null;
          when White => null;
-      end case;
-      case Y is                             -- ERROR: Red, Yellow, Blue specified twice.
+      end case;                          -- ERROR: {4:7;1} Missing Black.
+      case Y is
          when Primary => null;
          when Rainbow => null;
          when Total_Color => null;
-      end case;
-      case Y is                             -- ERROR: Missing Blue.
+      end case;                          -- ERROR: {4:7;1} Red, Yellow, Blue
+                                         --                specified twice.
+      case Y is
          when Red | Yellow => null;
          when Secondary => null;
          when Black => null;
          when White => null;
-      end case;
+      end case;                          -- ERROR: {5:7;1} Missing Blue.
 
-      case Z is                             -- ERROR: Many overlapping scores.
+      case Z is
          when Single => null;
          when Double => null;
          when Treble => null;
          when others => null;
-      end case;
-      case Z is                             -- OK.
+      end case;                          -- ERROR: {5:7;1} Many overlapping
+                                         --                scores.
+      case Z is
          when Score => null;
          when 0 | 23 | 29 | 31 | 35 | 37 | 41 | 43 | 44 | 46 | 47 | 49 |
               52 | 53 | 55 | 56 | 58 | 59 | 61 | 62 | 63  => null;
-      end case;
-      case Z is                             -- ERROR: Primes over 20 missing.
+      end case;                          -- OK. {4:7;1}
+      case Z is
          when Single => null;
          when Double_Only => null;
          when Treble_Only => null;
          when 25 | 50 => null;
          when 0 | 61 .. 63 => null;
-      end case;
+      end case;                          -- ERROR: {6:7;1} Primes over 20
+                                         --                missing.
    end Full_Coverage_1;
 
 
@@ -207,47 +214,48 @@
       -- Check 5.4(7/4), all of the values satisfied by the predicates of
       -- the case selecting expression must be covered.
    begin
-      case X is                             -- OK.
+      case X is
          when 0 | 2 | 4 => null;
          when 6 | 8 | 10 | 12 | 14 | 16 => null;
          when 18 | 20 => null;
-      end case;
-      case X is                             -- ERROR: 0, 6, and 20 missing.
+      end case;                          -- OK. {4:7;1}
+      case X is
          when Small_Power_of_Two => null;
          when 10 | 12 | 14 | 18 => null;
-      end case;
+      end case;                          -- ERROR: {3:7;1} 0, 6, and 20 missing
 
-      case Y is                             -- ERROR: Indigo missing.
+      case Y is
          when Orange => null;
          when Green => null;
          when Violet => null;
          when Primary_Color => null;
-      end case;
-      case Y is                             -- ERROR: Blue missing.
+      end case;                          -- ERROR: {5:7;1} Indigo missing.
+      case Y is
          when Secondary_Color => null;
          when Red => null;
          when Yellow => null;
-      end case;
-      case Y is                             -- ERROR: Green missing.
+      end case;                          -- ERROR: {4:7;1} Blue missing.
+      case Y is
          when Red .. Yellow => null;
          when Blue .. Violet => null;
-      end case;
+      end case;                          -- ERROR: {3:7;1} Green missing.
 
-      case Z is                             -- OK.
+      case Z is
          when Treble_Only => null;
          when 3 | 6 | 9 | 12 | 15 | 18 => null;
          when 24 | 30 | 36 => null;
-      end case;
-      case Z is                             -- ERROR: 24, 30, 36 missing.
+      end case;                          -- OK. {4:7;1}
+      case Z is
          when 3 | 6 | 9 => null;
          when Treble_Only => null;
          when 12 | 15 | 18 => null;
-      end case;
-      case Z is                             -- ERROR: Values over 40 missing.
+      end case;                          -- ERROR: {4:7;1} 24, 30, 36 missing.
+      case Z is
          when 3 | 6 | 9 | 12 | 15 | 18 => null;
          when 24 | 30 | 36 => null;
          when 21 | 27 | 33 | 39 => null;
-      end case;
+      end case;                          -- ERROR: {4:7;1} Values over 40
+                                         --                missing.
    end Full_Coverage_2;
 
 
@@ -257,76 +265,76 @@
       -- Check 5.4(7/4), no extra values outside of the subtype of the
       -- the case selecting expression.
    begin
-      case X is                             -- OK.
+      case X is
          when 2 | 4 => null;
          when 8 | 16 => null;
-      end case;
+      end case;                          -- OK. {3:7;1}
       case X is
-         when 2 | 4 | 6 => null;            -- ERROR: 6 not a power of two.
+         when 2 | 4 | 6 => null;         -- ERROR: {1:7;9} 6 not a power of two
          when 8 | 16 => null;
       end case;
       case X is
-         when 2..4 => null;                 -- ERROR: 3 not a power of two.
+         when 2..4 => null;              -- ERROR: {1:7;9} 3 not a power of two
          when 8 | 16 => null;
       end case;
       case X is
-         when Small_Even => null;           -- ERROR: Many not allowed values.
-         when others => null;
+         when Small_Even => null;        -- ERROR: {1:7;9} Many not allowed
+         when others => null;            --                values.
       end case;
       case X is
-         when Small_Power_of_Two => null;   -- OK.
+         when Small_Power_of_Two => null;-- OK. {1:7;9}
          when others => null;
       end case;
 
-      case Y is                             -- OK.
+      case Y is
          when Yellow => null;
          when Blue => null;
          when Red => null;
-      end case;
+      end case;                          -- OK. {4:7;1}
       case Y is
          when Yellow => null;
          when Blue => null;
          when Red => null;
-         when Green => null;                -- ERROR: Not a primary_color.
+         when Green => null;             -- ERROR: {4:7;9} Not a primary color.
          when others => null;
       end case;
       case Y is
-         when Primary => null;              -- OK.
+         when Primary => null;           -- OK. {1:7;9}
       end case;
       case Y is
-         when Red .. Yellow => null;        -- ERROR: Orange not a primary color.
-         when Blue => null;
+         when Red .. Yellow => null;     -- ERROR: {1:7;9} Orange not a primary
+         when Blue => null;              --                color.
       end case;
       case Y is
-         when Red | Yellow .. Blue => null; -- ERROR: Green not a primary color.
-         when others => null;
+         when Red | Yellow .. Blue => null; -- ERROR: {1:7;9} Green not a
+         when others => null;               --                primary color.
       end case;
       case Y is
          when Yellow => null;
          when Blue => null;
          when Red => null;
-         when Secondary_Color => null;      -- ERROR: Not primary colors.
-         when Total_Color => null;          -- ERROR: Not primary colors.
+         when Secondary_Color => null;   -- ERROR: {4:7;9} Not primary colors.
+         when Total_Color => null;       -- ERROR: {10;9} Not primary colors.
       end case;
 
       case Z is
-         when Single => null;               -- ERROR: Odd values included.
-         when Double_Only => null;          -- OK.
+         when Single => null;            -- ERROR: {1:7;9} Odd values included.
+         when Double_Only => null;       -- OK. {10;9}
          when others => null;
       end case;
       case Z is
-         when 6 | 9 | 12 | 15 | 18 => null; -- ERROR: 9 and 15 not doubles.
-         when 2 | 4 => null;
+         when 6 | 9 | 12 | 15 | 18 => null;-- ERROR: {1:7;9} 9 and 15 not
+         when 2 | 4 => null;               --                doubles.
          when others => null;
       end case;
       case Z is
-         when 2 .. 40 => null;              -- ERROR: Odd values not doubles.
-         when others => null;
+         when 2 .. 40 => null;           -- ERROR: {1:7;9} Odd values not
+         when others => null;            --                doubles.
       end case;
       case Z is
          when 2 | 4 | 8 | 10 | 14 | 16 | 20 | 22 | 26 | 28 => null;
-         when Treble => null;               -- ERROR: Odd values not doubles.
-         when others => null;
+         when Treble => null;            -- ERROR: {2:7;9} Odd values not
+         when others => null;            --                doubles.
       end case;
    end No_Extra_Values;
 
@@ -335,34 +343,34 @@
       -- Check 5.4(5/3) for the case of subtypes that have a dynamic predicate.
    begin
       case X is
-         when Even => null;                 -- ERROR: Not static.
+         when Even => null;                 -- ERROR: {1:7;9} Not static.
          when others => null;
       end case;
       case Small'(X) is
-         when Dyn_Small_Even => null;       -- ERROR: Not static.
+         when Dyn_Small_Even => null;       -- ERROR: {1:7;9} Not static.
          when Small_Odd     => null;
       end case;
       case Small'(X) is
-         when Small_Even_Still_Dyn => null; -- ERROR: Not static.
+         when Small_Even_Still_Dyn => null; -- ERROR: {1:7;9} Not static.
          when Small_Odd     => null;
       end case;
 
       case Y is
          when Total_Color => null;
-         when Dyn_Rainbow => null;          -- ERROR: Not static.
+         when Dyn_Rainbow => null;          -- ERROR: {2:7;9} Not static.
       end case;
       case Y is
          when Total_Color => null;
-         when Dyn_Primary => null;          -- ERROR: Not static.
+         when Dyn_Primary => null;          -- ERROR: {2:7;9} Not static.
          when Secondary   => null;
       end case;
 
       case Z is
-         when Dyn_Treble | 0 | 25 | 50 => null; -- ERROR: Not static.
+         when Dyn_Treble | 0 | 25 | 50 => null; -- ERROR: {1:7;9} Not static.
          when others => null;
       end case;
       case Z is
-         when Dyn_Treble_and_Single => null; -- ERROR: Not static.
+         when Dyn_Treble_and_Single => null; -- ERROR: {1:7;9} Not static.
          when Double_Only => null;
          when others => null;
       end case;

Questions? Ask the ACAA Technical Agent