I am excited to announce the first release of the CPP-Test-Library, a comprehensive testing framework designed for C++ projects. This release includes core functionalities to help developers create, manage, and run unit tests and test suites efficiently. The library is built to support exception handling, setup, and teardown mechanisms for robust testing processes.
Key Features
-
Test Management:
- Easily define and manage tests using
TestandTestSuiteclasses. - Support for automatic registration of tests and test suites.
- Easily define and manage tests using
-
Exception Handling:
- Specialized classes (
ConfirmException,BoolConfirmException,ActualConfirmException,andMissingException) for handling various exceptions during test execution. - The
TestExtemplate class is used to create tests that expect specific exceptions.
- Specialized classes (
-
Setup and Teardown:
SetupAndTeardowntemplate class to manage setup and teardown routines.TestSuiteSetupAndTearDowntemplate class for managing setup and teardown of test suites.
-
Assertions and Confirmations:
- Inline functions for confirming test outcomes (
confirm) supporting various data types. - Macros (
CONFIRM_TRUE,CONFIRM_FALSE,CONFIRM) for convenient test assertions.
- Inline functions for confirming test outcomes (
-
Macro Definitions:
- Macros for defining tests (
TEST,TEST_EX,TEST_SUITE,TEST_SUITE_EX) with straightforward syntax. - Automatic generation of unique class names for tests to avoid naming conflicts.
- Macros for defining tests (
File Structure
The release tarball (CPP-Test-Library-1.0.0.tar.gz) includes the following structure:
CPP-Test-Library-1.0.0/
├── include/
│ └── Test. h
├── lib/
│ └── libCPPTestLibrary.a
└── README.md
- include/Test.h: The main header file containing all class and template definitions required to use the testing framework.
- lib/libCPPTestLibrary.a: The compiled static library.
- README.md: Documentation on how to integrate and use the library.