Conditionally disable tests of non-standard extensions
authorJonathan Wakely <jwakely@redhat.com>
Fri, 19 Oct 2018 21:49:49 +0000 (22:49 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Fri, 19 Oct 2018 21:49:49 +0000 (22:49 +0100)
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

12 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/23_containers/forward_list/requirements/explicit_instantiation/5.cc
libstdc++-v3/testsuite/23_containers/list/requirements/explicit_instantiation/5.cc
libstdc++-v3/testsuite/23_containers/map/requirements/explicit_instantiation/5.cc
libstdc++-v3/testsuite/23_containers/multimap/requirements/explicit_instantiation/5.cc
libstdc++-v3/testsuite/23_containers/multiset/requirements/explicit_instantiation/5.cc
libstdc++-v3/testsuite/23_containers/set/requirements/explicit_instantiation/5.cc
libstdc++-v3/testsuite/23_containers/unordered_map/requirements/debug_container.cc
libstdc++-v3/testsuite/23_containers/unordered_map/requirements/explicit_instantiation/5.cc
libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/explicit_instantiation/5.cc
libstdc++-v3/testsuite/23_containers/unordered_multiset/requirements/explicit_instantiation/5.cc
libstdc++-v3/testsuite/23_containers/unordered_set/requirements/explicit_instantiation/5.cc

index c7cdc0055023f41d13e990492f859e23abbd6722..b3688f89a56b077605976008f6ff7edbbb076d9e 100644 (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.
index 2060ac7db6d0f7a8998c1802ec2cf8e33b7d9b27..beb2da4f3ac4886e86935ff717f0798c756bb4ef 100644 (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
index c34afd0d42f629688233903f296e0184124729ee..36d0ac33f136a2905848d469f986ca0cb9dcf1e4 100644 (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
index 9dde5bca362dee3c1fc2a268929d13479e88ef1d..2e86fb03156ca56e69bfceba6102011f03277302 100644 (file)
 
 // { 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
index 00f987d1f4390179243ce2b0093fa25a8785bf7e..655d3dc9f5069108d3e0bd5b1532f14e0ade2e20 100644 (file)
 
 // { 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
index 0abadf4afa8cf620c494e04ca3b1ba8393b7e1eb..36a1c7e28b0da8c1a5d23b7e7e6f32247735ab69 100644 (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
index cbbbcc1b6dceecad6e278cdb492e8e9c83a04cba..f0edffe0a410bacca163743bfc1a6214c46e45aa 100644 (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
index 6fe5d6f96d3696b1e690a49b6be8d53d029b57f7..1af0f5a688a9e1348e52f508016250e8fec5722a 100644 (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
index afe3d648cd8aff51c0e06e578a346d0e53c6ebcc..2bedfc28516d2f912ea2479dc722cc5a34242c26 100644 (file)
 
 // { 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
index 6cdf0f3f3ca7a42bbb46cdd3418a96fe2e43a088..938cea5964d9cc4902fd41275dc51a2b22beb1da 100644 (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
index 5645a715db51d929e95054af543c62c1bda8933c..59b509b7782bede8ff6a76fa49326a73487fe3a8 100644 (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
index ae117ee772c0a880a9b8f196658b255ff5bbb000..b3358c3a8ad0e34b9a1d6175f49227dc13f246ee 100644 (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