In this lab you will get to make a test suite for a linked list class.
Today, it is your job to play testing engineer. You will be
writing tests that use the List
class the way it’s intended to
work. Then, you’ll run your tests to see if the List
actually works.
You may be wondering:
List
work correctly?I dunno, dude! That’s your job to figure out. Good thing you know how to automate your testing.
You know the drill.
Create a .gitignore
file and add stuff you want to ignore.
You will lose points…
.gitignore
.Create a Makefile
with (at least) the following targets:
main
which compiles main.cpp
test
which compiles and runs a test suitecoverage
which compiles the test suite and runs gcov
to determine code coverageclean
which cleans up all generated output filesFeel free to borrow from the example Makefile
.
You should write unit tests to verify that the List
class in
project/
works like a linked list. If you find that the List
doesn’t work as it should, be sure to repair it.
list.h
as your documentation. Write some tests that use the
List
type and verify that the results are sane.List
class
except the destructor and iterator()
.Cell
; it’ll get tested when you test
List
.main.cpp
.Some other tips:
List
should work, be sure to
ask!List
code is wrongList
is wrong just because your test fails.
Make sure your tests is right, too!You will be graded on:
.gitignore
and absence of junk files.Makefile
for the project
project
As always, your git repo on http://git-classes.mst.edu is your submission. Don’t forget to commit and push all relevant files. Make sure you see everything you expect on GitLab!
We expect to see the following files on your master branch:
.gitignore
README.md
examples/
Makefile
assertions.cpp
basic.cpp
exceptions.cpp
funcs.cpp
funcs.h
main.cpp
test_funcs.cpp
test_main.cpp
test_vector.cpp
vector.h
vector.hpp
project/
Makefile
list.h
list.hpp
main.cpp
test_list.cpp
test_main.cpp
Notice that your repository has a subdirectory! You have the
option to put one .gitignore
file at the root of your repo, or
individual .gitignore
files in each directory if you prefer.