Skip to content
Kaz Nishimura edited this page Feb 24, 2021 · 55 revisions

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

C++Unit​X is designed from scratch to make it easy to write and maintain test cases for C++ (and C) programs by making use of lambda expressions introduced in C++11.

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.

(Build status) (Documentation status)

See also

Features (intended)

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

Sketchy example

class MyTestFixture
{
    unique_ptr<int> x;

    BeforeTest setUp {
        [this]() {
            x.reset(new int());
        }
    };

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

TestCase<MyTestFixture> tests {"tests"};

Signing

An official source code package contains a SHA256SUMS file signed by the author's key.

You should be able to check the package integrity as follows:

  1. Run gpg -v SHA256SUMS.asc and
  2. Run sha256sum -c SHA256SUMS.

Wiki contents

Clone this wiki locally