This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

testing techniques for verifying includes in std:: namespace


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]