CVS difference for acats/new/cxb30231.am

Differences between 1.1 and version 1.2
Log of other versions for file acats/new/cxb30231.am

--- acats/new/cxb30231.am	2015/11/26 01:30:04	1.1
+++ acats/new/cxb30231.am	2015/12/05 07:10:44	1.2
@@ -83,12 +83,14 @@
 --                    don't want to assume AI12-0174-1 is implemented);
 --                    renamed, used interface names from IMPDEF, added
 --                    Applicability Criteria.
+--    04 Dec 2015 RLB Removed use of non-language-defined function and
+--                    unreliable test.
 
 --!
 
 with Interfaces.C.Strings; use Interfaces;
-with System.Address_Image;
 with Ada.Text_IO;
+with System;
 
 with Report, ImpDef;
 
@@ -171,8 +173,13 @@
             end;
 
          when C_void_pointer =>
-            return "Type: Pointer, Val: " &
-              System.Address_Image (Item.Variant.pointer_Val);
+            raise Program_Error;
+            --return "Type: Pointer, Val: " &
+            --   ??'Image (Item.Variant.pointer_Val);
+            -- No Image function here, and even if we converted to
+            -- Integer_Address, there's no reason to assume that
+            -- System.Address is the same as a C Pointer. So we don't
+            -- test this branch.
 
       end case;
    end Ada_Format_Variant;
@@ -305,43 +312,6 @@
          Report.Failed
            (Descr => "8) Ada interpretation (" & Ada_Output_String & ") " &
               "of union differs from C (" & C.To_Ada (C_Output_String) & ')');
-      end if;
-
-   end;
-
-   Var1 := (Kind => C_void_pointer,
-               Variant =>
-                 (C_void_pointer, C_Char_Array'Address));
-
-   declare
-      Expected_Output   : constant String := "Type: Pointer, Val: ";
-      Ada_Output_String : constant String := Ada_Format_Variant (Var1);
-      C_Output_String   : aliased C.char_array (1 .. 80);
-   begin
-
-      if Ada_Output_String
-        (1 .. Expected_Output'Length) /= Expected_Output
-      then
-
-         Report.Failed
-           (Descr =>
-              "9) Unexpected values (" & Ada_Output_String &
-              ") extracted from unchecked union. Expected: " &
-              Expected_Output);
-      end if;
-
-      -- Call a C routine to generate the same output string
-      C_Format_Variant (Var1'Access,
-                        C_Output_String (C_Output_String'First)'Access);
-
-      if Ada_Output_String (1 .. Expected_Output'Length)
-        /= C.To_Ada (C_Output_String)(1 .. Expected_Output'Length)
-      then
-
-         Report.Failed
-           (Descr => "10) Ada interpretation (" & Ada_Output_String & ") " &
-              "of union differs from C (" &
-              C.To_Ada (C_Output_String) & ')');
       end if;
 
       Var2 := Var1;

Questions? Ask the ACAA Technical Agent