testing techniques for verifying includes in std:: namespace
Benjamin Kosnik
bkoz@redhat.com
Wed Feb 14 13:21:00 GMT 2007
Hola amigos.
I'm reviewing some of the current testsuite idioms for testing that
things in say:
#include <vector>
are indeed things like
namespace std
{
template <class T, class Allocator = allocator<T> > class vector;
}
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) instantiations (which will now be instantiate.cc)
Thoughts? Is there a better way to test the namespace placement issue?
If so, do tell!
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.
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.
So, I may add these, at lest the non-implementation defined parts.
best,
benjamin
More information about the Libstdc++
mailing list