unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Anders Lindgren <andlind@gmail.com>
To: Glenn Morris <rgm@gnu.org>
Cc: 21701@debbugs.gnu.org, Stefan Monnier <monnier@iro.umontreal.ca>
Subject: bug#21701: Fwd: cl-typecase broken (was 25.0.50; ert explainer for equal can't handle negative numbers)
Date: Sat, 5 Dec 2015 16:08:23 +0100	[thread overview]
Message-ID: <CABr8ebY9zLbVB=idmBnwqwBPJCNObSx_4ZsQcjuBRTvp41a1og@mail.gmail.com> (raw)
In-Reply-To: <98d1ul4y9u.fsf@fencepost.gnu.org>


[-- Attachment #1.1: Type: text/plain, Size: 864 bytes --]

Hi,

Two of the problems can be fixed with the attached patch.

The third, `ert-test-record-backtrace' in `ert-tests.el' seems to compare
backtrace output -- I haven't looked it as I have no idea what it is
supposed to test.

    -- Anders

On Fri, Dec 4, 2015 at 11:58 PM, Glenn Morris <rgm@gnu.org> wrote:

> Stefan Monnier wrote:
>
> > I installed a patch which makes ERT use pcase over cl-typecase.
>
> This causes test failures.
>
> http://hydra.nixos.org/build/28477383
> http://hydra.nixos.org/build/28477383/log/raw
>
>
>    FAILED  ert-test-equal-including-properties
>    FAILED  ert-test-explain-equal
>    FAILED  ert-test-explain-equal-improper-list
>    FAILED  ert-test-explain-equal-string-properties
>    FAILED  ert-test-plist-difference-explanation
>    FAILED  ert-test-run-tests-interactively
>    FAILED  ert-test-run-tests-interactively-2
>

[-- Attachment #1.2: Type: text/html, Size: 1492 bytes --]

[-- Attachment #2: ert.diff --]
[-- Type: text/plain, Size: 1005 bytes --]

diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el
index a75b23b..02ae41b 100644
--- a/lisp/emacs-lisp/ert.el
+++ b/lisp/emacs-lisp/ert.el
@@ -515,7 +515,7 @@ ert--explain-equal-rec
                   for xi = (ert--explain-equal-rec ai bi)
                   do (when xi (cl-return `(array-elt ,i ,xi)))
                   finally (cl-assert (equal a b) t))))
-      ((pred atomp)
+      ((pred atom)
        (if (not (equal a b))
            (if (and (symbolp a) (symbolp b) (string= a b))
                `(different-symbols-with-the-same-name ,a ,b)
@@ -1071,7 +1071,7 @@ ert--insert-human-readable-selector
                      (make-symbol "<unnamed test>")))
                   (`(,operator . ,operands)
                    (pcase operator
-                     ((or 'eql 'and 'not 'or)
+                     ((or 'member 'eql 'and 'not 'or)
                       `(,operator ,@(mapcar #'rec operands)))
                      ((or 'tag 'satisfies)
                       selector))))))

      reply	other threads:[~2015-12-05 15:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-18  8:56 bug#21701: 25.0.50; ert explainer for equal can't handle negative numbers (work in 24.5) Anders Lindgren
2015-12-04  9:41 ` bug#21701: cl-typecase broken (was 25.0.50; ert explainer for equal can't handle negative numbers) Anders Lindgren
     [not found]   ` <CABr8ebZdsbyLDjayLSXRDqhvyGSTngfdLcKruwavYHmG_MPpWA@mail.gmail.com>
2015-12-04 13:30     ` bug#21701: Fwd: " Stefan Monnier
2015-12-04 15:41       ` Anders Lindgren
2015-12-04 17:36         ` Stefan Monnier
2015-12-04 18:17           ` Stefan Monnier
2015-12-04 19:42             ` Anders Lindgren
2015-12-04 21:08               ` Drew Adams
2015-12-04 21:25               ` Stefan Monnier
2015-12-04 21:32                 ` Drew Adams
2015-12-04 22:58             ` Glenn Morris
2015-12-05 15:08               ` Anders Lindgren [this message]

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='CABr8ebY9zLbVB=idmBnwqwBPJCNObSx_4ZsQcjuBRTvp41a1og@mail.gmail.com' \
    --to=andlind@gmail.com \
    --cc=21701@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=rgm@gnu.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.
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).