Re: two xasserts in squid3

From: Amos Jeffries <squid3@dont-contact.us>
Date: Tue, 12 Feb 2008 11:27:07 +1300 (NZDT)

>
> On Tue, 2008-02-12 at 11:10 +1300, Amos Jeffries wrote:
>
>> * Obsolete typedefs.h (underway)
>> - remove all unneeded typedefs
>> - move all needed typedefs to their appropriate headers
>> - fix compile errors
>>
>> * Add automatic testing for header dependency
>> - script to perform universal include unit-test for .h files
>> - link to automatic unit-testing in each directory
>> - fix the compile errors!
>>
>> * Obsolete protos.h
>> - move all protos to their appropriate header files
>> - add includes for headers where needed.
>>
>> * Obsolete structs.h
>> - move all structs to their appropriate header files
>> - move modular configuration in to *Config.h files
>> (discussion on exactly what the modules are)
>
>> * Auto-doc the API for modules decided above
>>
>> * Move files into appropriate sub-dirs based on modules
>
> Amos,
>
> All sounds good, except I do not understand the "Add automatic
> testing for header dependency" blob. Can you describe that in more
> detail? What is it, and why do we need it?

I am thinking along the lines of unit-testing the compilation of each *.h
file.

At present a fvery few of the important .h files have a hard-coded .cc in
the tests directory and that gets built when unit-testing. All it does is
"#include <something.h>"

What I'm planning is a test-suite script that when passed a directory,
scans it for all .h files. Writes the .cc and attempts a build. Any
compile errors are dependancy errors needing a fix.

That would speed-track the dependancy testing in future with no need for
manually adding these tests, or a large set of files for them. It is
particularly useful for the struct and proto re-arranging.

Amos
Received on Mon Feb 11 2008 - 15:27:09 MST

This archive was generated by hypermail pre-2.1.9 : Sat Mar 01 2008 - 12:00:09 MST