testing techniques for verifying includes in std:: namespace

Benjamin Kosnik bkoz@redhat.com
Thu Feb 15 17:09:00 GMT 2007


> Currently, these tests don't exist, per se. Many containers and
> structures have an instantiation test, which will test as a
> side-effect that things are in the correct namespace. I am thinking of
> formalizing this for all containers, making them consistent, and
> adopting the TR1 random idea of a "requirements" subdirectory for the
> tests which do:
> 
> 1) base class check
> 2) typedef check
> 3) required default arguments
> 4) explicit instantiations (which will now be instantiate.cc)

As a side benefit, this looks like the likely landing place for concept 
checking and invariant checking.

I don't see any systematic testing for this in the latest concept gcc 
patches. Thoughts Doug?

> Our current header testing is pretty much of the form: try to include
> it, and see if it compiles. At this point, this needs to be beefed up.

Not even that, actually.

> Just adding compile tests for the synopsis text (ie. declarations) for
> the TR1 includes to the testing process was pretty  interesting, as it
> showed issues with the current unordered_map etc containers, as they
> contain an extra template argument and thus conflict with the synopsis
> declarations.

I'm torn between doing this and or just adding partial specialization 
negative tests based on the synopsis declaration. Ie, you should'nt be 
able to take the existing generic template and have a partial 
specialization of it that is the same...

Either mean that the current unordered_map and unordered_set fail...

-benjamin



More information about the Libstdc++ mailing list