Use 'require' with gnatmake_version_at_least
authorTom Tromey <tromey@adacore.com>
Wed, 12 Apr 2023 14:36:15 +0000 (08:36 -0600)
committerTom Tromey <tromey@adacore.com>
Wed, 12 Apr 2023 14:39:34 +0000 (08:39 -0600)
I found a couple of tests that check gnatmake_version_at_least using
"if" where "require" would be a little cleaner.  This patch converts
these.

gdb/testsuite/gdb.ada/mi_prot.exp
gdb/testsuite/gdb.ada/rename_subscript_param.exp

index 42ca90d807bf85cdfd34a10ff5e5f2f09582645e..35d2c17c47049910aec5048a9d526be2b673817a 100644 (file)
 load_lib "ada.exp"
 
 require allow_ada_tests
+require {gnatmake_version_at_least 8}
 
-if { ![gnatmake_version_at_least 8] } {
-    return -1
-}
 standard_ada_testfile prot
 
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable \
index df5c9b2698291437b132a23df244072bec5641f2..e3209bc299b503a5938115433808ce169646f8f8 100644 (file)
@@ -17,9 +17,7 @@ load_lib "ada.exp"
 
 require allow_ada_tests
 
-if { ![gnatmake_version_at_least 8] } {
-    return -1
-}
+require {gnatmake_version_at_least 8}
 
 standard_ada_testfile pb30_012