On Tue, Apr 16, 2013 at 06:36:57AM -0700, Ben Tilly wrote:
> On Tue, Apr 16, 2013 at 4:02 AM, David Cantrell <[email protected]> wrote:
> > How about abusing the pre-processor to build a strangely familiar-looking
> > mini-language for testing ...
> >
> > int main(void) {
> >   int test_number = 0;
> >   int all_gone_buggerup = 0;
> >   OK(1 == 1, "it works!");
> >   OK(2 == 1, "oh no it doesn't");
> >
> >   DONE_TESTING();
> > }
> You missed the significant fact that I am passing information into the
> description in further parameters.  That's essential for me, not a
> nice to have.  It allows me to do things like have potentially dubious
> values appear directly in my test output.  (I caught a subtle bug due
> to seeing that output just last night!)

You can write macros that have varargs, although I have a feeling that
that might be a non-standard GNU extension.  You may still end up with
unreasonable amounts of punctuation, if you have to pass a format
string etc.

-- 
David Cantrell | top google result for "internet beard fetish club"

There's no problem so complex that it can't be solved
by killing everyone even remotely associated with it

_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to