public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM] archer-keiths-expr-cumulative: Test nested namespace import statements.
@ 2009-04-21 18:11 swagiaal
0 siblings, 0 replies; only message in thread
From: swagiaal @ 2009-04-21 18:11 UTC (permalink / raw)
To: archer-commits
The branch, archer-keiths-expr-cumulative has been updated
via 937e9fbc48c56b61efa7a85cc478b13f0d042110 (commit)
from 8b84e7646a4477255feeb532cb52512ed0945e83 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email.
- Log -----------------------------------------------------------------
commit 937e9fbc48c56b61efa7a85cc478b13f0d042110
Author: Sami Wagiaalla <swagiaal@redhat.com>
Date: Tue Apr 21 14:09:57 2009 -0400
Test nested namespace import statements.
+2009-04-21 Sami Wagiaalla <swagiaal@redhat.com>
+
+ * gdb.cp/namespace-nested-imports.cc: New test file.
+ * gdb.cp/namespace-nested-imports.exp: New test.
+
-----------------------------------------------------------------------
Summary of changes:
gdb/testsuite/gdb.cp/namespace-nested-imports.cc | 36 ++++++++++++++++++
...no-imports.exp => namespace-nested-imports.exp} | 38 ++++----------------
gdb/testsuite/gdb.cp/namespace-no-imports.exp | 12 ++----
3 files changed, 47 insertions(+), 39 deletions(-)
create mode 100644 gdb/testsuite/gdb.cp/namespace-nested-imports.cc
copy gdb/testsuite/gdb.cp/{namespace-no-imports.exp => namespace-nested-imports.exp} (61%)
First 500 lines of diff:
diff --git a/gdb/testsuite/gdb.cp/namespace-nested-imports.cc b/gdb/testsuite/gdb.cp/namespace-nested-imports.cc
new file mode 100644
index 0000000..9723f87
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/namespace-nested-imports.cc
@@ -0,0 +1,36 @@
+namespace A
+{
+ namespace B
+ {
+ int ab = 11;
+ }
+}
+
+namespace C
+{
+ namespace D
+ {
+ using namespace A::B;
+
+ int
+ second()
+ {
+ ab;
+ return 0;
+ }
+ }
+
+ int
+ first()
+ {
+ //ab;
+ return D::second();
+ }
+}
+
+int
+main()
+{
+ //ab;
+ return C::first();
+}
diff --git a/gdb/testsuite/gdb.cp/namespace-no-imports.exp b/gdb/testsuite/gdb.cp/namespace-nested-imports.exp
similarity index 61%
copy from gdb/testsuite/gdb.cp/namespace-no-imports.exp
copy to gdb/testsuite/gdb.cp/namespace-nested-imports.exp
index 3804002..6bb0ddc 100644
--- a/gdb/testsuite/gdb.cp/namespace-no-imports.exp
+++ b/gdb/testsuite/gdb.cp/namespace-nested-imports.exp
@@ -20,7 +20,7 @@ if $tracelevel then {
set prms_id 0
set bug_id 0
-set testfile namespace-no-imports
+set testfile namespace-nested-imports
set srcfile ${testfile}.cc
set binfile ${objdir}/${subdir}/${testfile}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
@@ -41,40 +41,16 @@ if ![runto_main] then {
continue
}
-gdb_test "print A::_a" "= 11"
-gdb_test "print A::B::ab" "= 22"
-gdb_test "print A::B::C::abc" "= 33"
-
-gdb_test "print _a" "No symbol .* in current context."
gdb_test "print ab" "No symbol .* in current context."
-gdb_test "print abc" "No symbol .* in current context."
############################################
-if ![runto A::B::first] then {
- perror "couldn't run to breakpoint marker4"
- continue
-}
-
-gdb_test "print A::_a" "= 11"
-gdb_test "print A::B::ab" "= 22"
-gdb_test "print A::B::C::abc" "= 33"
-
-gdb_test "print _a" "= 11"
-gdb_test "print ab" "= 22"
-gdb_test "print C::abc" "= 33"
+gdb_breakpoint C::first
+gdb_continue_to_breakpoint "C::first"
-gdb_test "print abc" "No symbol .* in current context."
+gdb_test "print ab" "No symbol .* in current context."
############################################
-if ![runto A::B::C::second] then {
- perror "couldn't run to breakpoint marker4"
- continue
-}
-
-gdb_test "print A::_a" "= 11"
-gdb_test "print A::B::ab" "= 22"
-gdb_test "print A::B::C::abc" "= 33"
+gdb_breakpoint C::D::second
+gdb_continue_to_breakpoint "C::D::second"
-gdb_test "print _a" "= 11"
-gdb_test "print ab" "= 22"
-gdb_test "print abc" "= 33"
+gdb_test "print ab" "= 11"
diff --git a/gdb/testsuite/gdb.cp/namespace-no-imports.exp b/gdb/testsuite/gdb.cp/namespace-no-imports.exp
index 3804002..e508103 100644
--- a/gdb/testsuite/gdb.cp/namespace-no-imports.exp
+++ b/gdb/testsuite/gdb.cp/namespace-no-imports.exp
@@ -50,10 +50,8 @@ gdb_test "print ab" "No symbol .* in current context."
gdb_test "print abc" "No symbol .* in current context."
############################################
-if ![runto A::B::first] then {
- perror "couldn't run to breakpoint marker4"
- continue
-}
+gdb_breakpoint A::B::first
+gdb_continue_to_breakpoint "A::B::first"
gdb_test "print A::_a" "= 11"
gdb_test "print A::B::ab" "= 22"
@@ -66,10 +64,8 @@ gdb_test "print C::abc" "= 33"
gdb_test "print abc" "No symbol .* in current context."
############################################
-if ![runto A::B::C::second] then {
- perror "couldn't run to breakpoint marker4"
- continue
-}
+gdb_breakpoint A::B::C::second
+gdb_continue_to_breakpoint "A::B::C::second"
gdb_test "print A::_a" "= 11"
gdb_test "print A::B::ab" "= 22"
hooks/post-receive
--
Repository for Project Archer.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-04-21 18:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-21 18:11 [SCM] archer-keiths-expr-cumulative: Test nested namespace import statements swagiaal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).