From: Tom Tromey <tromey@adacore.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tromey@adacore.com>
Subject: [pushed] Use 'require' with gnatmake_version_at_least
Date: Wed, 12 Apr 2023 08:44:32 -0600 [thread overview]
Message-ID: <20230412144432.3050609-1-tromey@adacore.com> (raw)
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.39.1
reply other threads:[~2023-04-12 14:44 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230412144432.3050609-1-tromey@adacore.com \
--to=tromey@adacore.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).