Path: csiph.com!news.mixmin.net!border2.nntp.ams1.giganews.com!nntp.giganews.com!buffer2.nntp.ams1.giganews.com!buffer1.nntp.ams1.giganews.com!nntp.brightview.co.uk!news.brightview.co.uk.POSTED!not-for-mail NNTP-Posting-Date: Sun, 04 Sep 2016 03:05:12 -0500 From: Gareth Owen Newsgroups: comp.lang.c Subject: Re: Doxygen References: <915306b7-deca-4742-b415-150327efce00@googlegroups.com> Date: Sun, 04 Sep 2016 09:05:11 +0100 Message-ID: <87r3909jk8.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:2+c+cHnIAaJvRlsVDL+MeR5uASo= MIME-Version: 1.0 Content-Type: text/plain Lines: 16 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-9k2Qt0QobN0QNTKCW0SEiOYNZKeM+4wOvjmWvKAbX+TvQvh0YggwEILN6LdkCLWNlK84Gr7NjswBoGU!USkvcnwISgh1FgwVIFCuinUZs+EVZTn4TGWbeVS+bjqPzEWMuy4Vulppd0hJIf0P X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 1748 Xref: csiph.com comp.lang.c:93188 Malcolm McLean writes: >> With unit tests, you don't get to choose! >> > How would you set up unit tests for the binary image processing library? > > The functions have been tested, of course, but generally I've done it > by visual inspection of output. I've done unit-tests on FPGA implementations of image-processing. Once you've generated "golden" output files, you just need to check that your conversions match them - either identity for lossless transformations, or some RMS/Max-error criteria for lossy transformations (I think YUV colorspace is better for these checks). It's imperfect, but it does catch most of your errors.