comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: AUnit: access to local procedure needed when asserting exception
Date: Tue, 06 Dec 2011 12:25:13 +0000
Date: 2011-12-06T12:25:13+00:00	[thread overview]
Message-ID: <m27h29c2fq.fsf@pushface.org> (raw)
In-Reply-To: 4edd6c0a$0$6581$9b4e6d93@newsspool3.arcor-online.net

Georg Bauhaus <rm.dash-bauhaus@futureapps.de> writes:

> Consequently, when seeing procedure Test_Null mostly reproduced below,
> the compiler diagnoses (correctly, I think)
>
>     66.       AUnit.Assertions.Assert_Exception (Null_Raises'Access,
>                                                  |
>         >>> subprogram must not be deeper than access type

At this point I tend to just use 'Unrestricted_Access.

I've never quite understood the point of this facility, what's wrong
with

   begin
      --  do whatever should raise The_Exception
      Assert (C, False, "should have raised The_Exception");
   exception
      when The_Exception => null;
   end;



  parent reply	other threads:[~2011-12-06 12:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-06  1:12 AUnit: access to local procedure needed when asserting exception Georg Bauhaus
2011-12-06 11:00 ` Georg Bauhaus
2011-12-06 12:25 ` Simon Wright [this message]
2011-12-06 18:16   ` Georg Bauhaus
2011-12-06 20:02     ` Simon Wright
2011-12-06 21:42       ` Georg Bauhaus
replies disabled

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