Remove "then" from test suite
Checks
Context |
Check |
Description |
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_gdb_build--master-arm |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 |
success
|
Test passed
|
linaro-tcwg-bot/tcwg_gdb_check--master-arm |
success
|
Test passed
|
Commit Message
This removes the "then" keyword from the test suite. Andrew did this
once before, but some new ones crept in.
This also adds braces to the "if" conditions and normalizes the
failures to just use "return".
---
gdb/testsuite/gdb.ada/str_chars.exp | 4 ++--
gdb/testsuite/gdb.arch/aarch64-pseudo-unwind.exp | 4 ++--
gdb/testsuite/gdb.arch/amd64-pseudo-unwind.exp | 4 ++--
gdb/testsuite/gdb.arch/arm-pseudo-unwind-legacy.exp | 4 ++--
gdb/testsuite/gdb.arch/arm-pseudo-unwind.exp | 4 ++--
gdb/testsuite/gdb.base/value-history-unavailable.exp | 5 ++---
gdb/testsuite/gdb.python/py-connection-removed.exp | 4 ++--
gdb/testsuite/gdb.python/py-finish-breakpoint-deletion.exp | 4 ++--
gdb/testsuite/gdb.python/py-watchpoint.exp | 2 +-
9 files changed, 17 insertions(+), 18 deletions(-)
Comments
>>>>> "Tom" == Tom Tromey <tromey@adacore.com> writes:
Tom> This removes the "then" keyword from the test suite. Andrew did this
Tom> once before, but some new ones crept in.
Tom> This also adds braces to the "if" conditions and normalizes the
Tom> failures to just use "return".
I'm checking this in.
Tom
@@ -28,8 +28,8 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" }
clean_restart ${testfile}
set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb]
-if ![runto "foo.adb:$bp_location" ] then {
- return -1
+if {![runto "foo.adb:$bp_location"]} {
+ return
}
gdb_test "print Arg" \
@@ -31,8 +31,8 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \
clean_restart ${binfile}
-if ![runto_main] then {
- fail "could not run to main"
+if {![runto_main]} {
+ return
}
gdb_breakpoint break_here_asm temporary
@@ -34,8 +34,8 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \
clean_restart ${binfile}
-if ![runto_main] then {
- fail "could not run to main"
+if {![runto_main]} {
+ return
}
gdb_breakpoint break_here_asm temporary
@@ -36,8 +36,8 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \
clean_restart ${binfile}
-if ![runto_main] then {
- fail "could not run to main"
+if {![runto_main]} {
+ return
}
gdb_breakpoint break_here_asm temporary
@@ -31,8 +31,8 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \
clean_restart ${binfile}
-if ![runto_main] then {
- fail "could not run to main"
+if {![runto_main]} {
+ return
}
gdb_breakpoint break_here_asm temporary
@@ -21,9 +21,8 @@ if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
return -1
}
-if ![runto_main] then {
- perror "couldn't run to breakpoint"
- continue
+if {![runto_main]} {
+ return
}
set target_char_mask [get_valueof "/u" "a.x\[0]" "255" "get target char mask"]
@@ -33,8 +33,8 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return -1
}
-if ![runto_main] then {
- return 0
+if {![runto_main]} {
+ return
}
# Register a callback that will trigger when a connection is removed
@@ -25,8 +25,8 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile]} {
return -1
}
-if ![runto_main] then {
- return 0
+if {![runto_main]} {
+ return
}
# For remote host testing
@@ -25,7 +25,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile]} {
require allow_python_tests
-if ![runto_main] then {
+if {![runto_main]} {
return
}