This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 00/16] Unit tests framework (v3)


On 11/17/2015 02:53 AM, Mike Stump wrote:
On Nov 16, 2015, at 3:12 PM, Jeff Law <law@redhat.com> wrote:
So I'd tend to want them either at the end of the file with a
single #if CHECKING_P or as a separate foo-tests file.

Hum…  I kinda don’t want the main files mucked up with tests.  I
think I’d rather have

#if CHECKING_P #include "test/expr-test.h" #endif

at the end, and punt the whole lot into a single subdirectory that
most people, most of the time, can simply ignore.  Wading through a
ton of code that you aren’t interested in, is, well, annoying.

Most of the tests submitted so far are relatively tiny, sometimes the list of #includes in the testcase is longer than the tests themselves. If they are at the end of a file you'd hardly be wading through them either. Let's just use common sense and make separate files if we ever get huge amounts of test code and keep it simple otherwise.


Bernd


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]