aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.cp/ref-types.exp
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2022-11-14 14:06:11 +0000
committerAndrew Burgess <aburgess@redhat.com>2022-11-28 21:04:09 +0000
commit95701caeadd48415b3cb3d7fc7d9a4ef84211c55 (patch)
tree962f42653c9fe9714acf4cdea617094fe011f8c6 /gdb/testsuite/gdb.cp/ref-types.exp
parent75b6f3866450afa1219ca986910619302f7effb7 (diff)
downloadgdb-95701caeadd48415b3cb3d7fc7d9a4ef84211c55.zip
gdb-95701caeadd48415b3cb3d7fc7d9a4ef84211c55.tar.gz
gdb-95701caeadd48415b3cb3d7fc7d9a4ef84211c55.tar.bz2
gdb/testsuite: remove use of then keyword from gdb.cp/*.exp
The canonical form of 'if' in modern TCL is 'if {} {}'. But there's still a bunch of places in the testsuite where we make use of the 'then' keyword, and sometimes these get copies into new tests, which just spreads poor practice. This commit removes all use of the 'then' keyword from the gdb.cp/ test script directory. There should be no changes in what is tested after this commit.
Diffstat (limited to 'gdb/testsuite/gdb.cp/ref-types.exp')
-rw-r--r--gdb/testsuite/gdb.cp/ref-types.exp10
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/testsuite/gdb.cp/ref-types.exp b/gdb/testsuite/gdb.cp/ref-types.exp
index 3ca384a..8135a28 100644
--- a/gdb/testsuite/gdb.cp/ref-types.exp
+++ b/gdb/testsuite/gdb.cp/ref-types.exp
@@ -31,12 +31,12 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
#
# set it up at a breakpoint so we can play with the variable values
#
-if ![runto_main] then {
+if {![runto_main]} {
perror "couldn't run to breakpoint"
return
}
-if ![runto 'marker1'] then {
+if {![runto 'marker1']} {
perror "couldn't run to marker1"
return
}
@@ -57,12 +57,12 @@ proc gdb_start_again {} {
#
# set it up at a breakpoint so we can play with the variable values
#
- if ![runto_main] then {
+ if {![runto_main]} {
perror "couldn't run to breakpoint"
return
}
- if ![runto 'marker1'] then {
+ if {![runto 'marker1']} {
perror "couldn't run to marker1"
return
}
@@ -128,7 +128,7 @@ gdb_test "print ras\[2\]" ".\[0-9\]* = 2" "print value of ras\[2\]"
gdb_test "print ras\[3\]" ".\[0-9\]* = 3" "print value of ras\[3\]"
-if ![runto 'f'] then {
+if {![runto 'f']} {
perror "couldn't run to f"
return
}