From 11ef0d76ab7ca2b103955a98af4aa0eb7dbf74ab Mon Sep 17 00:00:00 2001 From: Keith Seitz Date: Mon, 21 Sep 2009 19:46:15 +0000 Subject: [PATCH] * gdb.cp/cplusfuncs.exp (do_tests): Add check for proper error message with invalid operator. --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/gdb.cp/cplusfuncs.exp | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 72b1e1ca17..ac6fbc296c 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2009-09-21 Keith Seitz + + * gdb.cp/cplusfuncs.exp (do_tests): Add check for proper error message + with invalid operator. + 2009-09-21 Keith Seitz * gdb.cp/classes.exp (do_tests): Add tests to print a constructor diff --git a/gdb/testsuite/gdb.cp/cplusfuncs.exp b/gdb/testsuite/gdb.cp/cplusfuncs.exp index 5e087680b7..56702edbac 100644 --- a/gdb/testsuite/gdb.cp/cplusfuncs.exp +++ b/gdb/testsuite/gdb.cp/cplusfuncs.exp @@ -534,6 +534,7 @@ proc do_tests {} { global srcdir global binfile global gdb_prompt + global dm_type_int_star set prms_id 0 set bug_id 0 @@ -557,6 +558,10 @@ proc do_tests {} { test_paddr_operator_functions test_paddr_hairy_functions test_lookup_operator_functions + + # A regression test on errors involving operators + gdb_test "list foo::operator $dm_type_int_star" \ + ".*the class foo does not have any method named operator $dm_type_int_star.*" } do_tests