Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Unified Diff: gdb/testsuite/gdb.cp/method2.exp

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/testsuite/gdb.cp/method.exp ('k') | gdb/testsuite/gdb.cp/minsym-fallback.exp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/testsuite/gdb.cp/method2.exp
diff --git a/gdb/testsuite/gdb.cp/method2.exp b/gdb/testsuite/gdb.cp/method2.exp
index f44381f9b748c4f47d1beed518b6abf2501f560b..34c874a9ae7bca9e6670fbfcd4b65dc72e41606c 100644
--- a/gdb/testsuite/gdb.cp/method2.exp
+++ b/gdb/testsuite/gdb.cp/method2.exp
@@ -20,25 +20,14 @@
if { [skip_cplus_tests] } { continue }
-set testfile "method2"
-set srcfile ${testfile}.cc
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile .cc
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
+if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
untested method2.exp
return -1
}
-if [get_compiler_info $binfile "c++"] {
- return -1
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-if ![runto_main] then {
+if {![runto_main]} {
perror "couldn't run to breakpoint"
continue
}
@@ -50,8 +39,21 @@ proc test_break { lang } {
"" \
"setting language $lang"
+ # Menu items should be alphabetical
+ set ovlds [lsort {"" "int" "A*"}]
+ set items {"cancel" "all"}
+ foreach ovld $ovlds {
+ lappend items "A::method($ovld)"
+ }
+ set menu_items {}
+ set idx 0
+ foreach item $items {
+ lappend menu_items ".$idx. .*[string_to_regexp $item]"
+ incr idx
+ }
+ set expect [join $menu_items {.*[\r\n]*}]
gdb_test_multiple "break A::method" "breaking in method ($lang)" {
- -re ".0. cancel.*\[\r\n\]*.1. all.*\[\r\n\]*.2. .*:A::method\\(A\\*\\)\[\r\n\]*.3. .*:A::method\\(int\\)\[\r\n\]*.4. .*:A::method\\(\\)\[\r\n\]*> $" {
+ -re $expect {
gdb_test "0" \
"canceled" \
"breaking in method ($lang)"
« no previous file with comments | « gdb/testsuite/gdb.cp/method.exp ('k') | gdb/testsuite/gdb.cp/minsym-fallback.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698