Jon Test
C++ Unit Test Tool. Not for production -- sample code only
Loading...
Searching...
No Matches
TestSuiteInterface.h
Go to the documentation of this file.
1#ifndef JON_TEST_TEST_SUITE_INTERFACE_H
2#define JON_TEST_TEST_SUITE_INTERFACE_H
3
4#include "JonTest/Logger.h"
5
6namespace JonTest
7{
8
9class Logger;
10
19{
20public:
22 virtual ~TestSuiteInterface();
23
26 virtual void setup();
27
30 virtual void teardown();
31
34 virtual bool
36 const std::string& caseName
37 ) const = 0;
38
41 virtual int
43 std::ostream& out
44 ) const = 0;
45
48 virtual Count
50 Logger& logger
51 ) = 0;
52
58 virtual Count
60 Logger& logger,
61 const std::string& testCase
62 ) = 0;
63};
64
65}
66
67#endif
Count of tests run, and fails.
Definition Count.h:10
Interface for logging events while running tests.
Definition Logger.h:18
Interface for Test Suites.
virtual void setup()
The Test Suite runsthis prior to each test case.
virtual ~TestSuiteInterface()
Destructor – does nothing.
virtual void teardown()
The Test Suite runs this after to each test case.
virtual int listTestCases(std::ostream &out) const =0
List available Test Cases to out.
virtual bool isValid(const std::string &caseName) const =0
Determine if caseName can be run in this Test Suite,.
virtual Count run(Logger &logger)=0
Runs all Test Cases in this Test Suite.
virtual Count run(Logger &logger, const std::string &testCase)=0
Runs the given testCase in this Test Suite.
Definition Count.h:5