]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/testsuite, tclint] Fix gdb.go
authorTom de Vries <tdevries@suse.de>
Wed, 17 Sep 2025 04:53:14 +0000 (06:53 +0200)
committerTom de Vries <tdevries@suse.de>
Wed, 17 Sep 2025 04:53:14 +0000 (06:53 +0200)
Running tclint on the test-cases in gdb.go shows a few problems.

Fix these.

Tested on x86_64-linux.

gdb/testsuite/gdb.go/basic-types.exp
gdb/testsuite/gdb.go/integers.exp
gdb/testsuite/gdb.go/package.exp
gdb/testsuite/gdb.go/print.exp

index 3d4bfd508262dfbbd15eb39ad095eb7453999a8a..53ce4fa420cc95021f8143de38c05e13615ff759 100644 (file)
@@ -25,7 +25,7 @@ require allow_go_tests
 proc test_integer_literal_types_accepted {} {
     # Test various decimal values.
 
-    gdb_test "pt 123" "type = int" 
+    gdb_test "pt 123" "type = int"
 
     gdb_test "pt void(42)" "type = void"
     gdb_test "pt byte(42)" "type = uint8"
@@ -102,7 +102,7 @@ proc test_complex_literal_types_accepted {} {
 
 clean_restart
 
-if [set_lang_go] {
+if {[set_lang_go]} {
     test_integer_literal_types_accepted
     test_logical_literal_types_accepted
     test_character_literal_types_accepted
index d58c7716dcca0209eebb301edea0e8381d12cd43..50ea9a88827b97a5f4ce3ea18619d0f20712ad5b 100644 (file)
@@ -44,9 +44,9 @@ gdb_test "print i" ".* = 0" "print i before assigned to 1"
 
 gdb_test "next" "i = 1" "next to 'i = 1' line"
 gdb_test "next" "j = 2" "next to 'j = 2' line"
-# At that point, 
+# At that point,
 # i should be equal to 1
-gdb_test "print i" " = 1" 
+gdb_test "print i" " = 1"
 # but j should still be equal to zero
 gdb_test "print j" " = 0" "test j value before assignment"
 
index c30b8c01b7063d78415e78c0c3befdcc3f2f250c..180b48aecdcb3e9c0f1eb881e5e6327a6f5f3aa0 100644 (file)
@@ -27,7 +27,7 @@ if  { [gdb_compile "${srcdir}/${subdir}/${testfile}2.go" "${binfile}2.o" object
     untested "failed to compile"
     return -1
 }
+
 if  { [gdb_compile "${srcdir}/${subdir}/${testfile}1.go ${binfile}2.o" "${binfile}" executable "debug go libdir=[standard_output_file {}]"] != "" } {
     untested "failed to compile"
     return -1
index 85cb6a1009f90b745a294cfa4834a2255671b59b..a02b7460b87eefe7541c5b6fded2a712c5c29d6d 100644 (file)
@@ -58,7 +58,7 @@ proc test_float_rejected {} {
 
 clean_restart
 
-if [set_lang_go] {
+if {[set_lang_go]} {
     test_float_accepted
     test_float_rejected
 } else {