From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=BAYES_05 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 9 Mar 93 05:26:24 GMT 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 Message-ID: <1nh9q0INNcm8@umbc7.umbc.edu> List-Id: 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