Skip to content

Commit 49bb474

Browse files
committed
gdb/testsuite: remove use of then keyword from gdb.fortran/*.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.fortran/ test script directory. There should be no changes in what is tested after this commit.
1 parent 6ca2ea0 commit 49bb474

23 files changed

+23
-23
lines changed

gdb/testsuite/gdb.fortran/array-element.exp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug f90}]} {
2626
return -1
2727
}
2828

29-
if ![runto sub_] then {
29+
if {![runto sub_]} {
3030
perror "couldn't run to breakpoint sub_"
3131
return
3232
}

gdb/testsuite/gdb.fortran/block-data.exp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug f90}]} {
3030
return -1
3131
}
3232

33-
if ![fortran_runto_main] then {
33+
if {![fortran_runto_main]} {
3434
return -1
3535
}
3636

gdb/testsuite/gdb.fortran/common-block.exp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if {[prepare_for_testing "failed to prepare" ${testfile} \
2727
return -1
2828
}
2929

30-
if ![fortran_runto_main] then {
30+
if {![fortran_runto_main]} {
3131
perror "couldn't run to main"
3232
return
3333
}

gdb/testsuite/gdb.fortran/complex.exp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug f90 quiet
2222
return -1
2323
}
2424

25-
if ![fortran_runto_main] then {
25+
if {![fortran_runto_main]} {
2626
perror "Couldn't run to main"
2727
return
2828
}

gdb/testsuite/gdb.fortran/derived-type-function.exp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug f90}]} {
2727
return -1
2828
}
2929

30-
if ![fortran_runto_main] then {
30+
if {![fortran_runto_main]} {
3131
perror "couldn't run to main"
3232
return
3333
}

gdb/testsuite/gdb.fortran/derived-type-striding.exp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ if {[prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \
2929
return -1
3030
}
3131

32-
if {![runto [gdb_get_line_number "post_init"]]} then {
32+
if {![runto [gdb_get_line_number "post_init"]]} {
3333
perror "couldn't run to breakpoint post_init"
3434
return
3535
}

gdb/testsuite/gdb.fortran/derived-type.exp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug f90}]} {
2727
return -1
2828
}
2929

30-
if ![fortran_runto_main] then {
30+
if {![fortran_runto_main]} {
3131
perror "couldn't run to main"
3232
return
3333
}

gdb/testsuite/gdb.fortran/dot-ops.exp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ proc test_dot_operations {} {
153153

154154
clean_restart
155155

156-
if [set_lang_fortran] then {
156+
if {[set_lang_fortran]} {
157157
test_dot_operations
158158
} else {
159159
warning "$test_name tests suppressed." 0

gdb/testsuite/gdb.fortran/exprs.exp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ gdb_reinitialize_dir $srcdir/$subdir
249249

250250
gdb_test "set print sevenbit-strings" ""
251251

252-
if [set_lang_fortran] then {
252+
if {[set_lang_fortran]} {
253253
test_value_history
254254
test_convenience_variables
255255
test_integer_literals_accepted

gdb/testsuite/gdb.fortran/function-calls.exp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ with_complaints 5 {
3939
}
4040
}
4141

42-
if {![runto [gdb_get_line_number "post_init"]]} then {
42+
if {![runto [gdb_get_line_number "post_init"]]} {
4343
perror "couldn't run to breakpoint post_init"
4444
return
4545
}

0 commit comments

Comments
 (0)