mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-12-19 00:55:13 +08:00
libstdc++: Add another testcase for std::unique_ptr printer [PR103086]
libstdc++-v3/ChangeLog: PR libstdc++/103086 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr with non-empty pointer and non-empty deleter.
This commit is contained in:
parent
39de0e5411
commit
c59ec55c34
@ -151,6 +151,17 @@ main()
|
||||
std::unique_ptr<int, Deleter>& rempty_ptr = empty_ptr;
|
||||
// { dg-final { note-test rempty_ptr {std::unique_ptr<int> = {get() = {<No data fields>}}} } }
|
||||
|
||||
struct Deleter_pr103086
|
||||
{
|
||||
int deleter_member = -1;
|
||||
void operator()(int*) const noexcept { }
|
||||
};
|
||||
|
||||
std::unique_ptr<int, Deleter_pr103086> uniq_ptr;
|
||||
// { dg-final { note-test uniq_ptr {std::unique_ptr<int> = {get() = 0x0}} } }
|
||||
std::unique_ptr<int, Deleter_pr103086>& runiq_ptr = uniq_ptr;
|
||||
// { dg-final { note-test runiq_ptr {std::unique_ptr<int> = {get() = 0x0}} } }
|
||||
|
||||
ExTuple tpl(6,7);
|
||||
// { dg-final { note-test tpl {std::tuple containing = {[1] = 6, [2] = 7}} } }
|
||||
ExTuple &rtpl = tpl;
|
||||
|
Loading…
Reference in New Issue
Block a user