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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,595c75298fbdce96 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Path: g2news1.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!usenet-fr.net!gegeweb.org!aioe.org!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: Is Aunit helpful? Date: Fri, 13 Aug 2010 18:43:19 +0200 Organization: Ada At Home Message-ID: References: <8a1e58c0-2330-4475-8013-97df103dd85e@o19g2000yqb.googlegroups.com> <82r5ids1o9.fsf@stephe-leake.org> <20100805211820.52c18cb5.tero.koskinen@iki.fi> <8d166cfb-4850-42b6-ac25-d9ac00df7565@q35g2000yqn.googlegroups.com> NNTP-Posting-Host: M2yP1Cx/h9YxW/Ct5b534Q.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 User-Agent: Opera Mail/10.60 (Win32) Xref: g2news1.google.com comp.lang.ada:13227 Date: 2010-08-13T18:43:19+02:00 List-Id: Le Thu, 05 Aug 2010 22:39:00 +0200, Ada novice a =C3=A9cr= it: > gnatmake -Pcalc > ./harness -v It seems there is another GNAT 2010 trick here. In project files (*.gpr = = files), this may be required to turn all "-gnatwa.Xe" into "-gnatwa.X". = = "-gnatwa.Xe" tells GPRBuild to treat warnings as error, and there are = warnings like =E2=80=9Cmath-test.adb:13:07: warning: call to obsolescent procedure "As= sert" = declared at aunit-assertions.ads:113=E2=80=9D which occurs and would otherwise makes the compilation failed (as this e= nd = up to be treated as error). About AUnit: just seen about what it is, how it is set up and how it = works. Seems a question is still pending : =E2=80=9Chow to be sure the t= est cover = all relevant case ?=E2=80=9D. I do not see a way to be sure testing cove= r all = cases. That is the main limitation of this kind of approach. May be this= = is nice for regression tests and tests cases revealed during application= 's = life time... however, I don't believe this can be used too much soon in = a = development stage. Pretty sure this is best used just after real use or = = deployment has been started. -- = There is even better than a pragma Assert: a SPARK --# check. --# check C and WhoKnowWhat and YouKnowWho; --# assert Ada; -- i.e. forget about previous premises which leads to conclusion -- and start with new conclusion as premise.