aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.cp/misc.exp
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2019-11-02 06:55:10 +0100
committerTom de Vries <tdevries@suse.de>2019-11-02 06:55:10 +0100
commite96ec2bab75a943e1666497b1389e297775af5a8 (patch)
treeecdcae9acb1be8ac126064a7c96673a29db81d37 /gdb/testsuite/gdb.cp/misc.exp
parenta1dc3a23d0507ef32f36844ef771cd9189168be1 (diff)
downloadfsf-binutils-gdb-e96ec2bab75a943e1666497b1389e297775af5a8.zip
fsf-binutils-gdb-e96ec2bab75a943e1666497b1389e297775af5a8.tar.gz
fsf-binutils-gdb-e96ec2bab75a943e1666497b1389e297775af5a8.tar.bz2
[gdb/testsuite] Remove superfluous 3rd argument from gdb_test call (3)
There's a pattern: ... gdb_test <command> <pattern> <command> ... that can be written shorter as: ... gdb_test <command> <pattern> ... Detect this pattern in proc gdb_test: ... global gdb_prompt upvar timeout timeout if [llength $args]>2 then { set message [lindex $args 2] + if { $message == [lindex $args 0] && [llength $args] == 3 } { + error "HERE" + } } else { set message [lindex $args 0] } ... and fix all occurrences in the testsuite/gdb.cp subdir. Tested on x86_64-linux. gdb/testsuite/ChangeLog: 2019-11-02 Tom de Vries <tdevries@suse.de> * gdb.cp/anon-union.exp: Drop superfluous 3rd argument to gdb_test. * gdb.cp/cpexprs.exp: Same. * gdb.cp/except-multi-location.exp: Same. * gdb.cp/exceptprint.exp: Same. * gdb.cp/gdb2384.exp: Same. * gdb.cp/inherit.exp: Same. * gdb.cp/m-static.exp: Same. * gdb.cp/meth-typedefs.exp: Same. * gdb.cp/misc.exp: Same. * gdb.cp/namespace.exp: Same. * gdb.cp/non-trivial-retval.exp: Same. * gdb.cp/overload.exp: Same. * gdb.cp/pr17132.exp: Same. * gdb.cp/re-set-overloaded.exp: Same. * gdb.cp/rvalue-ref-types.exp: Same. * gdb.cp/templates.exp: Same. Change-Id: I0254d0cea71e7376aedb078166188a8010eeaebe
Diffstat (limited to 'gdb/testsuite/gdb.cp/misc.exp')
-rw-r--r--gdb/testsuite/gdb.cp/misc.exp4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.cp/misc.exp b/gdb/testsuite/gdb.cp/misc.exp
index 4397b4b..b5b01ce 100644
--- a/gdb/testsuite/gdb.cp/misc.exp
+++ b/gdb/testsuite/gdb.cp/misc.exp
@@ -93,8 +93,8 @@ test_expr "set variable v_bool_array\[1\] = true" \
"set a bool array elem"
# bool constants
-gdb_test "print true" "\\$\[0-9\]* = true" "print true"
-gdb_test "print false" "\\$\[0-9\]* = false" "print false"
+gdb_test "print true" "\\$\[0-9\]* = true"
+gdb_test "print false" "\\$\[0-9\]* = false"
# arithmetic conversions
gdb_test "print 1 + true" "\\$\[0-9\]* = 2" "1 + true"