04-testing-fnptrs.student

# 04-testing-fnptrs.st - Last time 1 Tail recursion 2 Helper functions 3 Recursive invariants 4 Testing introduction Today we'll finish talking about

This preview shows pages 1–3. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
and 1 and getting 2, adding 1 and 2 and getting 3, etc. As you read the spec in step 1, it helps if you make a note of each required behavior that you find. Ex: program should print an error message and exit if payment is less than zero. 3) Write specific test cases For each of your required behaviors, write a test case (or possibly a set of test cases) that checks the set of required behaviors. To the extent possible, the test case should check *exactly* one behavior---no more! That way, if the case fails, you know where to start looking. There are two classes of test cases that make sense: * simple inputs * boundary conditions Simple cases are those that are "expected" or "normal" for the problem at hand. The test case that we gave you for project 1 is an example of a simple test case. "Boundary" cases are at the edges of what is expected, or formed to
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 01/28/2010 for the course EECS 280 taught by Professor Noble during the Winter '08 term at University of Michigan.

### Page1 / 8

04-testing-fnptrs.st - Last time 1 Tail recursion 2 Helper functions 3 Recursive invariants 4 Testing introduction Today we'll finish talking about

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online