| 1 |
Tests |
| 2 |
===== |
| 3 |
|
| 4 |
To run the tests, install `cxxheaderparser` and `pytest`, then just run: |
| 5 |
|
| 6 |
pytest |
| 7 |
|
| 8 |
Adding new tests |
| 9 |
---------------- |
| 10 |
|
| 11 |
There's a helper script in cxxheaderparser explicitly for generating many of the |
| 12 |
unit tests in this directory. To run it: |
| 13 |
|
| 14 |
* Create a file with your C++ content in it |
| 15 |
* Run `python -m cxxheaderparser.gentest FILENAME.h some_name` |
| 16 |
* Copy the stdout to one of these `test_*.py` files |
| 17 |
|
| 18 |
Content origin |
| 19 |
-------------- |
| 20 |
|
| 21 |
* Some are scraps of real code derived from various sources |
| 22 |
* Some were derived from the original `CppHeaderParser` tests |
| 23 |
* Some have been derived from examples found on https://en.cppreference.com, |
| 24 |
which are available under Creative Commons Attribution-Sharealike 3.0 |
| 25 |
Unported License (CC-BY-SA) |