comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <rm.dash-bauhaus@futureapps.de>
Subject: Re: AUnit: access to local procedure needed when asserting exception
Date: Tue, 06 Dec 2011 22:42:35 +0100
Date: 2011-12-06T22:42:36+01:00	[thread overview]
Message-ID: <4ede8c4c$0$6570$9b4e6d93@newsspool4.arcor-online.net> (raw)
In-Reply-To: <m239cxbh9y.fsf@pushface.org>

On 06.12.11 21:02, Simon Wright wrote:

>>     procedure Generic_Assert_Exception
>>       (Message : String;
>>        Source  : String := GNAT.Source_Info.File;
>>        Line    : Natural := GNAT.Source_Info.Line) is
>>     begin
>>        begin
>>           Proc;
>>        exception
>>           when others =>
>             ^^^^^^^^^^^
>
> I quite often want to make sure that a specific exception has been
> raised.

Yes, me too. However, just like AUnit has only one Assert---suggesting
that we should use Ada operators for different comparisons---I'd make
the specific exception logic part of the operation. Then I have a kind
of symmetry or mapping: I'd use operators with Assert and
procedure'access (or generic actual) with Assert_Exception.





      reply	other threads:[~2011-12-06 21:42 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
2011-12-06 18:16   ` Georg Bauhaus
2011-12-06 20:02     ` Simon Wright
2011-12-06 21:42       ` Georg Bauhaus [this message]
replies disabled

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