Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/martinsos/tdd-by-example
My exercise project following "Test Drive Development: By Example" by Kent Beck.
https://github.com/martinsos/tdd-by-example
bazel catch2 cpp tdd
Last synced: 20 days ago
JSON representation
My exercise project following "Test Drive Development: By Example" by Kent Beck.
- Host: GitHub
- URL: https://github.com/martinsos/tdd-by-example
- Owner: Martinsos
- Created: 2018-09-10T17:59:31.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-12T23:36:20.000Z (about 6 years ago)
- Last Synced: 2025-01-20T08:48:31.504Z (20 days ago)
- Topics: bazel, catch2, cpp, tdd
- Language: Python
- Homepage:
- Size: 96.7 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# tdd-by-example
## Setup
### Bazel
We are using Bazel as our build system, so make sure to install `bazel` globally on your machine.## Building
We are using [Bazel](https://www.bazel.build/) build system.
Everything is defined in BUILD files (+ one WORKSPACE file).
Learn more about Bazel to know how to build specific targets, locate produced binaries and so on.## Tests
We are using [Catch2](https://github.com/catchorg/Catch2) test framework.While you can use Bazel to run specific tests, there is `run-tests` script to easily build and run all tests.
This runs tests through Bazel, which is recommended way to do it (by Bazel), but we do lose Catch2 output coloring.If you want to run it purely through Catch2, without Bazel interfering, you can run binaries that are produced as a result of building Bazel cc_test targets. Let's say you have Bazel cc_test target `my-test`. You can then do: `bazel build //test:my-test` to build the binary and then `bazel-bin/test/my-test` to run it.