-
Notifications
You must be signed in to change notification settings - Fork 55
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
Test Framework #23
Comments
We could use CI in the hsd repo too, CircleCI can install hnsd and we run it as a child_process with nodejs and run bmocha e2e tests. Tried a similar thing w bcoin: bcoin-org/bcoin#759 |
That would be good for integration tests, I am thinking more along the idea of unit tests here. Unit tests would be useful in particular for the resource serialization. |
It would be ideal to add unit tests to
hnsd
so that its easier to develop without regressions. There are many options for test frameworks in C, many projects opt to roll their own framework. I found what I believe to be good options.Options
cmocka
CMUnitTest
s usingcmocka_unit_test
which wrapdescribe
like functionscheck
CGreen
Before
,After
, etc macrosCustom
I'd personally opt for using
cmocka
since it looks simple to use and is also used by other applications that are similar (DNS + security). It would be easier than creating our own custom test library.The text was updated successfully, but these errors were encountered: