* gdb.cp/classes.cc (ByAnyOtherName): Add typedef and
use it instead of "Foo". * gdb.cp/classes.exp (do_tests): Add a test to access a method through a typedef'd class name.
This commit is contained in:
parent
a8acdf4603
commit
40f0318e99
@ -1,3 +1,10 @@
|
||||
2009-11-11 Keith Seitz <keiths@redhat.com>
|
||||
|
||||
* gdb.cp/classes.cc (ByAnyOtherName): Add typedef and
|
||||
use it instead of "Foo".
|
||||
* gdb.cp/classes.exp (do_tests): Add a test to access
|
||||
a method through a typedef'd class name.
|
||||
|
||||
2009-11-11 Nathan Froyd <froydnj@codesourcery.com>
|
||||
|
||||
* gdb.base/long_long.exp: Permit leading zeros on floating-point
|
||||
|
@ -417,6 +417,8 @@ class Foo
|
||||
int times (int y);
|
||||
};
|
||||
|
||||
typedef Foo ByAnyOtherName;
|
||||
|
||||
class Bar : public Base1, public Foo {
|
||||
public:
|
||||
int z;
|
||||
@ -431,7 +433,7 @@ int Foo::st = 100;
|
||||
|
||||
Foo::operator int() { return x; }
|
||||
|
||||
Foo foo(10, 11);
|
||||
ByAnyOtherName foo(10, 11);
|
||||
Bar bar(20, 21, 22);
|
||||
|
||||
class ClassWithEnum {
|
||||
|
@ -636,6 +636,8 @@ proc do_tests {} {
|
||||
gdb_test "print base1::Base1" "<.*Base1.*>" "print ctor of typedef class"
|
||||
gdb_test "print base1::~Base1" "<.*~Base1(\\(\\))?>" \
|
||||
"print dtor of typedef class"
|
||||
|
||||
gdb_test "list ByAnyOtherName::times" ".*int Foo::times.*"
|
||||
}
|
||||
|
||||
do_tests
|
||||
|
Loading…
x
Reference in New Issue
Block a user