Show HN: Writing modern C unit tests with Criterion
1–10 of 14 posts
Re: Show HN: Writing modern C unit tests with Criterion
#2I made this unit testing framework out of frustrations I had (and still have) with other C frameworks like CUnit or Check.
I wanted to make something much more simple, yet as powerful, and I think (and hope) I nailed it pretty much after a few months of work.
If you have any questions or suggestions, feel free to ask :)
Re: Show HN: Writing modern C unit tests with Criterion
#3Developer here. I made this unit testing framework out of frustrations I had (and still have) with other C frameworks like CUnit or Check. I wanted to make something much more simple, yet as powerful, and I think (and hope) I nailed it pretty much after a few months of work. If you have any questions or suggestions, feel free to ask :)
Re: Show HN: Writing modern C unit tests with Criterion
#4Re: Show HN: Writing modern C unit tests with Criterion
#5Developer here. I made this unit testing framework out of frustrations I had (and still have) with other C frameworks like CUnit or Check. I wanted to make something much more simple, yet as powerful, and I think (and hope) I nailed it pretty much after a few months of work. If you have any questions or suggestions, feel free to ask :)
Did you check out Greg Banks' Novaprova?
It also uses some very platform specific stuff, so windows & os x are out, too.
Very well made nonetheless.
Re: Show HN: Writing modern C unit tests with Criterion
#6Earlier quoted context omitted.
Did you check out Greg Banks' Novaprova?
Actually, I didn't know about it until now! The project uses a similar approach to mine, by parsing the DIE tree produced by dwarf, which means that it won't work if you're not compiling with -g. It also uses some very platform specific stuff, so windows & os x are out, too. Very well made nonetheless.
Good to see C test frameworks doing some innovative stuff!
Re: Show HN: Writing modern C unit tests with Criterion
#7personally I use Glib test ( https://developer.gnome.org/glib/stable/glib-Testing.html ) for c testing, but I'll check this out. Does this let you test what a program sends to stdout and stderr, and let you trap a subprocess to test that the program exits right?
Otherwise, you can't (yet!) test if the code exits with a specific value nor simply redirect input/output, but I'll be sure to take these suggestions into account, thanks!
Both will be implemented quite soon.
Re: Show HN: Writing modern C unit tests with Criterion
#8Re: Show HN: Writing modern C unit tests with Criterion
#9Developer here. I made this unit testing framework out of frustrations I had (and still have) with other C frameworks like CUnit or Check. I wanted to make something much more simple, yet as powerful, and I think (and hope) I nailed it pretty much after a few months of work. If you have any questions or suggestions, feel free to ask :)
(In case you mulled over using it.)
Re: Show HN: Writing modern C unit tests with Criterion
#10Developer here. I made this unit testing framework out of frustrations I had (and still have) with other C frameworks like CUnit or Check. I wanted to make something much more simple, yet as powerful, and I think (and hope) I nailed it pretty much after a few months of work. If you have any questions or suggestions, feel free to ask :)
Why did you rule out using Google Test ( https://code.google.com/p/googletest )? (In case you mulled over using it.)