
Stefan Seefeld wrote:
Hartmut Kaiser wrote:
Gennadiy Rozental wrote:
And I do not see why the rest of us should be faced with library that will never be tested,
I don't know why you're so sure this library never will be tested. As I've said during the review I'm working on a test suite, which can be run as an integral part of the regression process. But please consider this to be not a simple task, so I'll need some additional time to fulfill my promise.
I'm presently working on integrating wave as a Cpp backend for synopsis. In particular, I'm trying to parse (Cpp and C++) boost itself, which appears to be a good acid test. One of the difficulties testing a tool/library such as wave on a large scale seems to me to be the system/platform specific nature of such a task. As soon as you leave the scale of unit tests, you'll end up with system-dependent headers that require knowledge about system compilers. In synopsis I use some python code that scans the system for available compilers and tries to extract predefined macros and include search paths.
Would such a facility help as a means for more people to test wave ? What I have in mind is a python wrapper script that runs the 'wave' tool, forwarding user-defined arguments, but which essentially emulates a system compiler in that it predefines macros and include paths according to its findings.
Most compilers will publish a list of predefined macros. However some predefined macros depend on the command line options that one passes to the compilers when compiling source. So such a tool as yours must take into account a set of options being passed to it that would change the predefined macros generated. Also, of course, it is possible that macros can be defined for a compiler as a command-line option itself. Similarly the final include path must also take into account any command line option, most popularly "-isome_path;some_path_etc", which is passed to the compiler when it is invoked. What all this means is that, for any given compiler, a tool such as yours ideally needs to accept the same set of command-line options as the particular compiler accepts, and know how to set any macros, as well as a final composite include path, from those options.