Search
Items tagged with: ifdef
@bilboed @jamey Already tried fixing the test suite twice. Maybe I should try it again š
But yeah, what I want to fix is very low-level, and there are practically no tests for the low-level bits ("do all the code paths in cairo-polygon get tested?"). Most of the test suite uses the public API, either to compare renders to reference images, or to try to exercise certain tricky code paths.
So I'm going to do the #ifdef TEST dance in the main sources and see if the maintainers like that.
I really thought there was a paper titled "C Considered Harmful" but what I can find is this one from 1992:
#ifdef Considered Harmful, or Portability Experience with C News
Authors: Henry Spencer, University of Toronto; Geoff Collyer, Software Tool & Die
Abstract:
We believe that a C programmer's impulse to use #ifdef in an attempt at portability is usually a mistake. Portability is generally the result of advance planning rather than trench warfare involving #ifdef. In the course of developing C News on different systems, we evolved various tactics for dealing with differences among systems without producing a welter of #ifdef at points of difference. We discuss the alternatives to, and occasional proper use of, #ifdef.