aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/testsuite/ChangeLog.cplus6
-rw-r--r--gdb/testsuite/gdb.c++/method.exp2
-rw-r--r--gdb/testsuite/gdb.c++/templates.exp4
3 files changed, 9 insertions, 3 deletions
diff --git a/gdb/testsuite/ChangeLog.cplus b/gdb/testsuite/ChangeLog.cplus
index 3436b73..cd92a3d 100644
--- a/gdb/testsuite/ChangeLog.cplus
+++ b/gdb/testsuite/ChangeLog.cplus
@@ -1,3 +1,9 @@
+2002-10-30 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.c++/method.exp (print this): Allow "A const".
+ * gdb.c++/templates.exp (ptype fvpchar)
+ (print Foo<volatile char *>::Foo): Allow consts after type names.
+
2002-10-22 David Carlton <carlton@math.stanford.edu>
* gdb.c++/namespace.exp: Add tests involving namespaces
diff --git a/gdb/testsuite/gdb.c++/method.exp b/gdb/testsuite/gdb.c++/method.exp
index a085b14..d6b02a4 100644
--- a/gdb/testsuite/gdb.c++/method.exp
+++ b/gdb/testsuite/gdb.c++/method.exp
@@ -111,7 +111,7 @@ get_debug_format
send_gdb "print this\n"
gdb_expect {
- -re "\\$\[0-9\]* = \\(const (class |)A *\\* *(const|)\\) $hex\r\n$gdb_prompt $" {
+ -re "\\$\[0-9\]* = \\((const (class |)A|A const) *\\* *(const|)\\) $hex\r\n$gdb_prompt $" {
pass "print this in A::bar"
}
-re "\\$\[0-9\]* = \\((class |)A *\\* *(const|)\\) $hex\r\n$gdb_prompt $" {
diff --git a/gdb/testsuite/gdb.c++/templates.exp b/gdb/testsuite/gdb.c++/templates.exp
index a6d35fc..75d5b64 100644
--- a/gdb/testsuite/gdb.c++/templates.exp
+++ b/gdb/testsuite/gdb.c++/templates.exp
@@ -287,7 +287,7 @@ gdb_expect {
send_gdb "ptype fvpchar\n"
gdb_expect {
- -re "type = (class |)Foo<volatile char ?\\*> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*.*char.*\\*t;\r\n\r\n\[ \t\]*.*char \\* foo\\(int,.*char.*\\*\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype fvpchar" }
+ -re "type = (class |)Foo<volatile char ?\\*> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*.*char.*\\*t;\r\n\r\n\[ \t\]*.*char.* \\* foo\\(int,.*char.*\\*\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype fvpchar" }
-re "$gdb_prompt $" { fail "ptype fvpchar" }
timeout { fail "(timeout) ptype fvpchar" }
}
@@ -296,7 +296,7 @@ gdb_expect {
send_gdb "print Foo<volatile char *>::foo\n"
gdb_expect {
- -re "\\$\[0-9\]* = \\{.*char \\*\\((class |)Foo<volatile char \\*> \\*, int, .*char \\*\\)\\} $hex <Foo<.*char.*\\*>::foo\\(int, .*char.*\\*\\)>\r\n$gdb_prompt $" { pass "print Foo<volatile char *>::foo" }
+ -re "\\$\[0-9\]* = \\{.*char \\*\\((class |)Foo<volatile char ?\\*> \\*, int, .*char \\*\\)\\} $hex <Foo<.*char.*\\*>::foo\\(int, .*char.*\\*\\)>\r\n$gdb_prompt $" { pass "print Foo<(volatile char|char volatile) *>::foo" }
-re "$gdb_prompt $" { fail "print Foo<volatile char *>::foo" }
timeout { fail "(timeout) print Foo<volatile char *>::foo" }
}