aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.cp/namespace.exp
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2009-11-12 19:54:39 +0000
committerDaniel Jacobowitz <drow@false.org>2009-11-12 19:54:39 +0000
commitb598bfda9b19e4d2b0f2ac646708315e123bdbbb (patch)
treeb898c382920a9c865d4d2539f7a66fa75a9a9e4f /gdb/testsuite/gdb.cp/namespace.exp
parentd48cc9dd6fbc2e64af32b5ec1680e8255eeb4edd (diff)
downloadgdb-b598bfda9b19e4d2b0f2ac646708315e123bdbbb.zip
gdb-b598bfda9b19e4d2b0f2ac646708315e123bdbbb.tar.gz
gdb-b598bfda9b19e4d2b0f2ac646708315e123bdbbb.tar.bz2
testsuite/
* lib/gdb.exp (gdb_test_multiple): Handle "y or [n]", "[y] or n", and the breakpoint menu. Do not call perror if a prompt is seen. Consume the following GDB prompt. * gdb.cp/method2.exp (test_break): Use gdb_test_multiple. * gdb.cp/namespace.exp: Use gdb_test. * gdb.cp/templates.exp: Use gdb_test. (test_template_breakpoints): Use gdb_test_multiple.
Diffstat (limited to 'gdb/testsuite/gdb.cp/namespace.exp')
-rw-r--r--gdb/testsuite/gdb.cp/namespace.exp30
1 files changed, 6 insertions, 24 deletions
diff --git a/gdb/testsuite/gdb.cp/namespace.exp b/gdb/testsuite/gdb.cp/namespace.exp
index 76b1b82..e1ddd50 100644
--- a/gdb/testsuite/gdb.cp/namespace.exp
+++ b/gdb/testsuite/gdb.cp/namespace.exp
@@ -163,14 +163,8 @@ gdb_expect {
# Break on a function in a namespace
-send_gdb "break AAA::xyzq\n"
-gdb_expect {
- -re "Breakpoint.*at $hex: file.*namespace.cc, line 42\\.\r\n$gdb_prompt $" {
- pass "break AAA::xyzq"
- }
- -re ".*$gdb_prompt $" { fail "break AAA::xyzq" }
- timeout { fail "(timeout) break AAA::xyzq" }
-}
+gdb_test "break AAA::xyzq" \
+ "Breakpoint.*at $hex: file.*namespace.cc, line 42\\."
# Call a function in a nested namespace
@@ -194,14 +188,8 @@ gdb_expect {
# Break on a function in a nested namespace
-send_gdb "break BBB::CCC::xyzq\n"
-gdb_expect {
- -re "Breakpoint.*at $hex: file.*namespace.cc, line 58\\.\r\n$gdb_prompt $" {
- pass "break BBB::CCC::xyzq"
- }
- -re ".*$gdb_prompt $" { fail "break BBB::CCC::xyzq" }
- timeout { fail "(timeout) break BBB::CCC::xyzq" }
-}
+gdb_test "break BBB::CCC::xyzq" \
+ "Breakpoint.*at $hex: file.*namespace.cc, line 58\\."
# Print address of a function in a class in a namespace
@@ -225,14 +213,8 @@ gdb_expect {
# Break on a function in a class in a namespace
-send_gdb "break BBB::Class::xyzq\n"
-gdb_expect {
- -re "Breakpoint.*at $hex: file.*namespace.cc, line 63\\.\r\n$gdb_prompt $" {
- pass "break BBB::Class::xyzq"
- }
- -re ".*$gdb_prompt $" { fail "break BBB::Class::xyzq" }
- timeout { fail "(timeout) break BBB::Class::xyzq" }
-}
+gdb_test "break BBB::Class::xyzq" \
+ "Breakpoint.*at $hex: file.*namespace.cc, line 63\\."
# Test to see if the appropriate namespaces are in scope when trying
# to print out stuff from within a function defined within a