CS 70

Gearing Up for Testing

A big difference between this assignment and previous assignments is that you will be writing your own tests!

So you need to understand what good tests are, and what is and is not allowed when you are doing testing.

Our Guidance on Writing Tests

Get started by reading our help page about testing:

The information in this page applies to both this assignment and to all subsequent CS 70 assignments. It has important rules and guidance on how to construct your tests. Read it now. (We'll also ask you questions about it on the written homework.)

Document the Interface

As you can see, to write good tests, it will be really important that you have a clear understanding about what each function you will implement promises and what it doesn't promise.

The C++ code for the interface and encoding of the IntList class is already given in intlist.hpp, but the function descriptions are often missing. As a way of familiarizing yourself with the IntList specifications and the code you're starting from, add docstring comments to all of the member functions of the IntList class in intlist.hpp.

Although you should try to be brief in your descriptions, you should include any usage rules that apply in \warning specifications for the functions.

Hint: Focus On intlist.hpp

In this part, you're focused on intlist.hpp. There are various other files you'll need to work on, but you can ignore them for now.

To Complete This Part of the Assignment…

You'll know you're done with this part of the assignment when you've done all of the following:

(When logged in, completion status appears here.)