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.
+2009-09-21 Keith Seitz <keiths@redhat.com>
+
+ * 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.
+
2009-09-21 Phil Muldoon <pmuldoon@redhat.com>
PR python/10633
public:
int x;
Base1(int i) { x = i; }
+ ~Base1 () { }
};
+typedef Base1 base1;
+
class Foo
{
public:
i = class_param.Aref_x (g_A);
i = class_param.Aval_a (g_A);
i = class_param.Aval_x (g_A);
+
+ base1 b (3);
}
fail "calling method for small class"
}
}
+
+ gdb_test "print base1::Base1" "<.*Base1.*>" "print ctor of typedef class"
+ gdb_test "print base1::~Base1" "<.*~Base1(\\(\\))?>" \
+ "print dtor of typedef class"
}
do_tests
template<class T, char sz>
class Baz {
public:
+ ~Baz () { };
int x;
T t;
T baz (int, T);
return 0;
}
+typedef Baz<int, 1> intBazOne;
+
// Template with char * parameter
template<class T, char * sz>
class Qux {
i=GetMax<int>(x,y);
n=GetMax<long>(l,m);
+ intBazOne ibo;
+ z = ibo.baz (2, 21);
return 0;
}
}
}
+proc test_template_typedef {} {
+
+ gdb_test "print intBazOne::baz" ".*baz\\(int, int\\)>" \
+ "print method of template typedef"
+
+ gdb_test "print intBazOne::~Baz" ".*~Baz(\\(\\))?>" \
+ "print destructor of template typedef"
+}
proc do_tests {} {
global prms_id
test_ptype_of_templates
test_template_breakpoints
+ test_template_typedef
if [ runto_main] {
test_template_calls