CS1321 Homework 5 Tests1

Jeffrey D. Oldham

2000 Mar 19

The purposes of homework 5 included:

1.
using dynamic memory,
2.
writing classes,
3.
writing classes using dynamic memory, and
4.
demonstrating that different implementations cause different resource use.
Unfortunately, our ability to test these purposes is mainly limited to testing code for correctness. Thus, we tried a series of test cases.

The test programs are bundled together in a shar file. To unpack the shar file, copy to your favorite UNIX/Linux account and type

unshar testCode.shar

Files named like t-assignment.cc test a particular aspect of the code. Compile this with either your naive or powers-of-two implementation, assumed to be in a file named dynamicArray.h. Running the executable with a command-line argument of 34 (or 18000 for t-stress.cc) should yield output like n-t-assignment.expected-out (for the naïve implementation) or p-t-assignment.expected-out (for the powers-of-two implementation). Also, be sure to check for memory leaks using mtrace, as described in the homework.



Footnotes

... Tests1
©2000 Jeffrey D. Oldham . All rights reserved. This document may not be redistributed in any form without the express permission of the author.



2000-03-19