Ryan ee17a68d3d
on-push / gcc (push) Successful in 15s
on-push / clang (push) Successful in 18s
Prepare 0.2.0-a.0.z
2026-06-24 14:13:35 +02:00
2026-06-24 14:13:35 +02:00
2026-06-24 14:13:35 +02:00
2026-06-24 14:13:35 +02:00
2026-06-24 14:13:35 +02:00
2026-06-24 14:13:35 +02:00
2026-06-24 14:13:35 +02:00
2026-06-24 14:13:35 +02:00
2026-06-24 14:13:35 +02:00
2026-06-24 14:13:35 +02:00
2026-06-24 14:13:35 +02:00
2026-06-24 14:13:35 +02:00
2026-06-24 14:13:35 +02:00
2026-06-24 14:13:35 +02:00
2026-06-24 14:13:35 +02:00

Validate

BitShift Validate is a minimalist unit-testing library for C++. Its primary purpose is to test the various other BitShift projects without making them dependent on larger unit-testing libraries.

Why BitShift Validate?

A small and dependency-free unit-testing library with first-class build2 support was required for the other BitShift Projects.

And a shitload of other reasons, for example, not embracing CMake(Shit) or supporting Google world-dominance by using GTest.

Requirements

  • A modern C++ compiler with C++23 suppport (GCC 14+ or Clang 18+),

  • build2: The build2 build and package management system.

Usage

To start using BitShift Validate to test your project, add the following depends value to your manifest, adjusting the version constraint as appropriate:

depends: bitshift-validate ^<VERSION>

Then import the library in your buildfile:

test_libs =
import test_libs =+ bitshift-validate%lib{validate}

./: exe{my-test}: {hxx ixx txx cxx}{**} $test_libs

Importable Targets

This package provides the following importable targets:

lib{validate}

lib{validate}

Implementation of the test library.

Usage Example

#include <bitshift/validate/validate.hxx>

BV_TEST(example.test, "an example test")
{
    int x = 0;
    int y = 1;

    BV_ASSERT_NOT_EQUAL(x, y);
}

int
main(int argc, char* argv[])
{
  return bitshift::validate::main(argc, argv);
}

Documentation

The latest API reference documentation can be found at: https://bitshift.helloryan.se/validate/

Bugs

There are probably many goblins lurking in the code. If you find one, please report it promptly to ryan@helloryan.se. Please include as much information as possible and preferably a link to a reproducible.

Contributing

If you want to actively contribute to the project, send an e-mail to ryan@helloryan.se, to discuss repository access.

Contributions are welcome in many forms, from code contributions to simple issue reporting. Don't hesitate to get in touch!

S
Description
Unit testing library for BitShift.
https://bitshift.helloryan.se/
Readme BSD-2-Clause 109 KiB
Languages
C++ 96.7%
Ruby 3.3%