Conditionally disable tests of non-standard extensions

These tests include uses of the extension to allow allocators with the
wrong value_type in containers. Skip those parts of the tests when
__STRICT_ANIS__ is defined.

	* testsuite/23_containers/forward_list/requirements/
	explicit_instantiation/5.cc [__STRICT_ANSI__]: Don't test non-standard
	extension.
	* testsuite/23_containers/list/requirements/explicit_instantiation/
	5.cc [__STRICT_ANSI__]: Likewise.
	* testsuite/23_containers/map/requirements/explicit_instantiation/5.cc
	[__STRICT_ANSI__]: Likewise.
	* testsuite/23_containers/multimap/requirements/explicit_instantiation/
	5.cc [__STRICT_ANSI__]: Likewise.
	* testsuite/23_containers/multiset/requirements/explicit_instantiation/
	5.cc [__STRICT_ANSI__]: Likewise.
	* testsuite/23_containers/set/requirements/explicit_instantiation/5.cc
	[__STRICT_ANSI__]: Likewise.
	* testsuite/23_containers/unordered_map/requirements/debug_container.cc
	[__STRICT_ANSI__]: Likewise.
	* testsuite/23_containers/unordered_map/requirements/
	explicit_instantiation/5.cc [__STRICT_ANSI__]: Likewise.
	* testsuite/23_containers/unordered_multimap/requirements/
	explicit_instantiation/5.cc [__STRICT_ANSI__]: Likewise.
	* testsuite/23_containers/unordered_multiset/requirements/
	explicit_instantiation/5.cc [__STRICT_ANSI__]: Likewise.
	* testsuite/23_containers/unordered_set/requirements/
	explicit_instantiation/5.cc [__STRICT_ANSI__]: Likewise.

From-SVN: r265332
This commit is contained in:
Jonathan Wakely 2018-10-19 22:49:49 +01:00 committed by Jonathan Wakely
parent 78ed0f80c3
commit f8f3939037
12 changed files with 58 additions and 6 deletions

View File

@ -1,5 +1,29 @@
2018-10-19 Jonathan Wakely <jwakely@redhat.com>
* testsuite/23_containers/forward_list/requirements/
explicit_instantiation/5.cc [__STRICT_ANSI__]: Don't test non-standard
extension.
* testsuite/23_containers/list/requirements/explicit_instantiation/
5.cc [__STRICT_ANSI__]: Likewise.
* testsuite/23_containers/map/requirements/explicit_instantiation/5.cc
[__STRICT_ANSI__]: Likewise.
* testsuite/23_containers/multimap/requirements/explicit_instantiation/
5.cc [__STRICT_ANSI__]: Likewise.
* testsuite/23_containers/multiset/requirements/explicit_instantiation/
5.cc [__STRICT_ANSI__]: Likewise.
* testsuite/23_containers/set/requirements/explicit_instantiation/5.cc
[__STRICT_ANSI__]: Likewise.
* testsuite/23_containers/unordered_map/requirements/debug_container.cc
[__STRICT_ANSI__]: Likewise.
* testsuite/23_containers/unordered_map/requirements/
explicit_instantiation/5.cc [__STRICT_ANSI__]: Likewise.
* testsuite/23_containers/unordered_multimap/requirements/
explicit_instantiation/5.cc [__STRICT_ANSI__]: Likewise.
* testsuite/23_containers/unordered_multiset/requirements/
explicit_instantiation/5.cc [__STRICT_ANSI__]: Likewise.
* testsuite/23_containers/unordered_set/requirements/
explicit_instantiation/5.cc [__STRICT_ANSI__]: Likewise.
* testsuite/20_util/scoped_allocator/1.cc: Use allocator with correct
value type for the container.
* testsuite/23_containers/forward_list/cons/14.cc: Likewise.

View File

@ -25,4 +25,6 @@
// libstdc++/50118
template class std::forward_list<int, __gnu_test::ExplicitConsAlloc<int>>;
#ifndef __STRICT_ANSI__
template class std::forward_list<int, __gnu_test::ExplicitConsAlloc<char>>;
#endif

View File

@ -24,4 +24,6 @@
// libstdc++/50118
template class std::list<int, __gnu_test::ExplicitConsAlloc<int> >;
#ifndef __STRICT_ANSI__
template class std::list<int, __gnu_test::ExplicitConsAlloc<char> >;
#endif

View File

@ -22,8 +22,12 @@
// { dg-do compile }
using __gnu_test::ExplicitConsAlloc;
// libstdc++/50118
template class std::map<int, int, std::less<int>,
__gnu_test::ExplicitConsAlloc<int> >;
ExplicitConsAlloc<std::pair<const int, int> > >;
#ifndef __STRICT_ANSI__
template class std::map<int, int, std::less<int>,
__gnu_test::ExplicitConsAlloc<char> >;
ExplicitConsAlloc<char> >;
#endif

View File

@ -22,8 +22,12 @@
// { dg-do compile }
using __gnu_test::ExplicitConsAlloc;
// libstdc++/50118
template class std::multimap<int, int, std::less<int>,
__gnu_test::ExplicitConsAlloc<int> >;
ExplicitConsAlloc<std::pair<const int, int> > >;
#ifndef __STRICT_ANSI__
template class std::multimap<int, int, std::less<int>,
__gnu_test::ExplicitConsAlloc<char> >;
ExplicitConsAlloc<char> >;
#endif

View File

@ -25,5 +25,7 @@
// libstdc++/50118
template class std::multiset<int, std::less<int>,
__gnu_test::ExplicitConsAlloc<int> >;
#ifndef __STRICT_ANSI__
template class std::multiset<int, std::less<int>,
__gnu_test::ExplicitConsAlloc<char> >;
#endif

View File

@ -25,5 +25,7 @@
// libstdc++/50118
template class std::set<int, std::less<int>,
__gnu_test::ExplicitConsAlloc<int> >;
#ifndef __STRICT_ANSI__
template class std::set<int, std::less<int>,
__gnu_test::ExplicitConsAlloc<char> >;
#endif

View File

@ -30,6 +30,8 @@ template class __gnu_debug::unordered_map<string, float>;
template class __gnu_debug::unordered_map<string, int,
hash<string>, equal_to<string>,
allocator<pair<const string, int>>>;
#ifndef __STRICT_ANSI__
template class __gnu_debug::unordered_map<string, float,
hash<string>, equal_to<string>,
allocator<char>>;
#endif

View File

@ -23,8 +23,12 @@
// { dg-do compile { target c++11 } }
using __gnu_test::ExplicitConsAlloc;
// libstdc++/50118
template class std::unordered_map<int, int, std::hash<int>, std::equal_to<int>,
__gnu_test::ExplicitConsAlloc<int>>;
ExplicitConsAlloc<std::pair<const int, int>>>;
#ifndef __STRICT_ANSI__
template class std::unordered_map<int, int, std::hash<int>, std::equal_to<int>,
__gnu_test::ExplicitConsAlloc<char>>;
ExplicitConsAlloc<char>>;
#endif

View File

@ -28,6 +28,8 @@ using __gnu_test::ExplicitConsAlloc;
template class
std::unordered_multimap<int, int, std::hash<int>, std::equal_to<int>,
ExplicitConsAlloc<std::pair<const int, int>>>;
#ifndef __STRICT_ANSI__
template class std::unordered_multimap<int, int, std::hash<int>,
std::equal_to<int>,
ExplicitConsAlloc<char>>;
#endif

View File

@ -26,5 +26,7 @@
// libstdc++/50118
template class std::unordered_multiset<int, std::hash<int>, std::equal_to<int>,
__gnu_test::ExplicitConsAlloc<int>>;
#ifndef __STRICT_ANSI__
template class std::unordered_multiset<int, std::hash<int>, std::equal_to<int>,
__gnu_test::ExplicitConsAlloc<char>>;
#endif

View File

@ -26,5 +26,7 @@
// libstdc++/50118
template class std::unordered_set<int, std::hash<int>, std::equal_to<int>,
__gnu_test::ExplicitConsAlloc<int>>;
#ifndef __STRICT_ANSI__
template class std::unordered_set<int, std::hash<int>, std::equal_to<int>,
__gnu_test::ExplicitConsAlloc<char>>;
#endif