aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.c++/maint.exp12
2 files changed, 17 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 7ace150..96b2838 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2003-04-23 David Carlton <carlton@bactrian.org>
+
+ * gdb.c++/maint.exp (test_first_component): Add tests for
+ 'operator' in more locations.
+
2003-04-16 Kevin Buettner <kevinb@redhat.com>
* gdb.base/args.exp: Invoke gdb_load for simulator targets.
diff --git a/gdb/testsuite/gdb.c++/maint.exp b/gdb/testsuite/gdb.c++/maint.exp
index 6e1da97..a0f15f9 100644
--- a/gdb/testsuite/gdb.c++/maint.exp
+++ b/gdb/testsuite/gdb.c++/maint.exp
@@ -63,6 +63,18 @@ proc test_first_component {} {
test_single_component "foo(std::basic_streambuf<wchar_t,std::char_traits<wchar_t> >)"
test_single_component "operator>(X::Y)"
+ # Operator names can show up in weird places.
+
+ test_single_component "int operator<< <char>()"
+ test_single_component "T<Cooperator>"
+
+ # NOTE: carlton/2003-04-23: I've only seen the first of these
+ # produced by the demangler, but I'm including two more just to be
+ # on the safe side.
+ test_single_component "int foo<&(operator<<(C, C))>()"
+ test_single_component "int foo<&operator<<(C, C)>()"
+ test_single_component "int foo<operator<<(C, C)>()"
+
gdb_test "maint cp first_component foo::bar" "foo"
gdb_test "maint cp first_component foo::bar::baz" "foo"
gdb_test "maint cp first_component C<A>::bar" "C<A>"