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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,88ed72d98e6b3457 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-10-11 00:03:11 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!nycmny1-snh1.gtei.net!nycmny1-snf1.gtei.net!news.gtei.net!colt.net!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Standard Library Interest? Date: 11 Oct 2003 08:01:07 +0100 Organization: Pushface Sender: simon@smaug.pushface.org Message-ID: References: <3F7F760E.2020901@comcast.net> <3F8035B0.7080902@noplace.com> <3F816A35.4030108@noplace.com> <3F81FBEC.9010103@noplace.com> <6Ingb.30667$541.13861@nwrdny02.gnilink.net> <3F82B4A4.5060301@noplace.com> <3F82F527.3020101@noplace.com> <3F846B5E.9080502@comcast.net> <3F855460.6020804@noplace.com> NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1065855785 11494 62.49.19.209 (11 Oct 2003 07:03:05 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Sat, 11 Oct 2003 07:03:05 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 Xref: archiver1.google.com comp.lang.ada:653 Date: 2003-10-11T08:01:07+01:00 List-Id: "Warren W. Gay VE3WWG" writes: > The general idea is good (provision for testing), but I don't like > the child package idea. It enjoys a different visibility as a child > package, than the consumer of the package would enjoy. Thus, I don't > think the tests would be accurate to the "user experience" as they > need to be. The tests need to make sure the unit under test works right. Some tests will involve the interface, some need to get at the insides, some need to do both. > I would suggest that the test packages and programs, fall under > their own heirarchy, complete and separate from the library > units. After all, if I test the libraries at install time, I may > want to dispense with the test files after the fact. It is easy to > dispense with the test packages, if they are separated from the end > product. The directory hierarchy and the unit hierarchy don't need to match (with GNAT, anyway, & OA almost for sure). So you can put child units (for peering at internals) in the test code directory. One impact of this style is that you may have to put things in the private part of the spec that you would otherwise put in the body -- but if you can't test the code you need to inspect[0] it and that can be a much more expensive process. Of course your standards may require inspection anyway in which case there's no difference -- in theory, though personally I'm much more comfortable with a good test suite than inspection[1] (this is heresy, by the way, don't let on!). [0] Fagan inspection [1] especially for iterative development & code whose requirements change