> > 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