From: Doug Evans <dje@sebabeach.org>
To: cgen@sourceware.org
Subject: new .internal-test pmacro
Date: Tue, 18 Aug 2009 01:43:00 -0000 [thread overview]
Message-ID: <20090818014338.ADC1D6E3D1@sebabeach.org> (raw)
fyi,
I wanted a way of writing tests while keeping them relatively
self-contained so I added .internal-test.
2009-08-17 Doug Evans <dje@sebabeach.org>
* pmacros.scm (-pmacro-builtin-internal-test): New function.
(pmacros-init!): Add .internal-test.
* testsuite/test-utils.sh.in (post_process): Tweak FAIL output.
* testsuite/testsuite.cpu (internal-verify): New pmacro.
* doc/pmacros.text: Document .internal-test.
E.g. from testsuite/names-comments-1.test:
# Test handling of names and comments.
test=names-comments-1
source ./test-utils.sh
cpu_file=${test}.test.cpu
rm -f ${cpu_file}
cat > ${cpu_file} <<EOF
(include "${srcdir}/../cpu/simplify.inc")
(include "${srcdir}/testsuite.cpu")
(define-insn (name (add 3))
(comment (("This is a" " comment")
" constructed as a list."))
(syntax "add3")
(semantics (sequence VOID nop))
)
;; Verify the correct insn got created.
;; ??? Also need to verify the comment's contents.
(internal-verify "lists in names" (current-insn-lookup 'add3))
EOF
run_cgen ${cpu_file}
post_process
finish
reply other threads:[~2009-08-18 1:43 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=20090818014338.ADC1D6E3D1@sebabeach.org \
--to=dje@sebabeach.org \
--cc=cgen@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).