unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Oleksandr Gavenko <gavenkoa@gmail.com>
To: Glenn Morris <rgm@gnu.org>
Cc: 13543@debbugs.gnu.org
Subject: bug#13543: 24.2; [PATCH] (ert) "wrong-type-argument characterp" when assert fail on large (>28 bit) numbers
Date: Mon, 04 Feb 2013 17:33:43 +0200	[thread overview]
Message-ID: <87boc0drfs.fsf@gavenkoa.example.com> (raw)
In-Reply-To: <8gmwvktt72.fsf@fencepost.gnu.org> (Glenn Morris's message of "Mon, 04 Feb 2013 02:49:05 -0500")

On 2013-02-04, Glenn Morris wrote:

>> 'should' from lisp/emacs-lisp/ert.el fail to create character from
>> number, for example evaluate one of these expressions:
>>
>>   (should (equal #x1000000 1))
>>   (should (equal 1 -1))
>
> I can see some usefulness to printing the character form for something
> like
>
> (should (equal ?a ?b))
>
> so I installed this change:
>
> ***************
> *** 568,574 ****
>   (defun ert--explain-format-atom (x)
>     "Format the atom X for `ert--explain-equal'."
>     (cl-typecase x
> !     (fixnum (list x (format "#x%x" x) (format "?%c" x)))
>       (t x)))
>   
>   (defun ert--explain-equal-rec (a b)
> --- 568,575 ----
>   (defun ert--explain-format-atom (x)
>     "Format the atom X for `ert--explain-equal'."
>     (cl-typecase x
> !     (character (list x (format "#x%x" x) (format "?%c" x)))
> !     (fixnum (list x (format "#x%x" x)))
>       (t x)))
>   
>   (defun ert--explain-equal-rec (a b)
>
Your idea look good to me. I think about it but afraid inconsistent of output
(print 3 filed for character and 2 for fixnum). That is why I don't suggest
this solution...

One essential point is that if some test check fail all followed tests doesn't
executed due to this bug. So this must be fixed in any way...

-- 
Best regards!





      reply	other threads:[~2013-02-04 15:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-24 20:32 bug#13543: 24.2; [PATCH] (ert) "wrong-type-argument characterp" when assert fail on large (>28 bit) numbers Oleksandr Gavenko
2013-02-04  7:49 ` Glenn Morris
2013-02-04 15:33   ` Oleksandr Gavenko [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=87boc0drfs.fsf@gavenkoa.example.com \
    --to=gavenkoa@gmail.com \
    --cc=13543@debbugs.gnu.org \
    --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).