Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-threaded tests for more data structures #14

Merged
merged 3 commits into from
Dec 7, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(tests): Introduce tests README
  • Loading branch information
DNedic committed Dec 7, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit d879260a2eb66a6d4c298b6da6d6f800c2e8b9c3
26 changes: 26 additions & 0 deletions tests/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Tests

The library contains tests for all data structures and their respective features.
Each data structure has it's own test file, split into `spsc` and `mpmc` folders.

## Building and running

In order to build tests, simply run CMake in the library root:
```
cmake -B build
cmake --build build
```

> **Note:** Due to `std::span` tests, a compiler with C++20 support is required for building tests

After that, you can run tests either with `ctest`:
```
ctest --output-on-failure --test-dir build/tests
```
or by executing the `build/tests/tests` binary.

## Writing tests
If adding a new feature, or fixing a bug, it is necessary to add tests in order to avoid future regressions.
You can take a look at existing tests for examples.

[Catch2](https://github.com/catchorg/Catch2) is used as the testing framework, you can read the documentation of the library [here](https://github.com/catchorg/Catch2/blob/devel/docs/tutorial.md#writing-tests).