#include <TestCalculations.h>
Public Member Functions | |
void | setUp (void) |
setUp() method that is executed before all the test cases that the test class includes | |
void | tearDown (void) |
tearDown() method that is executed after all the test cases that the test class includes | |
Protected Member Functions | |
void | testDivision (void) |
void | testAddition (void) |
void | testMultiplication (void) |
void | testSubtraction (void) |
Test Class for the Calculations class It must be a subclass of CppUnit::TestFixture It then uses CPPUNIT_TEST_SUITE() to create the test suite, and CPPUNIT_TEST() to include the test methods in the test suite. CPPUNIT_TEST_SUITE_REGISTRATION() is then used to register the test class in the test registry.
Definition at line 25 of file TestCalculations.h.
|
protected |
test method to test the Addition() method of the Calculations class Test Case: 3+3=6
Definition at line 21 of file TestCalculations.cpp.
|
protected |
test method to test the Division() method of the Calculations class Test Case: 9/3=3
Definition at line 35 of file TestCalculations.cpp.
|
protected |
test method to test the Multiplication() method of the Calculations class Test Case: 2*3=6
Definition at line 28 of file TestCalculations.cpp.
|
protected |
test method to test the Subtraction() method of the Calculations class Test Case: 9-3=6
Definition at line 42 of file TestCalculations.cpp.