[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: testing framework and package.el

From: Masatake YAMATO
Subject: Re: testing framework and package.el
Date: Mon, 04 Oct 2010 22:02:09 +0900 (JST)


> On 28/09/10 8:57, Stefan Monnier wrote:
>>> is there a chance to get a testing framework on elpa.gnu.org on the
>>> short run?
>>> Ert [1] is used in nxhtml, simple to use and documented.
>> IIRC we've agreed to try and install ERT, either on elpa or in Emacs
>> itself, and then try and move the few tests we already have
>> scattered about to use ERT.  But I haven't heard much about it
>> recently.
> Incidentally, I finished a major overhaul of ERT's manual a few days
> ago.  Over the next few weeks, I should be able to find some time to
> put together a patch to integrate it into Emacs.  If anyone is
> interested, you can already review the code at
> http://github.com/ohler/ert and send me comments to speed up the
> integration process.

I read the manual and I've had three small comments.

1. When explaining about the name of test, the read may want
   to know how the name is used in ert. My understanding is
   it can be used to select the tests to run.

2. I would like to know the difference between `Failed' and `unexpected'.

3. I would like to see the example of `should-error'.

Following the patch tells the place where I got above comments.

diff --git a/ert.texinfo b/ert.texinfo
index 3543738..1f65426 100644
--- a/ert.texinfo
+++ b/ert.texinfo
@@ -125,7 +125,8 @@ better error reporting.  @xref{The @code{should} Macro}.
 The names of tests can be chosen arbitrarily --- they are in a
 namespace separate from functions and variables --- but should follow
 the usual Emacs Lisp convention of having a prefix that indicates
-which package they belong to.
+which package they belong to. The names can be used to select the
+tests to run. @xref{Test Selectors}.
 The empty parentheses @code{()} in the first line don't currently have
 any meaning and are reserved for future extension.  They also make
@@ -214,6 +215,7 @@ shows details about each test that had an unexpected 
result.  In the
 example above, there are two failures, both due to failed
 @code{should} forms.  @xref{Understanding Explanations}, for more
address@hidden ??? Difference between `Failed' and `unexpected'.
 In the ERT results buffer, @kbd{TAB} and @kbd{S-TAB} cycle between
 buttons.  Each name of a function or macro in this buffer is a button;
@@ -357,6 +359,8 @@ checks that the form called within it signals an error.  
There is no
 @code{should-not-error} macro since tests that signal an error fail
 anyway, so @code{should-not-error} is effectively the default.
address@hidden An example of should-error
 @xref{Understanding Explanations}, for more details on what
 @code{should} reports.

Masatake YAMATO

reply via email to

[Prev in Thread] Current Thread [Next in Thread]