comp.lang.ada
 help / color / mirror / Atom feed
From: agate!howland.reston.ans.net!zaphod.mps.ohio-state.edu!darwin.sura.net!ha ven.umd.edu!news.umbc.edu!nobody@ucbvax.Berkeley.EDU  (Mike Berman)
Subject: Re: testing Generics
Date: 9 Mar 93 05:26:24 GMT	[thread overview]
Message-ID: <1nh9q0INNcm8@umbc7.umbc.edu> (raw)

In article <8MAR199313194203@bambam> nbssal@bambam (Stephe Leake) writes:

>In article <226@hathor.CSS.GOV>, jeffe@hathor.CSS.GOV (Jeff Etrick) writes...
>>I wanted to know what the net's opion on generic testing was.

>Part of the point of using a generic is that it reduces testing. If you have a
 
>generic that accepts a generic scalar type parameter, you do not need to test 
it
>will all possible scalar types (a totally impossible task!); you only need to
>test it with representative samples from each class; integer, enumeration.

Keep in mind that this testing can be more rigorous than testing of
non-generic code. By its very nature, a generic is usable (after
instantiation, of course) over an entire class of types. The tester has
to consider all possible forms of instantiations. If your generic has
several formal type parameters, all 'private', then there are a lot of
possibilities!

Where the real benefit lies is in reuse. If the same generic code is
used by several applications, then the likelihood of bugs being found
and corrected is quite high. This is what makes component libraries
appealing.

>Stephen Leake	NASA Goddard Robotics Lab
>internet : nbssal@robots.gsfc.nasa.gov


-- 
Mike Berman
University of Maryland, Baltimore County	Fastrak Training, Inc.
berman@umbc.edu					(301)924-0050

             reply	other threads:[~1993-03-09  5:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-03-09  5:26 agate!howland.reston.ans.net!zaphod.mps.ohio-state.edu!darwin.sura.net!ha [this message]
  -- strict thread matches above, loose matches on Subject: below --
1993-03-11  0:22 testing Generics cis.ohio-state.edu!magnus.acs.ohio-state.edu!zaphod.mps.ohio-state.edu!uw
1993-03-07 19:10 John Goodsen
1993-03-07 18:59 John Goodsen
1993-03-05 13:14 Jeff Etrick
1993-03-08 18:19 ` Stephe Leake
replies disabled

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