jtest
Dead Simple Modern C++ Unit Testing
Features
- Macro free, gluten free, cruelty free unit testsuite!
- Colored output!
- Single header!!
- Modern C++ (C++20)
- Public Domain
- Dead simple!
Installation
Include this repository as a CPM dependency, and link against the library.
CPMAddPackage(
NAME jtest
URL https://git.redacted.cc/josh/jtest/archive/Prerelease-1.zip
)
# ...
include_directories(${jtest_SOURCE_DIR}/include)
# ...
target_link_libraries(YourProgram ... jtest)
Usage
Using jtest is simple! Dead simple!
#include "include/jtest/jtest.hpp"
int main(int argc, char** argv)
{
TEST("Test1", []{
jtest::check(2+2 == 4);
});
TEST("Test2", [] {
jtest::check(2+2 == 4);
});
TEST("Test3", []
{
jtest::check(6+9 == 69);
});
jtest::run_tests();
}
Output
License
This software is written and developed by Josh O'Leary @ Redacted Software 2024. This work is dedicated to the public domain.
Contributing
Send'em pull requests.
Special Thanks
- Maxine Hayes
Release-1.5.1
Latest
Languages
C++
83.4%
CMake
16.6%