From: Michael Elizabeth Chastain <chastain@cygnus.com>
To: msnyder@redhat.com
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFC] testsuite/gdb.base/arithmet.exp: re-write
Date: Tue, 12 Jun 2001 09:42:00 -0000 [thread overview]
Message-ID: <200106121648.JAA10240@bosch.cygnus.com> (raw)
Michael Snyder writes:
> gdb_test "print x-y-z" "10" "test x-y-z == 10"
> gdb_test "print x-y-z" "9" "test x-y-z == 9"
The third parameter works well for this case.
Here is an awkward case:
gdb_test "set variable z=2" ""
...
gdb_test "set variable z=3" ""
...
gdb_test "set variable z=2" ""
...
gdb_test "set variable z=3" ""
...
I chose to make an operational change by re-organizing the assignments:
gdb_test "set variable z=2" ""
gdb_test "set variable w=3" ""
...
# no more assignments
# use either "z" or "w" as appropriate
Alternatively, I could do some 3rd-argument clutter:
gdb_test "set variable z=2" "" ".1. set variable z=2"
...
gdb_test "set variable z=3" "" ".2. set variable z=3"
...
gdb_test "set variable z=2" "" ".3. set variable z=2"
...
gdb_test "set variable z=3" "" ".4. set variable z=3"
...
There's really no general clean way to do this. And there's no tool
in common use that tells people "whoops, you just wrote a duplicate test".
Michael
next reply other threads:[~2001-06-12 9:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-06-12 9:42 Michael Elizabeth Chastain [this message]
-- strict thread matches above, loose matches on Subject: below --
2001-06-11 21:48 Michael Elizabeth Chastain
2001-06-12 7:55 ` Jim Blandy
2001-06-10 16:57 Michael Elizabeth Chastain
2001-06-11 7:31 ` Fernando Nasser
2001-06-11 17:55 ` Jim Blandy
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=200106121648.JAA10240@bosch.cygnus.com \
--to=chastain@cygnus.com \
--cc=gdb-patches@sources.redhat.com \
--cc=msnyder@redhat.com \
/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