This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
[v3] more consistent api testing
- From: Benjamin Kosnik <bkoz at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Tue, 20 Feb 2007 19:33:47 +0100
- Subject: [v3] more consistent api testing
This patch consolidates the existing libstdc++ API tests, makes existing
practice consistent, and adds new tests.
For "C" includes, all includes are now tested. In addition, as per
C++2003, types, functions, and macros are now checked. This paves the
way for a new "C" include strategy that is conformant to the C++ "C"
compatibility model. (This is in progress but not completed.) There may
be some breakage, which can be fixed up by either macro guards or
xfailing certain targets. Before I add the types_gobal_neg.cc tests, I
thought I'd see where we stand with the types_std.cc tests.
This is consistent with the existing TR1 "C" compatibility tests.
For C++ includes, the following structure is now de rigeur:
requirements/typedefs
requirements/explicit_instantiations
requirements/base_classes
In addition, other type requirements go here. This clears up some
instantiation inconsistencies (instantiation.cc,
explicit_instantiation/*.cc, 1.cc, 3.cc, etc.), base_class and typedef
inconsistencies (mixed in with others) and overall lossage (these should
be all compile-only tests.)
Explicit instantiation tests are used to test for up to three things:
1) template instantiable.
2) default arguments
3) template definition in correct namespace
Also, synopsis checking is done to sanity check that declarations are
correct. Surprisingly, <locale>, <unordered_map>, and <unordered_set>
are xfailed.
All non-template types in C++ headers are checked via using declarations
(not great, but easy). All templatized types in c++ includes are, in
theory, checked by instantiation.
I consider this a necessary evolution in the API testing for libstdc++,
as C++98/C++200x/TR1 are now going to be tested, with high hopes for
C99/C90 as well. Although not complete, this puts us a bit further along
than previously.
No test contents were dropped, although the structure has been rearranged.
best,
benjamin
tested x86/linux
Attachment:
p.20070220-1.bz2
Description: application/bzip