-
Notifications
You must be signed in to change notification settings - Fork 30
Add a test target and one unit test, using Check. #102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
56e630d
to
81a1f9d
Compare
90af82b
to
fb7b1e6
Compare
I believe this branch is now merge-ready. It's one small test for a Before building and running the tests, install Check (and pkg-config or pkgconf to find Check's includes and libs). These are dependencies for tests and only for tests. To build and run the tests from the top-level To add more Travis and Cirrus now run In our too-brief meetup on Friday, @DerDakon suggested running tests via The sooner we merge this, the sooner we can start adding tests with most every commit. The sooner we have existing code covered by test, the sooner we can make bolder changes. With good test coverage we can also easily get good |
fed01e0
to
97240dc
Compare
@schmonz agreed that I can add another testcase I was just playing with, so I have extended this by a second commit that tests additional behavior of the stralloc functions. |
b23cb25
to
0609d1b
Compare
Happy with the additions, at a glance. Please feel free to merge. |
Had a little time on the plane. Here's an extremely minimal example of a unit test. Not looking for approval yet, just feedback.
You'll need Check installed, and depending where it goes you may need to adjust
conf-cc
andconf-ld
to find it.Then run
make test
and behold, at least one use of stralloc is shown to work!I picked stralloc because we all understand it, it's heavily used, it's relatively easy to test, and who knows, maybe with sufficient stralloc tests we'll discover something interesting we'll be glad to know about.