VCC399Y5 Lecture Notes - Lecture 6: Null Pointer, Test Harness

28 views3 pages
11 Jul 2017
School
Course
Professor

Document Summary

A stub is a low-level routine that is really just dummy code so that it can be called by a higher-level routine that is being tested. Loops and conditional statements should be checked to ensure that loops are executed the correct number of times and that branching is correct. If code is going to fail, it usually fails at a boundary. Check for off - by - one errors, empty input, empty output. Before and after a critical piece of code, check to see if the necessary pre- and post- conditions (value of variables, etc ). Remember a famous divide by zero error. Check the variable that could potentially lead to a divide by zero error. The uss yorktown, was a guided-missile cruiser, that was shut down, and drifted for a few hours due to a divide by zero error. Test for cases which can"t occur just in case! Test for extreme values -- negative values, huge values, etc .

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents