CSC 1060 Term Project Test Framework Instructions PDF

Summary

These instructions detail how to use a test framework for a CSC 1060 term project, covering setup, understanding the framework, adding custom tests, and troubleshooting common problems. The document provides a framework and examples for testing classes, file I/O, arrays, vectors, pointers, and exception handling.

Full Transcript

How to Use the Test Framework for Your CSC 1060 Project ======================================================= Step 1: Setting Up ------------------ 1\. Download ProjectTest.h and put it in your project folder (the same folder as your other. files) 2\. In your main. file, add this line at the to...

How to Use the Test Framework for Your CSC 1060 Project ======================================================= Step 1: Setting Up ------------------ 1\. Download ProjectTest.h and put it in your project folder (the same folder as your other. files) 2\. In your main. file, add this line at the top: \# include \"ProjectTest.h\" 3\. Create a test object and run the tests by adding this code to your main: int main() { ProjectTest test; test.runAllTests(); return 0; } Step 2: Understanding the Test Framework ---------------------------------------- The framework tests six important parts of your project: 1\. Your classes 2\. File input/output 3\. Arrays and vectors 4\. Pointers 5\. Exception handling 6\. Function overloading When you run the tests, you\'ll see something like this: === CSC 1060 Term Project Test Suite === === Testing Class Implementation === Add your class tests here Class test placeholder: FAILED \[More test results\...\] === Test Summary === Passed 0 out of 6 tests Don\'t worry about the failed tests! This is normal until you add your own tests. Step 3: Adding Your Own Tests ----------------------------- ### Testing Your Class Find this section in ProjectTest.h: void testClassFunctionality() { std::cout \

Use Quizgecko on...
Browser
Browser