Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/internal/TestCPPTestCase.h
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ namespace TestCPP {
* @param out The stream to write the test failure reason to.
* @param reason The test failure reason to write.
*/
void logFailure (ostream& out, const string& reason);
void logFailure (ostream& out, const string& reason) const;
/**
* @brief If a test encounters an error while running, this
* function will be called to log the test error.
Expand Down
4 changes: 2 additions & 2 deletions include/internal/TestCPPTestSuite.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,15 @@ namespace TestCPP {
* @return The total number of tests that failed in the last
* suite run.
*/
unsigned getLastRunFailCount ();
unsigned getLastRunFailCount () const;

/**
* @brief Retrieve the total number of tests in the suite that
* succeeded (passed) during the last suite run.
* @return The total number of tests that passed in the last
* suite run.
*/
unsigned getLastRunSuccessCount();
unsigned getLastRunSuccessCount() const;

/**
* @brief Run all tests in the test suite.
Expand Down
4 changes: 2 additions & 2 deletions include/internal/TestCPPUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ namespace TestCPP {
* @return The name of the TestCPP object that this object
* names.
*/
const string& getName ();
const string& getName () const;

/**
* @brief Output the test object name to the specified stream.
Expand All @@ -88,7 +88,7 @@ namespace TestCPP {
*/
friend std::ostream& operator<< (
std::ostream& s,
TestObjName& tcName
const TestObjName& tcName
);

private:
Expand Down
2 changes: 1 addition & 1 deletion src/TestCPPTestCase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ namespace TestCPP {
return this->lastRunTime;
}

void TestCase::logFailure(ostream& out, const string& reason) {
void TestCase::logFailure(ostream& out, const string& reason) const {
out << fixed;
out << setprecision(TCPPNum::TIME_PRECISION);
out << TCPPStr::TEST << this->testName << TCPPStr::FAIL
Expand Down
4 changes: 2 additions & 2 deletions src/TestCPPTestSuite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ namespace TestCPP {
this->suiteName = std::move(testSuiteName);
}

unsigned TestSuite::getLastRunFailCount () {
unsigned TestSuite::getLastRunFailCount () const {
return this->lastRunFailCount;
}

unsigned TestSuite::getLastRunSuccessCount() {
unsigned TestSuite::getLastRunSuccessCount() const {
return this->lastRunSuccessCount;
}

Expand Down
4 changes: 2 additions & 2 deletions src/TestCPPUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ namespace TestCPP {
}
}

const string& TestObjName::getName () {
const string& TestObjName::getName () const {
return this->testCaseName;
}

std::ostream& operator<< (
std::ostream& s,
TestObjName& tcName
const TestObjName& tcName
)
{
s << tcName.getName();
Expand Down