[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] Suggested patch to post-html.cpp
From: |
Robert Bocchino |
Subject: |
Re: [Groff] Suggested patch to post-html.cpp |
Date: |
Mon, 22 Sep 2014 21:52:19 -0700 |
Hi Bertrand,
On Sep 22, 2014, at 2:05 AM, Bertrand Garrigues <address@hidden> wrote:
> Are you thinking of unit tests, using a test framework for C++, or more
> global tests (using for example shell script) ?
I was thinking of system-level tests, at least initially. For example, the
grohtml postprocessor operates upon various kinds of tags. At this point I am
not even certain what all those tags are for and how they are generated. So one
thing I'd like to do is compile a list of all the macro sets/preprocessors that
generate tags, and set up tests for each one. That would at least give some
assurance that the grohtml tool chain is behaving properly, in a black-box kind
of way. This kind of testing is necessarily coarse-grained, but I think it
would be effective for the cost and is a logical first step.
> I think both are useful,
> but I was intending to study some parts of code and would be interested
> to have a C++ unit tests framework;
I agree it would be good to have unit tests eventually. Getting to a
comprehensive set of unit tests is a lot of work and requires a deep
understanding of the code. On the other hand, I think it makes sense to focus
on particular code paths that we are interested in, as you said, and work
towards comprehensive unit tests as an eventual goal.
> do you have any suggestions on the
> choice of a particular framework ? I am familiar with CUnit for C code,
> but for C++ there are just too many choices.
I do not have a lot of personal experience with C++ unit testing. Google test
seems like it could be a good choice: it seems feature-rich, actively
supported, and applicable to a broad range of platforms.
https://code.google.com/p/googletest/
Rob
>
> Regards,
>
> --
> Bertrand Garrigues
Robert L. Bocchino Jr.
291 S. Euclid Ave., Apt. PH8
Pasadena, CA 91101
(217) 979-1053