From 8cb6bcc3eedae0d3f034fe36fdee65fe3cf59adc Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 12 Apr 2023 08:36:15 -0600 Subject: [PATCH] Use 'require' with gnatmake_version_at_least 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 | 4 +--- gdb/testsuite/gdb.ada/rename_subscript_param.exp | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/gdb/testsuite/gdb.ada/mi_prot.exp b/gdb/testsuite/gdb.ada/mi_prot.exp index 42ca90d807b..35d2c17c470 100644 --- a/gdb/testsuite/gdb.ada/mi_prot.exp +++ b/gdb/testsuite/gdb.ada/mi_prot.exp @@ -16,10 +16,8 @@ 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 \ diff --git a/gdb/testsuite/gdb.ada/rename_subscript_param.exp b/gdb/testsuite/gdb.ada/rename_subscript_param.exp index df5c9b26982..e3209bc299b 100644 --- a/gdb/testsuite/gdb.ada/rename_subscript_param.exp +++ b/gdb/testsuite/gdb.ada/rename_subscript_param.exp @@ -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 -- 2.30.2