comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <stephen_leake@stephe-leake.org>
Subject: Re: ANN: Ahven 1.8
Date: Fri, 04 Jun 2010 05:17:51 -0400
Date: 2010-06-04T05:17:51-04:00	[thread overview]
Message-ID: <827hmf17i8.fsf@stephe-leake.org> (raw)
In-Reply-To: 357172d2-0e3f-4700-bcbb-3351f93c8372@s1g2000prf.googlegroups.com

Dan <dan@irvine.com> writes:

> On Jun 3, 5:08 am, Stephen Leake <stephen_le...@stephe-leake.org>
> wrote:
>> How does it compare to AUnit?
>
> I am able to use Ahven in a table-driven manner, as shown below.
> But I don't see a way to use AUnit similarly (replacing the Ahven-
> specific code below the line of dashes).
>
>
> ... 

> with p1, p2, p3;
> with test_suite; use test_suite;
> package p_suite is new test_suite.suites(
>      suite_name => "p",
>      suite_arr => (
>         (p1'access, +"p1"),
>         (p2'access, +"p3"),
>         (p3'access, +"p3")));

In AUnit, tests are 'registered' in a test_case:

   overriding procedure Register_Tests (T : in out Test_Case)
   is
   begin
        Register_Routine (T, Nominal'Access, "Nominal");
        Register_Routine (T, Commands'Access, "Commands");
        Register_Routine (T, Glitches'Access, "Glitches");
        Register_Routine (T, Multi_Cycle'Access, "Multi_Cycle");
  end Register_Tests;

Then test_cases are added to suites:

   Add_Test (Suite, new Test_Hardware.Analog_In_Out_Wrappers.Test_Case);
   Add_Test (Suite, new Test_Hardware.Analog_In_Wrapper_Common.Test_Case);
   Add_Test (Suite, new Test_Hardware.Analog_Out_Wrapper_Common.Test_Case);

This seems roughly equivalent to Ahven. 

AUnit also has setup and teardown functions for initializing and finalizing
each test and/or each Test_Case; those are very helpful.

-- 
-- Stephe



  parent reply	other threads:[~2010-06-04  9:17 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-02 16:24 ANN: Ahven 1.8 Tero Koskinen
2010-06-03 12:08 ` Stephen Leake
2010-06-03 19:36   ` Dan
2010-06-03 19:43     ` Dan
2010-06-04  9:17     ` Stephen Leake [this message]
2010-06-04 15:37       ` Tero Koskinen
2010-06-05 12:41         ` Simon Wright
2010-06-05 19:17           ` Ludovic Brenta
2010-06-06 12:31             ` Stephen Leake
2010-06-06 16:20               ` Ludovic Brenta
2010-06-06 16:45                 ` Simon Wright
2010-06-06 17:48                   ` Ludovic Brenta
2010-06-07  8:26                 ` Stephen Leake
2010-06-07 19:21                   ` Simon Wright
2010-06-04 17:12       ` Dan
2010-06-05  4:08         ` Stephen Leake
2010-06-08 15:24 ` Jérôme Haguet
replies disabled

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