CPSC 480-010 Software Engineering (SE) Fall 2023

Exercise 34: Team Assert Tests

The project, Vector Angle, calculates the degree angle between two vectors. It uses the function dotProduct(), of which there is a test program dotProductTest.cpp.

The repository for this assignment is a GitHub Classroom Group Repository. That means there is one repo per team. Have one person create the Team in GitHub Classroom; the rest can join after that.

Your assignment is to add test cases to the file dotProductTest.cpp and get the tests to run successfully.

I assume you are using GitHub Codespaces for the rest of this. If you are not, you must clone the repository locally.

First, build the program:

Then, run the program:

The test program is a separate executable, dotProductTest. To run the test program there is a target, test. So run the test program:

For this assignment, add tests so that when the complete test program is run, all of the code in dotProduct() is run at least once. This would be 100% code coverage.

The workflow is:

Keep in mind the following:

I encourage as many team members to commit a test case as possible based on the machines available. If using GitHub Codespaces, each team member has their own codespace. After a team member has entered a test case, the rest can use a pull to update what they have:

For today, add test cases one at a time to prevent merge issues.

Each team member must submit notes, including for each test case:

Each team member's notes are due by the end of the class along with the commits with the test cases. Your score is based on the notes, and on the commits in the team repository.