Skip to content

Commit 6ca2ea0

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

File tree

13 files changed

+26
-26
lines changed

13 files changed

+26
-26
lines changed

gdb/testsuite/gdb.disasm/t01_mov.exp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ set asm-flags ""
3030
set link-flags "-m h8300sxelf"
3131

3232

33-
if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then {
33+
if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} {
3434
untested "failed to assemble"
3535
return -1
3636
}
3737

38-
if {[target_link $objfile $binfile "${link-flags}"] != ""} then {
38+
if {[target_link $objfile $binfile "${link-flags}"] != ""} {
3939
untested "failed to link"
4040
return -1
4141
}

gdb/testsuite/gdb.disasm/t02_mova.exp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ set asm-flags ""
3030
set link-flags "-m h8300sxelf"
3131

3232

33-
if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then {
33+
if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} {
3434
untested "failed to assemble"
3535
return -1
3636
}
3737

38-
if {[target_link $objfile $binfile "${link-flags}"] != ""} then {
38+
if {[target_link $objfile $binfile "${link-flags}"] != ""} {
3939
untested "failed to link"
4040
return -1
4141
}

gdb/testsuite/gdb.disasm/t03_add.exp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ set asm-flags ""
3030
set link-flags "-m h8300sxelf"
3131

3232

33-
if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then {
33+
if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} {
3434
untested "failed to assemble"
3535
return -1
3636
}
3737

38-
if {[target_link $objfile $binfile "${link-flags}"] != ""} then {
38+
if {[target_link $objfile $binfile "${link-flags}"] != ""} {
3939
untested "failed to link"
4040
return -1
4141
}

gdb/testsuite/gdb.disasm/t04_sub.exp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ set asm-flags ""
3030
set link-flags "-m h8300sxelf"
3131

3232

33-
if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then {
33+
if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} {
3434
untested "failed to assemble"
3535
return -1
3636
}
3737

38-
if {[target_link $objfile $binfile "${link-flags}"] != ""} then {
38+
if {[target_link $objfile $binfile "${link-flags}"] != ""} {
3939
untested "failed to link"
4040
return -1
4141
}

gdb/testsuite/gdb.disasm/t05_cmp.exp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ set asm-flags ""
3030
set link-flags "-m h8300sxelf"
3131

3232

33-
if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then {
33+
if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} {
3434
untested "failed to assemble"
3535
return -1
3636
}
3737

38-
if {[target_link $objfile $binfile "${link-flags}"] != ""} then {
38+
if {[target_link $objfile $binfile "${link-flags}"] != ""} {
3939
untested "failed to link"
4040
return -1
4141
}

gdb/testsuite/gdb.disasm/t06_ari2.exp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ set asm-flags ""
3030
set link-flags "-m h8300sxelf"
3131

3232

33-
if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then {
33+
if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} {
3434
untested "failed to assemble"
3535
return -1
3636
}
3737

38-
if {[target_link $objfile $binfile "${link-flags}"] != ""} then {
38+
if {[target_link $objfile $binfile "${link-flags}"] != ""} {
3939
untested "failed to link"
4040
return -1
4141
}

gdb/testsuite/gdb.disasm/t07_ari3.exp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ set asm-flags ""
3030
set link-flags "-m h8300sxelf"
3131

3232

33-
if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then {
33+
if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} {
3434
untested "failed to assemble"
3535
return -1
3636
}
3737

38-
if {[target_link $objfile $binfile "${link-flags}"] != ""} then {
38+
if {[target_link $objfile $binfile "${link-flags}"] != ""} {
3939
untested "failed to link"
4040
return -1
4141
}

gdb/testsuite/gdb.disasm/t08_or.exp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ set asm-flags ""
3030
set link-flags "-m h8300sxelf"
3131

3232

33-
if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then {
33+
if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} {
3434
untested "failed to assemble"
3535
return -1
3636
}
3737

38-
if {[target_link $objfile $binfile "${link-flags}"] != ""} then {
38+
if {[target_link $objfile $binfile "${link-flags}"] != ""} {
3939
untested "failed to link"
4040
return -1
4141
}

gdb/testsuite/gdb.disasm/t09_xor.exp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ set asm-flags ""
3030
set link-flags "-m h8300sxelf"
3131

3232

33-
if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then {
33+
if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} {
3434
untested "failed to assemble"
3535
return -1
3636
}
3737

38-
if {[target_link $objfile $binfile "${link-flags}"] != ""} then {
38+
if {[target_link $objfile $binfile "${link-flags}"] != ""} {
3939
untested "failed to link"
4040
return -1
4141
}

gdb/testsuite/gdb.disasm/t10_and.exp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ set asm-flags ""
3030
set link-flags "-m h8300sxelf"
3131

3232

33-
if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} then {
33+
if {[target_assemble $srcfile $objfile "${asm-flags}"] != ""} {
3434
untested "failed to assemble"
3535
return -1
3636
}
3737

38-
if {[target_link $objfile $binfile "${link-flags}"] != ""} then {
38+
if {[target_link $objfile $binfile "${link-flags}"] != ""} {
3939
untested "failed to link"
4040
return -1
4141
}

0 commit comments

Comments
 (0)