Commit 94872d7f by Jonathan Wakely Committed by Jonathan Wakely

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
parent d84ea910
2019-06-20 Jonathan Wakely <jwakely@redhat.com>
* testsuite/libstdc++-prettyprinters/simple.cc: Use non-palindromic
vector<bool> for test.
* testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
2019-06-19 Jonathan Wakely <jwakely@redhat.com>
* include/bits/stream_iterator.h (istream_iterator::_M_equal()): Make
......
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment