Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/electronvector/catch-with-c
Using the Catch unit test framework to write BDD-style tests for straight up C.
https://github.com/electronvector/catch-with-c
Last synced: 2 months ago
JSON representation
Using the Catch unit test framework to write BDD-style tests for straight up C.
- Host: GitHub
- URL: https://github.com/electronvector/catch-with-c
- Owner: ElectronVector
- License: mit
- Created: 2016-01-11T06:00:22.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-11T06:06:24.000Z (about 9 years ago)
- Last Synced: 2023-02-26T20:43:08.461Z (almost 2 years ago)
- Language: C++
- Size: 66.4 KB
- Stars: 8
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This is an example for how to use the [Catch unit test framework](https://github.com/philsquared/Catch) to write BDD-style tests for C.
## Requires
- Rake (via Ruby)
- g++## How to run
Run all the tests with `rake`.## Details
The module under test is the **power_button** which can be found in **power_button.c**. The BDD-style tests can be found in **test_power_button.c**.Catch is a C++ unit test framework, but the code under test in the power_button module is straight up C. To run the tests, we need to compile everything with g++ (a C++ compiler).
See the Rakefile for more details about how everything is built.