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

Side by Side Diff: gdb/testsuite/gdb.cp/cpcompletion.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 unified diff | Download patch
« no previous file with comments | « gdb/testsuite/gdb.cp/cp-relocate.exp ('k') | gdb/testsuite/gdb.cp/cpexprs.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2009-2012 Free Software Foundation, Inc. 1 # Copyright 2009-2012 Free Software Foundation, Inc.
2 2
3 # This program is free software; you can redistribute it and/or modify 3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by 4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 3 of the License, or 5 # the Free Software Foundation; either version 3 of the License, or
6 # (at your option) any later version. 6 # (at your option) any later version.
7 # 7 #
8 # This program is distributed in the hope that it will be useful, 8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 } 42 }
43 if {[string length $failed] != 0} { 43 if {[string length $failed] != 0} {
44 fail "$name ($failed not found)" 44 fail "$name ($failed not found)"
45 } else { 45 } else {
46 pass $name 46 pass $name
47 } 47 }
48 } 48 }
49 } 49 }
50 } 50 }
51 51
52 if $tracelevel then {
53 strace $tracelevel
54 }
55
56 if { [skip_cplus_tests] } { continue } 52 if { [skip_cplus_tests] } { continue }
57 53
58 set testfile pr9594 54 standard_testfile pr9594.cc
59 set binfile ${objdir}/${subdir}/${testfile}
60 55
61 if {[gdb_compile "${srcdir}/${subdir}/${testfile}.cc" "${testfile}.o" object {c+ + debug}] != ""} { 56 if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
62 untested cpcompletion.exp
63 return -1 57 return -1
64 } 58 }
65 59
66 if {[gdb_compile "${testfile}.o" ${binfile} executable {c++ debug}] != "" } {
67 untested cpcompletion.exp
68 return -1
69 }
70
71 gdb_exit
72
73 gdb_start
74 gdb_reinitialize_dir $srcdir/$subdir
75 gdb_load ${binfile}
76
77 # Test that completion is restricted by class name (all methods) 60 # Test that completion is restricted by class name (all methods)
78 test_class_complete Foo "" "complete class methods" \ 61 test_class_complete Foo "" "complete class methods" \
79 [list Foo Foofoo get_foo set_foo ~Foo] 62 [list Foo Foofoo get_foo set_foo ~Foo]
80 63
81 test_class_complete Foo F "complete class methods beginning with F" \ 64 test_class_complete Foo F "complete class methods beginning with F" \
82 [list Foo Foofoo] 65 [list Foo Foofoo]
83 66
84 # The tests below depend on the current code scope. 67 # The tests below depend on the current code scope.
85 68
86 set bp_location [gdb_get_line_number "Set breakpoint here" ${testfile}.cc] 69 set bp_location [gdb_get_line_number "Set breakpoint here" ${srcfile}]
87 70
88 if {![runto "${testfile}.cc:$bp_location"]} { 71 if {![runto "${srcfile}:$bp_location"]} {
89 perror "test suppressed" 72 perror "test suppressed"
90 return 73 return
91 } 74 }
92 75
93 # This also tests inheritance -- completion should only see a single 76 # This also tests inheritance -- completion should only see a single
94 # "get_foo". 77 # "get_foo".
95 gdb_test "complete p foo1.g" "p foo1\\.get_foo" 78 gdb_test "complete p foo1.g" "p foo1\\.get_foo"
96 79
97 # Test inheritance without overriding. 80 # Test inheritance without overriding.
98 gdb_test "complete p foo1.base" "p foo1\\.base_function_only" 81 gdb_test "complete p foo1.base" "p foo1\\.base_function_only"
99 82
100 # Test non-completion of constructor names. 83 # Test non-completion of constructor names.
101 gdb_test "complete p foo1.Fo" "p foo1\\.Foofoo" 84 gdb_test "complete p foo1.Fo" "p foo1\\.Foofoo"
102 85
103 # Test completion with an anonymous struct. 86 # Test completion with an anonymous struct.
104 gdb_test "complete p a.g" "p a\\.get" 87 gdb_test "complete p a.g" "p a\\.get"
OLDNEW
« no previous file with comments | « gdb/testsuite/gdb.cp/cp-relocate.exp ('k') | gdb/testsuite/gdb.cp/cpexprs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698