From f73a5316b6f76fa62979c29f4ec3620bf821dca0 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Thu, 23 Aug 2018 00:43:43 +0100 Subject: [PATCH] Fix tests that fail in C++98 mode * testsuite/23_containers/deque/capacity/max_size.cc: Fix test for C++98 mode. * testsuite/23_containers/deque/modifiers/assign/1.cc: Likewise. * testsuite/23_containers/list/modifiers/assign/1.cc: Likewise. * testsuite/23_containers/vector/bool/modifiers/assign/1.cc: Likewise. * testsuite/23_containers/vector/capacity/max_size.cc: Likewise. * testsuite/23_containers/vector/modifiers/assign/1.cc: Likewise. From-SVN: r263792 --- libstdc++-v3/ChangeLog | 10 ++++++++++ .../testsuite/23_containers/deque/capacity/max_size.cc | 2 +- .../23_containers/deque/modifiers/assign/1.cc | 2 +- .../testsuite/23_containers/list/modifiers/assign/1.cc | 2 +- .../23_containers/vector/bool/modifiers/assign/1.cc | 2 +- .../23_containers/vector/capacity/max_size.cc | 2 +- .../23_containers/vector/modifiers/assign/1.cc | 2 +- 7 files changed, 16 insertions(+), 6 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index e703ffb5143..afa928b0fea 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,13 @@ +2018-08-23 Jonathan Wakely + + * testsuite/23_containers/deque/capacity/max_size.cc: Fix test for + C++98 mode. + * testsuite/23_containers/deque/modifiers/assign/1.cc: Likewise. + * testsuite/23_containers/list/modifiers/assign/1.cc: Likewise. + * testsuite/23_containers/vector/bool/modifiers/assign/1.cc: Likewise. + * testsuite/23_containers/vector/capacity/max_size.cc: Likewise. + * testsuite/23_containers/vector/modifiers/assign/1.cc: Likewise. + 2018-08-22 Jonathan Wakely PR libstdc++/87061 diff --git a/libstdc++-v3/testsuite/23_containers/deque/capacity/max_size.cc b/libstdc++-v3/testsuite/23_containers/deque/capacity/max_size.cc index 3dabdd05544..1a38c4ed698 100644 --- a/libstdc++-v3/testsuite/23_containers/deque/capacity/max_size.cc +++ b/libstdc++-v3/testsuite/23_containers/deque/capacity/max_size.cc @@ -22,7 +22,7 @@ #include #include -using test_type = std::deque; +typedef std::deque test_type; typedef test_type::size_type size_type; typedef test_type::difference_type difference_type; diff --git a/libstdc++-v3/testsuite/23_containers/deque/modifiers/assign/1.cc b/libstdc++-v3/testsuite/23_containers/deque/modifiers/assign/1.cc index fbab09b9ba2..a6668f7c199 100644 --- a/libstdc++-v3/testsuite/23_containers/deque/modifiers/assign/1.cc +++ b/libstdc++-v3/testsuite/23_containers/deque/modifiers/assign/1.cc @@ -27,7 +27,7 @@ int main() { std::deque d; - int array[] { 0, 1, 2 }; + int array[] = { 0, 1, 2 }; input_iterator_seq seq(array, array + 3); d.assign(seq.begin(), seq.end()); diff --git a/libstdc++-v3/testsuite/23_containers/list/modifiers/assign/1.cc b/libstdc++-v3/testsuite/23_containers/list/modifiers/assign/1.cc index c5fde47059a..f4d32883328 100644 --- a/libstdc++-v3/testsuite/23_containers/list/modifiers/assign/1.cc +++ b/libstdc++-v3/testsuite/23_containers/list/modifiers/assign/1.cc @@ -27,7 +27,7 @@ int main() { std::list l; - int array[] { 0, 1, 2 }; + int array[] = { 0, 1, 2 }; input_iterator_seq seq(array, array + 3); l.assign(seq.begin(), seq.end()); diff --git a/libstdc++-v3/testsuite/23_containers/vector/bool/modifiers/assign/1.cc b/libstdc++-v3/testsuite/23_containers/vector/bool/modifiers/assign/1.cc index 833201b39a3..06fb2ab2d03 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/bool/modifiers/assign/1.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/bool/modifiers/assign/1.cc @@ -27,7 +27,7 @@ void test01() std::vector bv; - bool array[] { false, true, true }; + bool array[] = { false, true, true }; input_iterator_seq seq(array, array + 3); bv.assign(seq.begin(), seq.end()); diff --git a/libstdc++-v3/testsuite/23_containers/vector/capacity/max_size.cc b/libstdc++-v3/testsuite/23_containers/vector/capacity/max_size.cc index 499cd7660f9..34d3c4ab96e 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/capacity/max_size.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/capacity/max_size.cc @@ -22,7 +22,7 @@ #include #include -using test_type = std::vector; +typedef std::vector test_type; typedef test_type::size_type size_type; typedef test_type::difference_type difference_type; diff --git a/libstdc++-v3/testsuite/23_containers/vector/modifiers/assign/1.cc b/libstdc++-v3/testsuite/23_containers/vector/modifiers/assign/1.cc index ca7b125e7ca..001f204c93b 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/modifiers/assign/1.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/modifiers/assign/1.cc @@ -27,7 +27,7 @@ void test01() std::vector v; - int array[] { 0, 1, 2 }; + int array[] = { 0, 1, 2 }; input_iterator_seq seq(array, array + 3); v.assign(seq.begin(), seq.end()); -- 2.30.2