comp.lang.ada
 help / color / mirror / Atom feed
* Missing ACVC test?  ("Now that's picky!")
@ 1986-08-21 14:54 "Alexander L. Wolf"
  0 siblings, 0 replies; 2+ messages in thread
From: "Alexander L. Wolf" @ 1986-08-21 14:54 UTC (permalink / raw)


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;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Missing ACVC test?  ("Now that's picky!")
@ 1986-08-22 12:37 John B. Goodenough
  0 siblings, 0 replies; 2+ messages in thread
From: John B. Goodenough @ 1986-08-22 12:37 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1986-08-22 12:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1986-08-21 14:54 Missing ACVC test? ("Now that's picky!") "Alexander L. Wolf"
  -- strict thread matches above, loose matches on Subject: below --
1986-08-22 12:37 John B. Goodenough

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox