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,ASCII Path: g2news2.google.com!postnews.google.com!s1g2000prf.googlegroups.com!not-for-mail From: Dan Newsgroups: comp.lang.ada Subject: Re: ANN: Ahven 1.8 Date: Thu, 3 Jun 2010 12:36:08 -0700 (PDT) Organization: http://groups.google.com Message-ID: <357172d2-0e3f-4700-bcbb-3351f93c8372@s1g2000prf.googlegroups.com> References: <20100602192413.ff36db38.tero.koskinen@iki.fi> <82ocfs1fpv.fsf@stephe-leake.org> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1275593768 20947 127.0.0.1 (3 Jun 2010 19:36:08 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 3 Jun 2010 19:36:08 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: s1g2000prf.googlegroups.com; posting-host=66.126.103.122; posting-account=mj1SqQkAAAC-ugS7xMajTlZAhqdqcRbD User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.14) Gecko/2009090216 Ubuntu/9.04 (jaunty) Firefox/3.0.14,gzip(gfe) Xref: g2news2.google.com comp.lang.ada:12231 Date: 2010-06-03T12:36:08-07:00 List-Id: On Jun 3, 5:08=A0am, 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 text_io; procedure p1 is begin text_io.put_line("in p1"); end; with text_io; procedure p2 is begin text_io.put_line("in p2"); end; with text_io; procedure p3 is begin text_io.put_line("in p3"); end; with text_io; procedure q1 is begin text_io.put_line("in q1"); end; with text_io; procedure q2 is begin text_io.put_line("in q2"); end; with text_io; procedure q3 is begin text_io.put_line("in q3"); end; package test_suite is type proc_access is access procedure; type rec is record proc: proc_access; name: access string; end record; type suite_type is array(natural range <>) of rec; generic suite_name: string; suite_arr: suite_type; package suites is end suites; function "+"(s: string) return access string; end test_suite; package body test_suite is function "+"(s: string) return access string is begin return new string'(s); end; end test_suite; with p1, p2, p3; with test_suite; use test_suite; package p_suite is new test_suite.suites( suite_name =3D> "p", suite_arr =3D> ( (p1'access, +"p1"), (p2'access, +"p3"), (p3'access, +"p3"))); with test_suite; use test_suite; package q_suite is new test_suite.suites( suite_name =3D> "q", suite_arr =3D> ( (q1'access, +"q1"), (q2'access, +"q3"), (q3'access, +"q3"))); ------------------------------------------------------------------- with ahven.framework; with test_suite; generic S : Ahven.Framework.Test_Suite_Access; with package the_suite is new test_suite.suites(<>); package one_suite is type test is new ahven.framework.test_case with null record; procedure initialize (T: in out test); end; package body one_suite is procedure initialize (T: in out test) is begin set_name(T, the_suite.suite_name); for i in the_suite.suite_arr'range loop ahven.framework.add_test_routine (T, ahven.framework.Simple_Test_Routine_Access( the_suite.suite_arr(i).proc), the_suite.suite_arr(i).name.all); end loop; end; begin Ahven.Framework.Add_Test (S.all, new Test); end one_suite; with p_suite; with q_suite; with one_suite; with ahven.framework; package all_suites is S : Ahven.Framework.Test_Suite_Access :=3D Ahven.Framework.Create_Suite ("acats C tests"); package suite_p is new one_suite(S, p_suite); package suite_q is new one_suite(S, q_suite); end all_suites; with all_suites; use all_suites; with Ahven.Text_Runner; with Ahven.Framework; procedure main is begin Ahven.Text_Runner.Run (S); Ahven.Framework.Release_Suite (S); end main;