[net.lang.ada] Missing ACVC test?

WOLF%cs.umass.edu@CSNET-RELAY.ARPA ("Alexander L. Wolf") (08/21/86)

Here's a real simple one that the validation suite must not be testing for
(at least, it wasn't caught in the DEC Ada compiler):  'Value is defined to
ignore leading and trailing spaces in its parameter of type String.

  with Text_IO; use Text_IO;
procedure TestValue is
  type E is ( E1, E2, E3 );

  S1 : String ( 1 .. 2 ) := "E1";
  S2 : String ( 1 .. 3 ) := " E2";
  S3 : String ( 1 .. 3 ) := "E3 ";

begin
  if E'Value ( S1 ) = E1 then
    Put_Line ( "S1 = E1" );
  else
    Put_Line ( "S1 /= E1" );
  end if;

  if E'Value ( S2 ) = E2 then
    Put_Line ( "S2 = E2" );
  else
    Put_Line ( "S2 /= E2" );
  end if;

  if E'Value ( S3 ) = E3 then   -- raises Constraint_Error using DEC Ada
    Put_Line ( "S3 = E3" );
  else
    Put_Line ( "S3 /= E3" );
  end if;

end TestValue;

GOODENOUGH@A.ISI.EDU (John B. Goodenough) (08/22/86)

Thanks for pointing out the error.  We'll fix the ACVC tests.
-------