Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kisom/am_test_stubs
Automake / CUnit test stubs for C programs.
https://github.com/kisom/am_test_stubs
Last synced: 18 days ago
JSON representation
Automake / CUnit test stubs for C programs.
- Host: GitHub
- URL: https://github.com/kisom/am_test_stubs
- Owner: kisom
- License: isc
- Created: 2012-11-20T21:33:52.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2013-02-10T01:57:55.000Z (almost 12 years ago)
- Last Synced: 2024-10-11T02:47:24.732Z (about 1 month ago)
- Language: C
- Homepage: http://kisom.github.com/am_test_stubs
- Size: 137 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# am_stub_tests
## automake CUnit test stubsThis project provides quick-start templates to add unit tests to your
C code using [CUnit](http://cunit.sourceforge.net/).### What's provided
* `Makefile.am` has a few lines in it relevant to unit testing; they just
need to be integrated into the current build.
* `pre-commit` is a simple script that can be used in git (by copying to
`.git/hooks/`) or mercurial (in the `[hooks]` section of `.hg/hgrc`, add
`pretxncommit.build = ./pre-commit`) to prevent commiting when builds and
unit tests are failing. For larger projects, this may not be feasible;
however, it may be useful for smaller projects.
* `tests/Makefile.am` demonstrates a skeleton Makefile template for building
the tests.
* `tests/stub_test.c` is just a skeleton test; make sure to pass it
`-DTEST_SUITE="\"your_test_name\"" in the CFLAGS (see `tests/Makefile.am`).### Using
0. Create the initial `tests` directory:
`cp -r /path/to/this/repo/tests /path/to/your/code`
0. Make sure the tests are called in your top level `Makefile.am`. Consult
the `./Makefile.am` provided here if you aren't sure what to add.### License
`am_stub_tests` is provided under an
[ISC license](https://raw.github.com/kisom/am_test_stubs/master/LICENSE).### Author
Kyle Isom (kyle `:at` tyrfingr `:dot:` is) put this together.