Skip to content

Commit

Permalink
small change to please Visual Studio
Browse files Browse the repository at this point in the history
  • Loading branch information
thelfer committed Nov 22, 2023
1 parent 10977d5 commit f42f79c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
8 changes: 5 additions & 3 deletions include/TFEL/Tests/TestResult.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
namespace tfel::tests {

//! \brief structure describing the result of a test or a test suite
struct TFELTESTS_VISIBILITY_EXPORT TestResult
: protected std::vector<TestResult> {
using std::vector<TestResult>::const_iterator;
struct TFELTESTS_VISIBILITY_EXPORT TestResult {
//! \brief a simple alias
using const_iterator = std::vector<TestResult>::const_iterator;
//! \brief default onstructor
TestResult();
/*!
Expand Down Expand Up @@ -87,6 +87,8 @@ namespace tfel::tests {
~TestResult();

private:
//! \brief registred tests
std::vector<TestResult> results;
//! \brief details
std::string description;
//! \brief reason why the test failed (if any)
Expand Down
12 changes: 6 additions & 6 deletions src/Tests/TestResult.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,19 @@ namespace tfel::tests {
} // end of TestResult::getFailureDescription

TestResult::const_iterator TestResult::begin() const {
return std::vector<TestResult>::begin();
} // end of TestResult::begin()
return this->results.begin();
} // end of begin

TestResult::const_iterator TestResult::end() const {
return std::vector<TestResult>::end();
} // end of TestResult::end()
return this->results.end();
} // end of end

void TestResult::append(const TestResult& r) {
if (!r.success()) {
this->status = false;
}
std::vector<TestResult>::push_back(r);
} // end of TestResult::end()
this->results.push_back(r);
} // end of append

void TestResult::setTestDuration(const double td) {
this->test_duration = td;
Expand Down

0 comments on commit f42f79c

Please sign in to comment.