diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2019-06-20 10:04:55 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2019-06-20 10:04:55 +0100 |
commit | 94872d7f99ceb9da9ecb90064d59d4518c9a6f37 (patch) | |
tree | 27f9ae86670fc8c7b0911535e76af91cdd13c923 /libstdc++-v3/testsuite | |
parent | d84ea910c99d0e8d478d0c34bdf722faa298a0b9 (diff) | |
download | gcc-94872d7f99ceb9da9ecb90064d59d4518c9a6f37.zip gcc-94872d7f99ceb9da9ecb90064d59d4518c9a6f37.tar.gz gcc-94872d7f99ceb9da9ecb90064d59d4518c9a6f37.tar.bz2 |
Improve tests for std::vector<bool> printer
The current tests wouldn't notice if the vector<bool> contents were
printed in reverse, because it would read the same forwards and
backwards. Change the content so the tests would fail if that happened.
* testsuite/libstdc++-prettyprinters/simple.cc: Use non-palindromic
vector<bool> for test.
* testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
From-SVN: r272499
Diffstat (limited to 'libstdc++-v3/testsuite')
-rw-r--r-- | libstdc++-v3/testsuite/libstdc++-prettyprinters/simple.cc | 3 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/libstdc++-prettyprinters/simple11.cc | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple.cc b/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple.cc index 04c1ef6..2e7f07b 100644 --- a/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple.cc +++ b/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple.cc @@ -120,11 +120,12 @@ main() vb.reserve(100); vb.push_back(true); vb.push_back(true); + vb.push_back(true); vb.push_back(false); vb.push_back(false); vb.push_back(true); vb.erase(vb.begin()); -// { dg-final { regexp-test vb {std::(__debug::)?vector<bool> of length 4, capacity 128 = \\{true, false, false, true\\}} } } +// { dg-final { regexp-test vb {std::(__debug::)?vector<bool> of length 5, capacity 128 = \\{true, true, false, false, true\\}} } } __gnu_cxx::slist<int> sll; sll.push_front(23); diff --git a/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple11.cc b/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple11.cc index ace217cc..24c871f 100644 --- a/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple11.cc +++ b/libstdc++-v3/testsuite/libstdc++-prettyprinters/simple11.cc @@ -113,11 +113,12 @@ main() vb.reserve(100); vb.push_back(true); vb.push_back(true); + vb.push_back(true); vb.push_back(false); vb.push_back(false); vb.push_back(true); vb.erase(vb.begin()); -// { dg-final { regexp-test vb {std::(__debug::)?vector<bool> of length 4, capacity 128 = \\{true, false, false, true\\}} } } +// { dg-final { regexp-test vb {std::(__debug::)?vector<bool> of length 5, capacity 128 = \\{true, true, false, false, true\\}} } } __gnu_cxx::slist<int> sll; sll.push_front(23); |