2024-10-10 12:08:25 -04:00
2024-10-10 12:08:25 -04:00
2024-06-18 11:15:49 -04:00
2024-06-12 13:57:50 -04:00
2025-06-04 14:01:50 -05:00
2024-06-18 11:15:49 -04:00

jtest

Dead Simple Modern C++ Unit Testing

Static Badge

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

Should be sample 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
Description
Dead Simple Modern C++ Unit Testing
Readme Unlicense 112 KiB
Release-1.5.1 Latest
2025-05-22 23:08:10 -04:00
Languages
C++ 83.4%
CMake 16.6%