diff options
author | swagiaal <swagiaal> | 2010-06-25 18:05:29 +0000 |
---|---|---|
committer | swagiaal <swagiaal> | 2010-06-25 18:05:29 +0000 |
commit | ddbe9d6b92aaa9b2119c144babbe191596deff6f (patch) | |
tree | c211c244d92875c21a0a2defdafeaf989aa3f244 /gdb/testsuite/gdb.cp | |
parent | 5cde5e8c872d73b8826794a0270b064cf19dd442 (diff) | |
download | gdb-ddbe9d6b92aaa9b2119c144babbe191596deff6f.tar.gz |
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/testsuite/gdb.cp')
-rw-r--r-- | gdb/testsuite/gdb.cp/operator.cc | 16 | ||||
-rw-r--r-- | gdb/testsuite/gdb.cp/operator.exp | 3 |
2 files changed, 19 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.cp/operator.cc b/gdb/testsuite/gdb.cp/operator.cc index cc925a06eb0..8431376574d 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 ac89d2b8139..0e36e4cccc0 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.} |