We will talk about:
Testing concepts
Building test cases and Makefile
What test cases should there be for bigint
's addition function?
Refresher from lecture (lecture slides for reference)
There are three steps in a test:
Set up the "fixture", the system to be tested
Perform the test
Verify the resultes, make sure there are no unwanted side effects
{
// Setup fixture
bigint left(9);
bigint right(5);
bigint result;
// Test
result = left + right;
// Verify
assert(left == 9);
assert(right == 5);
assert(result == 14);
}
Update your shared/ folder in svn.
It is assumed that your provided material working copy is named shared and that it is in your home directory. If not, adjust accordingly.
cd # Go to your home directory
cd shared # Go into your shared working copy
svn update
You will get messages about files being added and updated.
As a part of your lab assignment, you must complete a quiz in Canvas. This quiz will cover what you learned in the previous lab about UNIX system commands.
You have the entire lab to complete the quiz. You may not complete this quiz outside of your lab.
Create tests for the following operators in bigint
+
- addition
*
- multiplication
Tests need to use assert
and the ==
operator
Tests must cover all potential erroneous states your bigint could be in
Tests need to take advantage of techniques discussed in this lab and in lecture
The following must be true when you are done, NAMES MUST MATCH EXACTLY:
In your cs23001 directory you have created a directory named bigint.
In the directory bigint you have the following files:
bigint.hpp
bigint.cpp
Makefile
The testing files
The input and output demonstration files
There are NO executables in the repository.
Your programs compile, run, and perform as specified using the Makefile.
Your programs follow the General Program Requirements.
Use the browser one more time to verify that your work has been committed.
http://svn.cs.kent.edu/courses/cs23001/svn/USERNAME
You can click on the above link then replace "USERNAME" in the browser's location box with your information.
Upon completion of this assignment it will be assumed you are comfortable with the skills used in this assignment.
Do not hesitate to ask your instructor if you have questions or problems.