From: Nikolaj Schumacher <me@nschum.de>
To: Lennart Borgman <lennart.borgman@gmail.com>
Cc: web@shellarchive.co.uk, Masatake YAMATO <yamato@redhat.com>,
ohler+emacs@fastmail.net, emacs-devel@gnu.org,
rubikitch <rubikitch@ruby-lang.org>,
Phil Hagelberg <phil@hagelb.org>,
Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: unit test framework
Date: Sat, 20 Mar 2010 12:01:45 +0100 [thread overview]
Message-ID: <4BA4AB19.2080102@nschum.de> (raw)
In-Reply-To: <e01d8a51003180756l43c0c2dbp8e59a66a1b472027@mail.gmail.com>
On 2010-03-18 15:56 , Lennart Borgman wrote:
> elk-test: Nikolaj Schumacher
elk-test might look more complicated than it is. Most of the code is
for the user interface. The testing framework itself is just a thin
wrapper around Emacs' error signaling with better readability.
While
(assert (equal "yy" foo))
causes
(cl-assertion-failed (equal "yy" foo))
the macro
(assert-equal "yy" foo)
will cause the more readable:
(error "assert-equal for <foo> failed: expected <yy>, was <xx>")
`assert-that' can take care of the formatting for custom tests, and
`assert-error' fails when a specific error isn't thrown.
The nice thing about these macros is that they work in any evaluation
context. I'd vote to include such macros at the least.
The
(deftest "test name" ...
macro just provides an name anchor for running individual tests. And
the test runner will just catch errors and display them as text,
highlight where the error occurred, and mark the buffer as "red". This
GUI is more designed for test-driven development than automatic
regression tests, but the macros would work fine for that, I suppose.
kind regards,
Nikolaj Schumacher
next prev parent reply other threads:[~2010-03-20 11:01 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-18 7:39 unit test framework Masatake YAMATO
2010-03-18 9:31 ` Lennart Borgman
2010-03-18 10:07 ` Leo
2010-03-18 10:23 ` Lennart Borgman
2010-03-18 11:25 ` Masatake YAMATO
2010-03-18 14:22 ` Stefan Monnier
2010-03-18 14:56 ` Lennart Borgman
2010-03-19 0:16 ` rubikitch
2010-03-19 19:00 ` Phil Hagelberg
2010-03-20 11:01 ` Nikolaj Schumacher [this message]
2010-03-23 9:02 ` joakim
2010-03-23 13:15 ` Lennart Borgman
2010-03-24 3:03 ` Masatake YAMATO
2010-03-23 14:22 ` Stefan Monnier
2010-04-13 10:32 ` joakim
2010-06-12 6:06 ` Christian Ohler
2010-06-12 13:48 ` Lennart Borgman
2010-06-14 11:24 ` Masatake YAMATO
2010-07-23 21:58 ` Stefan Monnier
2010-03-23 10:15 ` Philip Jackson
2010-06-27 18:50 ` Philip Jackson
2010-07-09 13:43 ` Christian Ohler
2010-07-09 23:01 ` Glenn Morris
2010-07-10 1:12 ` Christian Ohler
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=4BA4AB19.2080102@nschum.de \
--to=me@nschum.de \
--cc=emacs-devel@gnu.org \
--cc=lennart.borgman@gmail.com \
--cc=monnier@iro.umontreal.ca \
--cc=ohler+emacs@fastmail.net \
--cc=phil@hagelb.org \
--cc=rubikitch@ruby-lang.org \
--cc=web@shellarchive.co.uk \
--cc=yamato@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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.