Write unit tests
@jfoug is already working on this.
Since Jan 16, 2019.
- Dominant language
- C
- Stars
- 13.6k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
Going to write unit test 'program'. This will start with unit testing all public functions in misc.c I may extend to also test all public functions in common.c and there may be 'other' ancillory functions which should also unit test. The program will be stand alone, BUT will be incorporated into makefile.in and makefile.legacy. I will put the source into './src/unused', since it really is unused code (not part of JtR). The tests will also be added to the CI, and likely be a simple build/run test using ASAN, so that buffer over/underflows will be caught.
I am pretty well along on the misc.c unit tests. I will get the unit test project into a PR soon, along with an updated misc.c with numerous issues corrected.
This will be in jumbo-2, but we can easily continue adding more functions into the unit-tests even after J2 is released.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.