diff options
author | Sami Wagiaalla <swagiaal@redhat.com> | 2010-06-25 18:05:30 +0000 |
---|---|---|
committer | Sami Wagiaalla <swagiaal@redhat.com> | 2010-06-25 18:05:30 +0000 |
commit | 099ef718e3aaecb6668e206fd9110ab57ae5cc45 (patch) | |
tree | edd426a4c2056c5ee9a5b21c52859b668dcd0051 /gdb | |
parent | c0cc4c83bd3d981e727be0984987911edd47b98c (diff) | |
download | gdb-099ef718e3aaecb6668e206fd9110ab57ae5cc45.zip gdb-099ef718e3aaecb6668e206fd9110ab57ae5cc45.tar.gz gdb-099ef718e3aaecb6668e206fd9110ab57ae5cc45.tar.bz2 |
Added import loop test.
2010-06-25 Sami Wagiaalla <swagiaal@redhat.com>
* gdb.cp/operator.cc: Created an import loop.
* gdb.cp/operator.exp: Added testcase for import loop.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.cp/operator.cc | 16 | ||||
-rw-r--r-- | gdb/testsuite/gdb.cp/operator.exp | 3 |
3 files changed, 24 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 3c5b7a6..7bfcec3 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2010-06-25 Sami Wagiaalla <swagiaal@redhat.com> + + * gdb.cp/operator.cc: Created an import loop. + * gdb.cp/operator.exp: Added testcase for import loop. + 2010-06-25 Jan Kratochvil <jan.kratochvil@redhat.com> Test PR python/11407. diff --git a/gdb/testsuite/gdb.cp/operator.cc b/gdb/testsuite/gdb.cp/operator.cc index cc925a0..8431376 100644 --- a/gdb/testsuite/gdb.cp/operator.cc +++ b/gdb/testsuite/gdb.cp/operator.cc @@ -157,6 +157,22 @@ using namespace N; //------------------ +namespace O +{ + namespace P + { + using namespace ::O; + } + using namespace P; +} + +using namespace O; + +class test { }; +test x; + +//------------------ + int main () { A a; diff --git a/gdb/testsuite/gdb.cp/operator.exp b/gdb/testsuite/gdb.cp/operator.exp index ac89d2b..0e36e4c 100644 --- a/gdb/testsuite/gdb.cp/operator.exp +++ b/gdb/testsuite/gdb.cp/operator.exp @@ -56,3 +56,6 @@ gdb_test "p j == 1" "Cannot resolve function operator== to any overloaded instan # Test that indirectly imported operators work gdb_test "p l == 1" "= 88" + +# Test that we don't fall into an import loop +gdb_test {p x[0]} {No symbol "operator\[\]" in current context.} |