Re: [dev] Suckless unit testing in C?
On Wed, Feb 25, 2015 at 08:16:52AM +0100, k0ga_AT_shike2.com wrote:
> Write your program to deal with sdtdin and stdout, and comunicate
> to the network using nc or inetd.
This is very simplistic.
I'll give you some examples:
- ii: I don't see it using netcat.
- quark: Doesn't use inetd
- surf: depends on webkit for most stuff
- dwm: X11 API
Why aren't these communicating with stdin or stdout?
The reality is that sometimes you have to interface with complex APIs, and a
simple way of testing your own code is to abstract or mock the aspects of these
APIs that your program relies on. Or do you have better suggestions to test
your code, other than "don't write bugs" or "for every change, test all the
possible features that could've been affected by that change"?
Received on Wed Feb 25 2015 - 20:35:00 CET
This archive was generated by hypermail 2.3.0
: Wed Feb 25 2015 - 20:36:16 CET