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]

[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


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