🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.lang.ada
Article #925

Missing ACVC test? ("Now that's picky!")

#925
From: "Alexander L. Wolf"
Date: Thu, 21 Aug 1986 14:54
32 lines
1393 bytes
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;
Technical Details
Message-ID: <8608220641.AA10941@ucbvax.Berkeley.EDU>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!lll-crg!nike!ucbcad!ucbvax!CSNET-RELAY.ARPA!WOLF%cs.umass.edu

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!lll-crg!nike!ucbcad!ucbvax!CSNET-RELAY.ARPA!WOLF%cs.umass.edu
From: WOLF%cs.umass.edu@CSNET-RELAY.ARPA ("Alexander L. Wolf")
Newsgroups: net.lang.ada
Subject: Missing ACVC test?  ("Now that's picky!")
Message-ID: <8608220641.AA10941@ucbvax.Berkeley.EDU>
Date: Thu, 21-Aug-86 10:54:00 EDT
Article-I.D.: ucbvax.8608220641.AA10941
Posted: Thu Aug 21 10:54:00 1986
Date-Received: Fri, 22-Aug-86 09:27:12 EDT
Sender: daemon@ucbvax.BERKELEY.EDU
Organization: The ARPA Internet
Lines: 32