libstdc++: Fix std::span test failures with _GLIBCXX_ASSERTIONS
authorJonathan Wakely <jwakely@redhat.com>
Thu, 27 Feb 2020 15:13:16 +0000 (15:13 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Thu, 27 Feb 2020 15:13:16 +0000 (15:13 +0000)
This fixes several failures with -D_GLIBCXX_ASSERTIONS added to the
testsuite flags, such as:

FAIL: 23_containers/span/back_assert_neg.cc (test for excess errors)

* testsuite/23_containers/span/back_assert_neg.cc: Add #undef before
defining _GLIBCXX_ASSERTIONS.
* testsuite/23_containers/span/first_2_assert_neg.cc: Likewise.
* testsuite/23_containers/span/first_assert_neg.cc: Likewise.
* testsuite/23_containers/span/front_assert_neg.cc: Likewise.
* testsuite/23_containers/span/index_op_assert_neg.cc: Likewise.
* testsuite/23_containers/span/last_2_assert_neg.cc: Likewise.
* testsuite/23_containers/span/last_assert_neg.cc: Likewise.
* testsuite/23_containers/span/subspan_2_assert_neg.cc: Likewise.
* testsuite/23_containers/span/subspan_3_assert_neg.cc: Likewise.
* testsuite/23_containers/span/subspan_4_assert_neg.cc: Likewise.
* testsuite/23_containers/span/subspan_5_assert_neg.cc: Likewise.
* testsuite/23_containers/span/subspan_6_assert_neg.cc: Likewise.
* testsuite/23_containers/span/subspan_assert_neg.cc: Likewise.

14 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/23_containers/span/back_assert_neg.cc
libstdc++-v3/testsuite/23_containers/span/first_2_assert_neg.cc
libstdc++-v3/testsuite/23_containers/span/first_assert_neg.cc
libstdc++-v3/testsuite/23_containers/span/front_assert_neg.cc
libstdc++-v3/testsuite/23_containers/span/index_op_assert_neg.cc
libstdc++-v3/testsuite/23_containers/span/last_2_assert_neg.cc
libstdc++-v3/testsuite/23_containers/span/last_assert_neg.cc
libstdc++-v3/testsuite/23_containers/span/subspan_2_assert_neg.cc
libstdc++-v3/testsuite/23_containers/span/subspan_3_assert_neg.cc
libstdc++-v3/testsuite/23_containers/span/subspan_4_assert_neg.cc
libstdc++-v3/testsuite/23_containers/span/subspan_5_assert_neg.cc
libstdc++-v3/testsuite/23_containers/span/subspan_6_assert_neg.cc
libstdc++-v3/testsuite/23_containers/span/subspan_assert_neg.cc

index 53fc59c6a0d6691e22d6048c5f2f9ce1c561b64a..05d6748ba516911b229209556f22fdb18c548c1d 100644 (file)
@@ -1,5 +1,20 @@
 2020-02-27  Jonathan Wakely  <jwakely@redhat.com>
 
+       * testsuite/23_containers/span/back_assert_neg.cc: Add #undef before
+       defining _GLIBCXX_ASSERTIONS.
+       * testsuite/23_containers/span/first_2_assert_neg.cc: Likewise.
+       * testsuite/23_containers/span/first_assert_neg.cc: Likewise.
+       * testsuite/23_containers/span/front_assert_neg.cc: Likewise.
+       * testsuite/23_containers/span/index_op_assert_neg.cc: Likewise.
+       * testsuite/23_containers/span/last_2_assert_neg.cc: Likewise.
+       * testsuite/23_containers/span/last_assert_neg.cc: Likewise.
+       * testsuite/23_containers/span/subspan_2_assert_neg.cc: Likewise.
+       * testsuite/23_containers/span/subspan_3_assert_neg.cc: Likewise.
+       * testsuite/23_containers/span/subspan_4_assert_neg.cc: Likewise.
+       * testsuite/23_containers/span/subspan_5_assert_neg.cc: Likewise.
+       * testsuite/23_containers/span/subspan_6_assert_neg.cc: Likewise.
+       * testsuite/23_containers/span/subspan_assert_neg.cc: Likewise.
+
        * include/debug/string (__gnu_debug::basic_string::insert): Fix for
        C++98 where the member function of the base class returns void.
 
index f3f2b20851adf0f00e3d1afce4565ac148053689..76f2a7eb286e2ac9e1cb82a7b5b76ca9ab4ac51d 100644 (file)
@@ -18,6 +18,7 @@
 // { dg-options "-std=gnu++2a" }
 // { dg-do run { xfail c++2a } }
 
+#undef _GLIBCXX_ASSERTIONS
 #define _GLIBCXX_ASSERTIONS
 #include <span>
 
index 7b202bdb9970c1cfedd1967a9c6ecf416f3c641a..0019fca5b8be7d9718de5afc761cd37581376a43 100644 (file)
@@ -18,6 +18,7 @@
 // { dg-options "-std=gnu++2a" }
 // { dg-do run { xfail c++2a } }
 
+#undef _GLIBCXX_ASSERTIONS
 #define _GLIBCXX_ASSERTIONS
 #include <span>
 
index e10184e04dabb7861d4ac48ec9329367b443c00a..7b93abc9a924a59a3bd67518089c64d7801d95bc 100644 (file)
@@ -18,6 +18,7 @@
 // { dg-options "-std=gnu++2a" }
 // { dg-do run { xfail c++2a } }
 
+#undef _GLIBCXX_ASSERTIONS
 #define _GLIBCXX_ASSERTIONS
 #include <span>
 
index ea99c8b60b8db978d55097af0dd78d9156a60eee..62dec39c6a0da2f42a91630461f89af7864eb149 100644 (file)
@@ -18,6 +18,7 @@
 // { dg-options "-std=gnu++2a" }
 // { dg-do run { xfail c++2a } }
 
+#undef _GLIBCXX_ASSERTIONS
 #define _GLIBCXX_ASSERTIONS
 #include <span>
 
index 4676b7a83e88db55bee7b7294667d4e745195800..10432ebe72f8fbf8299e6baccef9b01e8701fe15 100644 (file)
@@ -18,6 +18,7 @@
 // { dg-options "-std=gnu++2a" }
 // { dg-do run { xfail c++2a } }
 
+#undef _GLIBCXX_ASSERTIONS
 #define _GLIBCXX_ASSERTIONS
 #include <span>
 
index fca1cedcc74a7e1c3fa9dfeeb314a291d7842ea5..cc12c1f540eb75a0eb6703812f73634f86eecaab 100644 (file)
@@ -18,6 +18,7 @@
 // { dg-options "-std=gnu++2a" }
 // { dg-do run { xfail c++2a } }
 
+#undef _GLIBCXX_ASSERTIONS
 #define _GLIBCXX_ASSERTIONS
 #include <span>
 
index f831c72a77b1984651da0e4ea368424b75810cd5..773bea49e57222877ab381ca355442be146e9a56 100644 (file)
@@ -18,6 +18,7 @@
 // { dg-options "-std=gnu++2a" }
 // { dg-do run { xfail c++2a } }
 
+#undef _GLIBCXX_ASSERTIONS
 #define _GLIBCXX_ASSERTIONS
 #include <span>
 
index 00a94009dc5ceb3167221b41b43131beacbdf835..a3b856ecd67933b018dda05e27d935b717b2464f 100644 (file)
@@ -18,6 +18,7 @@
 // { dg-options "-std=gnu++2a" }
 // { dg-do run { xfail c++2a } }
 
+#undef _GLIBCXX_ASSERTIONS
 #define _GLIBCXX_ASSERTIONS
 #include <span>
 
index c8a5c92e61f59043d2ff01ff3508a1b52627deeb..2c559427094b81f71e9650d5586646275d27b6f8 100644 (file)
@@ -18,6 +18,7 @@
 // { dg-options "-std=gnu++2a" }
 // { dg-do run { xfail c++2a } }
 
+#undef _GLIBCXX_ASSERTIONS
 #define _GLIBCXX_ASSERTIONS
 #include <span>
 
index 1ccd5f2db672ba77bc895c19d282e9772008e33b..8a082633bf1c67df5f899d14f195ce4cbde8db40 100644 (file)
@@ -18,6 +18,7 @@
 // { dg-options "-std=gnu++2a" }
 // { dg-do run { xfail c++2a } }
 
+#undef _GLIBCXX_ASSERTIONS
 #define _GLIBCXX_ASSERTIONS
 #include <span>
 
index 685096df077dc32bc982495d0aa86f21f92d7655..c3836478b66ee03de20daa0ebc2e898523df8028 100644 (file)
@@ -18,6 +18,7 @@
 // { dg-options "-std=gnu++2a" }
 // { dg-do run { xfail c++2a } }
 
+#undef _GLIBCXX_ASSERTIONS
 #define _GLIBCXX_ASSERTIONS
 #include <span>
 
index 2752aa254c67e9367df46c1ffb4ae1cbbcf8db92..a58d763ea9d8d6cb5a3cc480d19868639e96b3fa 100644 (file)
@@ -18,6 +18,7 @@
 // { dg-options "-std=gnu++2a" }
 // { dg-do run { xfail c++2a } }
 
+#undef _GLIBCXX_ASSERTIONS
 #define _GLIBCXX_ASSERTIONS
 #include <span>
 
index 56a91ab34acd4bd117bea4ad61423dcc27bcf9ac..9160489382ac7b541a016952e449e654908aca0e 100644 (file)
@@ -18,6 +18,7 @@
 // { dg-options "-std=gnu++2a" }
 // { dg-do run { xfail c++2a } }
 
+#undef _GLIBCXX_ASSERTIONS
 #define _GLIBCXX_ASSERTIONS
 #include <span>