]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Reformat gdb.objc tests
authorTom Tromey <tom@tromey.com>
Sat, 15 Nov 2025 17:44:45 +0000 (10:44 -0700)
committerTom Tromey <tom@tromey.com>
Tue, 2 Dec 2025 16:22:45 +0000 (09:22 -0700)
This patch applies some minor formatting changes and cleanups to the
gdb.objc tests.

gdb/testsuite/gdb.objc/basicclass.exp
gdb/testsuite/gdb.objc/nondebug.exp
gdb/testsuite/gdb.objc/objcdecode.exp

index b5fb4d7030274518d8aebecafbdefb56644f3596..d1fb64a42de364157a77595e1ce864d2258f228f 100644 (file)
@@ -21,8 +21,9 @@ standard_testfile .m
 # Objective-C program compilation isn't standard. We need to figure out
 # which libraries to link in. Most of the time it uses pthread
 #
-if {[gdb_compile_objc "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug ]] != "" } {
-  return -1
+if {[gdb_compile_objc "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
+        executable {debug}] != ""} {
+    return
 }
 
 #
@@ -147,7 +148,7 @@ gdb_test "break hiddenMethod" \
 #
 gdb_test continue \
     "Continuing\\..*Breakpoint \[0-9\]+, -.BasicClass\\(Private\\) hiddenMethod. \\(self=.*, _cmd=.*\\) at .*$srcfile:61.*" \
-     "continue until category method"
+    "continue until category method"
 
 #
 # Test calling Objective-C methods
index 2cd25b19315f6cb05b6aa7341cbd62c94b191df3..321aa2290455e913849b8c8cc75ad091f1484ffb 100644 (file)
@@ -23,8 +23,9 @@ standard_testfile .m
 # Objective-C program compilation isn't standard. We need to figure out
 # which libraries to link in. Most of the time it uses pthread
 #
-if {[gdb_compile_objc "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list ] ] != "" } {
-  return -1
+if {[gdb_compile_objc "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
+        executable {}] != ""} {
+    return
 }
 
 proc do_objc_tests {} {
@@ -42,8 +43,7 @@ gdb_test "set breakpoint pending off" "" "set breakpoint pending"
 # Break on multiply defined non-debuggable symbol (PR objc/1236)
 #
 set name "break on non-debuggable method"
-gdb_test_multiple "break someMethod" $name \
-{
+gdb_test_multiple "break someMethod" $name {
     -re "\\\[0\\\] cancel\r\n\\\[1\\\] all\r\n\\\[2\\\]\[ \]+-.NonDebug someMethod.*\\\[3\\\]\[ \]+-.NonDebug2 someMethod.*" {
        send_gdb "2\n"
        exp_continue
index 5414f0f96f30c6112b16eeaa619fa761179a0195..7840a2ed5d3d1f1c45c32f7acba3563274d5dab6 100644 (file)
@@ -23,8 +23,9 @@ standard_testfile .m
 # Objective-C program compilation isn't standard. We need to figure out
 # which libraries to link in. Most of the time it uses pthread
 #
-if {[gdb_compile_objc "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug ]] != "" } {
-  return -1
+if {[gdb_compile_objc "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \
+        {debug}] != ""} {
+    return
 }
 
 proc do_objc_tests {} {
@@ -40,8 +41,7 @@ gdb_test_no_output "set multiple-symbols ask"
 # Break on multiply defined method (PR objc/1236)
 #
 set name "break on multiply defined method"
-gdb_test_multiple "break multipleDef" $name \
-{
+gdb_test_multiple "break multipleDef" $name {
     -re "\\\[0\\\] cancel\r\n\\\[1\\\] all\r\n\\\[2\\\] .*${srcfile}:-.Decode multipleDef.\r\n\\\[3\\\] .*${srcfile}:multipleDef\r\n> $" {
        send_gdb "3\n"
        exp_continue
@@ -52,8 +52,7 @@ gdb_test_multiple "break multipleDef" $name \
 
 set name "continue after break on multiply defined symbol"
 gdb_run_cmd
-gdb_test_multiple "" $name \
-{
+gdb_test_multiple "" $name {
     -re "Breakpoint \[0-9\]+, multipleDef \\\(\\\) at .*\r\n$gdb_prompt $" {
        pass $name
     }