Peano
Loading...
Searching...
No Matches
TreeTestCaseCollection.h
Go to the documentation of this file.
1// This file is part of the Peano project. For conditions of distribution and
2// use, please see the copyright notice at www.peano-framework.org
3#pragma once
4
6#include "tarch/logging/Log.h"
7
8#include <list>
9#include <map>
10
11namespace tarch {
12 namespace tests {
13 class TreeTestCaseCollection;
14 }
15}
16
17
25 private:
30 std::list<TestCase*> _testCases;
31 std::map<std::string, TreeTestCaseCollection*> _subTests;
32
37
42
47
48 static bool isNameWithoutHierarchy(const std::string& testCaseName);
49 static std::string getFirstIdentifierInHierarchy(const std::string& testCaseName);
50 static std::string getRemainingPathWithoutIdentifier(const std::string& testCaseName);
51 public:
52
68 const std::string& testCaseCollectionName = "",
69 bool deleteTestCases = true,
70 bool writeToLog = true
71 );
72
77
81 virtual void run();
82
86 virtual void run( const std::string& prefix );
87
99 void addTestCase( const std::string& fullQualifiedPath, TestCase* testCase );
100
104 void addTestCase( TestCase* testCase );
105};
106
107
Log Device.
Definition Log.h:516
Represents one test case.
Definition TestCase.h:57
static std::string getRemainingPathWithoutIdentifier(const std::string &testCaseName)
static bool isNameWithoutHierarchy(const std::string &testCaseName)
void addTestCase(const std::string &fullQualifiedPath, TestCase *testCase)
Adds a new test case.
virtual void run()
Runs all test cases assigned.
static tarch::logging::Log _log
Log interface the class writes to.
bool _deleteTestCases
Tells whether the testcases contained should be deleted uppon destruction of this object.
bool _writeToLog
Tells the collection wheather to log a progression bar.
std::list< TestCase * > _testCases
Sequence of test cases that are executes on a run() call.
TreeTestCaseCollection(const std::string &testCaseCollectionName="", bool deleteTestCases=true, bool writeToLog=true)
Creates a test case collection.
std::map< std::string, TreeTestCaseCollection * > _subTests
static std::string getFirstIdentifierInHierarchy(const std::string &testCaseName)
Have to include this header, as I need access to the SYCL_EXTERNAL keyword.
Definition accelerator.h:19