unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alex <agrambot@gmail.com>
To: Tino Calancha <tino.calancha@gmail.com>
Cc: 27559@debbugs.gnu.org
Subject: bug#27559: 26.0.50; [PATCH] Add tests for cl-macs.el
Date: Mon, 03 Jul 2017 14:23:39 -0600	[thread overview]
Message-ID: <874luti81g.fsf@lylat> (raw)
In-Reply-To: <87o9t1c0vm.fsf@calancha-pc> (Tino Calancha's message of "Mon, 03 Jul 2017 18:42:37 +0900")

Tino Calancha <tino.calancha@gmail.com> writes:

> Alex <agrambot@gmail.com> writes:
>
>> This initial version just includes tests for cl-loop, many of which were
>> adapted from Common Lisp the Language 2nd Edition. They are mostly
>> ordered by their appearance in the Hyperspec.
>>
>> When I was just about finished I realized that I could have just used an
>> ert wrapper macro to avoid all of the (eval (quote ...))) business,
>> which would have the added bonus of easily evaluating most of the tests
>> lexically. Should I redo it in this way?
>
> Thanks!  It's very good having all those tests.
> I think we can avoid many of the (eval (quote ...)).
> In the following patch, i keep just those (eval (quote ...)
> where the expansion of `cl-loop' throws an error:

That's more or less what I did at first, but I figured since cl-loop is
a large macro, that it's best to quote the macro so that an accidental
error doesn't halt testing. I actually asked about this in
emacs-devel[1] a couple weeks ago, but no one responded.

For instance, some for-as-arith tests that aren't marked as should-error
currently error in master. As an example, (cl-loop for i above 0 by 2
downfrom 10 collect i) should work, but it errors. I have a working
patch for these, but I wanted to make the tests first.

It would be nice if the ert tests in general could just continue on with
testing even if there are macro-expansion errors.

Footnotes: 
[1]  https://lists.gnu.org/archive/html/emacs-devel/2017-06/msg00461.html






  reply	other threads:[~2017-07-03 20:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-03  5:54 bug#27559: 26.0.50; [PATCH] Add tests for cl-macs.el Alex
2017-07-03  9:42 ` Tino Calancha
2017-07-03 20:23   ` Alex [this message]
2017-07-04  5:04     ` Tino Calancha
2017-07-04 19:49       ` Alex
2017-07-05 13:29         ` Tino Calancha
2017-08-11  1:17         ` npostavs
2017-08-12  0:02           ` Alex
2017-08-22  0:55             ` npostavs

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874luti81g.fsf@lylat \
    --to=agrambot@gmail.com \
    --cc=27559@debbugs.gnu.org \
    --cc=tino.calancha@gmail.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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).