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=-0.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, FREEMAIL_REPLY autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,e7f254f57b219148 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.glorb.com!border1.nntp.dca.giganews.com!local01.nntp.dca.giganews.com!nntp.scarlet.biz!news.scarlet.biz.POSTED!not-for-mail NNTP-Posting-Date: Sun, 07 Aug 2005 12:18:57 -0500 Newsgroups: comp.lang.ada Subject: Re: Newbie question: Testing a generic package References: <1123432298.685525.281490@g14g2000cwa.googlegroups.com> From: Ludovic Brenta Date: Sun, 07 Aug 2005 19:20:03 +0200 Message-ID: <87ll3dvf3w.fsf@tiscali.be> User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:f/GDJ2umGRek9GKT8N8j/e3ueks= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Host: 83.134.239.248 X-Trace: sv3-coAGjcPO8fl+BDo7qot2SpZiNxuA/y+6k5RF9eopJphU0idVy5sveFG9FXorubCianLRXxIzuq9l4UQ!I+gyBIM9ZhERG/3BotDGHQky41W0AO486X6sy9wC6PGn1/BQjfM25Iw1r/k70BJ8 X-Complaints-To: abuse@scarlet.be X-DMCA-Complaints-To: abuse@scarlet.biz X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news1.google.com comp.lang.ada:4021 Date: 2005-08-07T19:20:03+02:00 List-Id: "strictly_mk@hotmail.com" writes: > Some of you have guided me to finish this code I was working on which > finaly compiles. What I want to know is, how do I test it? Since it is > a generic package, how do I get the procedures to work so I can test > them? > I'm not to concerned if they actually work or not, i just need to show > that it has been tested. Any suggestions? You need to create an instance of the generic package, and then call the subprograms from the instance. > --specification > generic > type ID is (<>); > package PoP is [...] > end PoP; with Pop; procedure Test_Driver is type Person_ID is range 1 .. 1_000_000; package Instance_Of_Pop is new Pop (ID => Person_ID); begin Instance_Of_Pop.Reset; ... end Test_Driver; -- Ludovic Brenta.