diff options
author | Juraj Oršulić <juraj.orsulic@fer.hr> | 2018-01-09 18:49:57 +0000 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2018-01-09 18:49:57 +0000 |
commit | d2dfcf823c0ba2b654f8d25a9ec46f59612cb60c (patch) | |
tree | 98dae7d9113fdd396fe5b7681fa6fc3c1e97b140 /libstdc++-v3/testsuite/libstdc++-prettyprinters/shared_ptr.cc | |
parent | 1eac10b39f164c3010fe8fee2fed3269fa832967 (diff) | |
download | gcc-d2dfcf823c0ba2b654f8d25a9ec46f59612cb60c.tar.gz |
PR libstdc++/59253 Improve pretty printers for smart pointers
PR libstdc++/59253 (partial)
* python/libstdcxx/v6/printers.py (SmartPtrIterator): Common iterator
type for pointer stored by shared_ptr, weak_ptr and unique_ptr.
(SharedPointerPrinter, UniquePointerPrinter): Treat stored values as
children.
* testsuite/libstdc++-prettyprinters/cxx11.cc: Update expected output
of unique_ptr printer.
* testsuite/libstdc++-prettyprinters/shared_ptr.cc: Update expected
output of shared_ptr printer.
From-SVN: r256390
Diffstat (limited to 'libstdc++-v3/testsuite/libstdc++-prettyprinters/shared_ptr.cc')
-rw-r--r-- | libstdc++-v3/testsuite/libstdc++-prettyprinters/shared_ptr.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libstdc++-v3/testsuite/libstdc++-prettyprinters/shared_ptr.cc b/libstdc++-v3/testsuite/libstdc++-prettyprinters/shared_ptr.cc index 556ecd1cc35..27c2e405fa4 100644 --- a/libstdc++-v3/testsuite/libstdc++-prettyprinters/shared_ptr.cc +++ b/libstdc++-v3/testsuite/libstdc++-prettyprinters/shared_ptr.cc @@ -49,25 +49,25 @@ main() typedef std::weak_ptr<int> weak; shared esp; -// { dg-final { note-test esp "std::shared_ptr (empty) 0x0" } } +// { dg-final { note-test esp "std::shared_ptr<int> (empty) = {get() = 0x0}" } } weak ewp1; -// { dg-final { note-test ewp1 "std::weak_ptr (empty) 0x0" } } +// { dg-final { note-test ewp1 "std::weak_ptr<int> (empty) = {get() = 0x0}" } } weak ewp2 = esp; -// { dg-final { note-test ewp2 "std::weak_ptr (empty) 0x0" } } +// { dg-final { note-test ewp2 "std::weak_ptr<int> (empty) = {get() = 0x0}" } } shared sp1 = make(0x12345678); shared sp2 = sp1; -// { dg-final { note-test sp1 "std::shared_ptr (count 2, weak 0) 0x12345678" } } +// { dg-final { note-test sp1 "std::shared_ptr<int> (use count 2, weak count 0) = {get() = 0x12345678}" } } shared sp3 = make(0x12344321); weak sp4 = sp3; weak wp1 = sp3; -// { dg-final { note-test wp1 "std::weak_ptr (count 1, weak 2) 0x12344321" } } +// { dg-final { note-test wp1 "std::weak_ptr<int> (use count 1, weak count 2) = {get() = 0x12344321}" } } shared sp5 = make(0x56788765); weak wp2 = sp5; sp5.reset(); -// { dg-final { note-test wp2 "std::weak_ptr (expired, weak 1) 0x56788765" } } +// { dg-final { note-test wp2 "std::weak_ptr<int> (expired, weak count 1) = {get() = 0x56788765}" } } placeholder(""); // Mark SPOT use(esp); |