Files
bitshift-validate/README.md
T

116 lines
3.2 KiB
Markdown
Raw Normal View History

2026-06-27 06:34:02 +02:00
[![Made with Love][made-with-love-badge]](https://bitshift.helloryan.se/)
[![Build Status][build-badge]](https://code.helloryan.se/bitshift/bitshift-validate/actions)
[![Documentation][docs-badge]](https://bitshift.helloryan.se/validate/)
[![License][license-badge]](https://code.helloryan.se/bitshift/bitshift-validate/src/branch/master/LICENSE)
[![Build System][build2-badge]](https://build2.org/)
[![Discord][discord-badge]](https://discord.gg/96cBuVgVMS)
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][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
-------------
```c++
#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][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][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!
2026-06-27 06:34:02 +02:00
[made-with-love-badge]: https://img.shields.io/badge/Made_with_%E2%9D%A4%EF%B8%8F_by-The%20BitShift%20Contributors-red
[build-badge]: https://code.helloryan.se/bitshift/bitshift-validate/actions/workflows/on-push.yaml/badge.svg
[docs-badge]: https://img.shields.io/badge/Documentation-Doxygen-yellow
[license-badge]: https://img.shields.io/badge/License-BSD_2--Clause-orange
[build2-badge]: https://img.shields.io/badge/Powered_by-build2-red
[discord-badge]: https://img.shields.io/discord/1444936129718522024?logo=discord&logoColor=white&label=Discord&color=blue
2026-06-24 14:13:35 +02:00
[build2]: https://build2.org/
[ryan@helloryan.se]: mailto:ryan@helloryan.se