https://github.com/thombashi/criterionsample
:notebook_with_decorative_cover: Examples of Criterion (https://github.com/Snaipe/Criterion)
https://github.com/thombashi/criterionsample
c criterion examples unittest
Last synced: 9 months ago
JSON representation
:notebook_with_decorative_cover: Examples of Criterion (https://github.com/Snaipe/Criterion)
- Host: GitHub
- URL: https://github.com/thombashi/criterionsample
- Owner: thombashi
- License: mit
- Created: 2016-02-17T14:47:31.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-02-25T10:33:16.000Z (over 10 years ago)
- Last Synced: 2025-07-29T11:02:57.536Z (11 months ago)
- Topics: c, criterion, examples, unittest
- Language: C
- Homepage:
- Size: 6.84 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CriterionSample
Sample code for Criterion.
Snaipe/Criterion: A KISS, non-intrusive cross-platform C unit testing framework
https://github.com/Snaipe/Criterion
# Build
```console
git clone https://github.com/thombashi/CriterionSample.git
cmake .
make
```
# Running tests
e.g. Running test_parameterize
```console
test_parameterize/run_test.sh
[----] Criterion v2.2.0
[====] Running 1 test from parameterized_test:
[RUN ] parameterized_test::add
Test: lhs=1, rhs=1, expected=2
[PASS] parameterized_test::add: (0.00s)
[RUN ] parameterized_test::add
Test: lhs=-1, rhs=-1, expected=-2
[PASS] parameterized_test::add: (0.00s)
[RUN ] parameterized_test::add
Test: lhs=-100, rhs=200, expected=100
[PASS] parameterized_test::add: (0.00s)
[----] Writing xml report in `result.xml`.
[====] Synthesis: Tested: 3 | Passing: 3 | Failing: 0 | Crashing: 0
```