Skip to content
Permalink
2d262c7ab6
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
24 lines (21 sloc) 643 Bytes
// TestSuiteCxx.h
// This file contains our Cxx Test Suite which is defining our tests for our code in Maths.cpp
#include <cxxtest/TestSuite.h>
#include "Maths.h"
class TestSuiteCxx : public CxxTest::TestSuite
{
public:
void testAddition1(void)
{
Maths myObject;
TS_ASSERT(myObject.add(1, 1) > 1);
TS_ASSERT_EQUALS(myObject.add(1, 1), 2);
}
void testAddition2(void)
{
Maths myObject;
TS_TRACE("Starting addition2 test");
TS_ASSERT_EQUALS(myObject.add(2, 2), 5); // this will fail our test because our test has errors
TS_TRACE("Finishing addition2 test");
}
};