From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,2273a296de8c1b6d X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Path: g2news2.google.com!news2.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post02.iad.highwinds-media.com!news.flashnewsgroups.com-b7.4zTQh5tI3A!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: ANN: Ahven 1.8 References: <20100602192413.ff36db38.tero.koskinen@iki.fi> <82ocfs1fpv.fsf@stephe-leake.org> <357172d2-0e3f-4700-bcbb-3351f93c8372@s1g2000prf.googlegroups.com> Date: Fri, 04 Jun 2010 05:17:51 -0400 Message-ID: <827hmf17i8.fsf@stephe-leake.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (windows-nt) Cancel-Lock: sha1:39DXYqq/8iLO0HgonnhB+8hmi44= MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: 6e65e4c08c4a1e197caa705071 Xref: g2news2.google.com comp.lang.ada:12241 Date: 2010-06-04T05:17:51-04:00 List-Id: Dan writes: > On Jun 3, 5:08 am, Stephen Leake > 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