Struct TestSuite
Defined in File TestSuite.h
Inheritance Relationships
Base Type
public ILog(Struct ILog)
Derived Types
public PivotTests(Class PivotTests)public PivotXdkDeviceTests(Class PivotXdkDeviceTests)public RopActionTests(Class RopActionTests)public SymbolsTest(Class SymbolsTest)public TargetDbTests(Struct TargetDbTests)public XdkDeviceTests(Class XdkDeviceTests)
Struct Documentation
-
struct TestSuite : public ILog
Base class for test suites.
Provides common functionality for running tests, logging, and asserting results.
Subclassed by PivotTests, PivotXdkDeviceTests, RopActionTests, SymbolsTest, TargetDbTests, XdkDeviceTests
Public Functions
-
TestSuite()
-
TestSuite(std::string class_name, std::string desc)
Constructs a TestSuite with a class name and description.
- Parameters:
class_name – The name of the test suite class.
desc – A description of the test suite.
-
virtual void init()
Virtual method for test suite initialization.
-
virtual void deinit()
Virtual method for test suite deinitialization.
-
virtual void Log(const char *format, ...)
Logs a message using a format string.
- Parameters:
format – The format string for the message.
... – The arguments for the format string.
-
void Error(const char *format, ...)
Logs an error message and sets the had_errors flag.
- Parameters:
format – The format string for the error message.
... – The arguments for the format string.
-
void AssertLogs(bool fail_if_no_expected = true)
Asserts that the logged output matches the expected results in a file.
- Parameters:
fail_if_no_expected – If true, the test will fail if no expected results file is found.
-
void AssertNoErrors()
Asserts that no errors have occurred during the test execution.
- Throws:
ExpKitError – if the had_errors flag is true.
-
TestSuite()