1 archer archer-keiths-expr-cumulative
2 b5a7497340b24199f0c7ba7fdf0d54d4df44d6bc
4 --- /dev/null 2011-01-12 06:28:36.282000001 +0100
5 +++ ./gdb/testsuite/gdb.cp/namespace-nested-imports.cc 2009-09-25 06:50:38.000000000 +0200
19 + using namespace A::B;
43 --- /dev/null 2011-01-12 06:28:36.282000001 +0100
44 +++ ./gdb/testsuite/gdb.cp/namespace-nested-imports.exp 2009-09-25 06:50:38.000000000 +0200
46 +# Copyright 2008 Free Software Foundation, Inc.
48 +# This program is free software; you can redistribute it and/or modify
49 +# it under the terms of the GNU General Public License as published by
50 +# the Free Software Foundation; either version 3 of the License, or
51 +# (at your option) any later version.
53 +# This program is distributed in the hope that it will be useful,
54 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
55 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
56 +# GNU General Public License for more details.
58 +# You should have received a copy of the GNU General Public License
59 +# along with this program. If not, see <http://www.gnu.org/licenses/>.
61 +set testfile namespace-nested-imports
62 +set srcfile ${testfile}.cc
63 +set binfile ${objdir}/${subdir}/${testfile}
64 +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
65 + untested "Couldn't compile test program"
69 +# Get things started.
73 +gdb_reinitialize_dir $srcdir/$subdir
76 +############################################
77 +if ![runto_main] then {
78 + perror "couldn't run to breakpoint main"
82 +gdb_test "print ab" "No symbol .* in current context."
84 +############################################
85 +gdb_breakpoint C::first
86 +gdb_continue_to_breakpoint "C::first"
88 +gdb_test "print ab" "No symbol .* in current context."
89 +gdb_test "print C::D::ab" "= 11"
91 +############################################
92 +gdb_breakpoint C::D::second
93 +gdb_continue_to_breakpoint "C::D::second"
95 +gdb_test "print ab" "= 11"
96 --- /dev/null 2011-01-12 06:28:36.282000001 +0100
97 +++ ./gdb/testsuite/gdb.cp/namespace-no-imports.cc 2009-09-25 06:50:38.000000000 +0200
122 + return C::second();
134 + return A::B::first();
136 --- /dev/null 2011-01-12 06:28:36.282000001 +0100
137 +++ ./gdb/testsuite/gdb.cp/namespace-no-imports.exp 2009-09-25 06:50:38.000000000 +0200
139 +# Copyright 2008 Free Software Foundation, Inc.
141 +# This program is free software; you can redistribute it and/or modify
142 +# it under the terms of the GNU General Public License as published by
143 +# the Free Software Foundation; either version 3 of the License, or
144 +# (at your option) any later version.
146 +# This program is distributed in the hope that it will be useful,
147 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
148 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
149 +# GNU General Public License for more details.
151 +# You should have received a copy of the GNU General Public License
152 +# along with this program. If not, see <http://www.gnu.org/licenses/>.
154 +set testfile namespace-no-imports
155 +set srcfile ${testfile}.cc
156 +set binfile ${objdir}/${subdir}/${testfile}
157 +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
158 + untested "Couldn't compile test program"
162 +# Get things started.
166 +gdb_reinitialize_dir $srcdir/$subdir
169 +############################################
170 +if ![runto_main] then {
171 + perror "couldn't run to breakpoint main"
175 +gdb_test "print A::_a" "= 11"
176 +gdb_test "print A::B::ab" "= 22"
177 +gdb_test "print A::B::C::abc" "= 33"
179 +gdb_test "print _a" "No symbol .* in current context."
180 +gdb_test "print ab" "No symbol .* in current context."
181 +gdb_test "print abc" "No symbol .* in current context."
183 +############################################
184 +gdb_breakpoint A::B::first
185 +gdb_continue_to_breakpoint "A::B::first"
187 +gdb_test "print A::_a" "= 11"
188 +gdb_test "print A::B::ab" "= 22"
189 +gdb_test "print A::B::C::abc" "= 33"
191 +gdb_test "print _a" "= 11"
192 +gdb_test "print ab" "= 22"
193 +gdb_test "print C::abc" "= 33"
195 +gdb_test "print abc" "No symbol .* in current context."
197 +############################################
198 +gdb_breakpoint A::B::C::second
199 +gdb_continue_to_breakpoint "A::B::C::second"
201 +gdb_test "print A::_a" "= 11"
202 +gdb_test "print A::B::ab" "= 22"
203 +gdb_test "print A::B::C::abc" "= 33"
205 +gdb_test "print _a" "= 11"
206 +gdb_test "print ab" "= 22"
207 +gdb_test "print abc" "= 33"