This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: Consensus on unit tests?


You asked about the general concept of unit tests, and the following
discussion was only about the technical issues with the specific code in
your example.  

I think the general notion of unit tests is a very good one.  I don't
see any obvious problems in the approach you've taken to building a unit
test.  Of course, any particular refactoring change to enable unit
testing might have issues and "It's for a unit test!" is not any kind of
trump over usual review concerns.

The likely pitfall I would look out for is when breaking some function
out into its own file to make it unit-testable might perturb the
optimization opportunities for the function in the actual build.  We
should be careful about that.  In your first example, the function was
already global, so there is no particular reason to worry about that
issue.


Thanks,
Roland


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