diff options
author | Keith Seitz <keiths@redhat.com> | 2009-09-21 19:23:22 +0000 |
---|---|---|
committer | Keith Seitz <keiths@redhat.com> | 2009-09-21 19:23:22 +0000 |
commit | 3fe8f3b349c62a22a209e7eace236f9d2a2effcb (patch) | |
tree | 5e46642c6a7e0dfddbe073e6258d47f869496502 /gdb/testsuite/gdb.cp/classes.cc | |
parent | cbacf5fd946b7a3faf916c57e6775407f6fc01f2 (diff) | |
download | gdb-3fe8f3b349c62a22a209e7eace236f9d2a2effcb.zip gdb-3fe8f3b349c62a22a209e7eace236f9d2a2effcb.tar.gz gdb-3fe8f3b349c62a22a209e7eace236f9d2a2effcb.tar.bz2 |
* gdb.cp/classes.exp (do_tests): Add tests to print a constructor
and destructor using typedef name of class.
* gdb.cp/classes.cc (class Base1): Add a destructor.
(base1): New typedef.
(use_methods): Instanitate an object of type base1.
* gdb.cp/templates.exp (test_template_typedef): New procedure.
(do_tests): Call test_template_typedef.
* gdb.cp/templates.cc (Baz::~Baz): New method.
(intBazOne): New typedef.
(main): Instantiate intBazOne.
Diffstat (limited to 'gdb/testsuite/gdb.cp/classes.cc')
-rw-r--r-- | gdb/testsuite/gdb.cp/classes.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.cp/classes.cc b/gdb/testsuite/gdb.cp/classes.cc index 927aad3..913627f 100644 --- a/gdb/testsuite/gdb.cp/classes.cc +++ b/gdb/testsuite/gdb.cp/classes.cc @@ -400,8 +400,11 @@ class Base1 { public: int x; Base1(int i) { x = i; } + ~Base1 () { } }; +typedef Base1 base1; + class Foo { public: @@ -564,6 +567,8 @@ void use_methods () i = class_param.Aref_x (g_A); i = class_param.Aval_a (g_A); i = class_param.Aval_x (g_A); + + base1 b (3); } |