comp.lang.ada
 help / color / mirror / Atom feed
From: Ludovic Brenta <ludovic.brenta@tiscali.be>
Subject: Re: Newbie question: Testing a generic package
Date: Sun, 07 Aug 2005 19:20:03 +0200
Date: 2005-08-07T19:20:03+02:00	[thread overview]
Message-ID: <87ll3dvf3w.fsf@tiscali.be> (raw)
In-Reply-To: 1123432298.685525.281490@g14g2000cwa.googlegroups.com

"strictly_mk@hotmail.com" <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.



       reply	other threads:[~2005-08-07 17:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1123432298.685525.281490@g14g2000cwa.googlegroups.com>
2005-08-07 17:20 ` Ludovic Brenta [this message]
2005-08-07 21:27 ` Newbie question: Testing a generic package tmoran
2005-08-08  5:32   ` Ludovic Brenta
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox