Skip to content
Kaz Nishimura edited this page Feb 7, 2020 · 55 revisions

Wiki of C++Unit­X

(Build status)

Tired of using macros to specify test cases for C++? Then, C++Unit­X is for you.

See the README file and the home page for more information about C++Unit­X.

Status

This work is still in progress and not ready for production use yet. Do not expect it will be available very soon but your interests will help speed up its progress.

Features (intended)

  • No macro abuse.
  • Test suite as a loadable module.
  • Easy integration with common CI tools.

Sketchy example

class MyTestFixture
{
    Before setUp {[this]() {
    }};

    Test testOne {"testOne", [this]() {
    }};
};

TestRegistrant<MyTestFixture> tests {"tests"};

What's wrong with macros?

  1. Macros can confuse syntax analysis and sometimes make it hard to statically detect errors.
  2. Macro names are intrusive to C++ namespaces.

Wiki contents

Clone this wiki locally