Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

cppfw/tst

Repository files navigation

tst

C++ testing framework.

Installation, documentation, tutorials

See WiKi.

Features

  • xUnit-like concepts

  • minimal use of preprocessor macros

  • declarative definition of test cases

  • test suites

  • parametrized test cases

  • disabled test cases

  • parallel test execution

  • tests discovery (list existing test cases)

  • run list (list of test cases to run)

  • JUnit XML report generation

  • custom command line arguments

  • colored console output

Why another C++ xUnit framework?

There is already a plenty of C++ testing frameworks. The most popular ones are GoogleTest, Catch2 and Boost.UT.

So why another one?

Well, the good coding exercise is not the last reason, but also the following ones which make tst different:

  • tst minimizes use of preprocessor macros. It is designed with keeping in mind the future use of std::source_location when it becomes widely supported by compilers. Then it will be possible to avoid using macros at all without much rewriting of existing tests. Right now, essentially only one small macro is required, which is SL. For the sake of justice, Boost.UT also works without macros.

  • tst does not require C++'20 yet (unlike Boost.UT). Works with C++'17 which is well supported by existing compilers.

  • tst takes in use latest C++ concepts without being limited by supporting legacy standards.

  • Simple and clean procedural approach to testing (no awkward BDD, Gherkin, etc. stuff).

  • Exception-based "assertions" (check() functions).

  • Built-in parallel test cases execution.

About

C++ xUnit-like testing framework without macros

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Contributors 2

AltStyle によって変換されたページ (->オリジナル) /