From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Oleksandr Gavenko Newsgroups: gmane.emacs.bugs 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 Organization: Oleksandr Gavenko , http://gavenkoa.users.sf.net Message-ID: <87boc0drfs.fsf@gavenkoa.example.com> References: <878v7i1fvg.fsf@gavenkoa.example.com> <8gmwvktt72.fsf@fencepost.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1359992046 31713 80.91.229.3 (4 Feb 2013 15:34:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 Feb 2013 15:34:06 +0000 (UTC) Cc: 13543@debbugs.gnu.org To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 04 16:34:24 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1U2O3r-00011C-Fp for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Feb 2013 16:34:23 +0100 Original-Received: from localhost ([::1]:48942 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U2O3Z-0002ZB-0l for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Feb 2013 10:34:05 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:60606) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U2O3U-0002Ye-LU for bug-gnu-emacs@gnu.org; Mon, 04 Feb 2013 10:34:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U2O3S-0001Ih-1n for bug-gnu-emacs@gnu.org; Mon, 04 Feb 2013 10:34:00 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58911) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U2O3R-0001IS-Pf for bug-gnu-emacs@gnu.org; Mon, 04 Feb 2013 10:33:57 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1U2O4U-0000FE-FJ for bug-gnu-emacs@gnu.org; Mon, 04 Feb 2013 10:35:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Oleksandr Gavenko Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 04 Feb 2013 15:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13543 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 13543-submit@debbugs.gnu.org id=B13543.1359992096925 (code B ref 13543); Mon, 04 Feb 2013 15:35:02 +0000 Original-Received: (at 13543) by debbugs.gnu.org; 4 Feb 2013 15:34:56 +0000 Original-Received: from localhost ([127.0.0.1]:36142 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U2O4N-0000Es-Ce for submit@debbugs.gnu.org; Mon, 04 Feb 2013 10:34:55 -0500 Original-Received: from mail-ee0-f52.google.com ([74.125.83.52]:56120) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U2O4L-0000Ek-58 for 13543@debbugs.gnu.org; Mon, 04 Feb 2013 10:34:53 -0500 Original-Received: by mail-ee0-f52.google.com with SMTP id b15so3172289eek.11 for <13543@debbugs.gnu.org>; Mon, 04 Feb 2013 07:33:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:organization:references:date :in-reply-to:message-id:user-agent:mime-version:content-type; bh=nSht8G/5nrn08cpmpdD39inrPk4YEW+PfveNQscYK8k=; b=AEnqhgE7NoGJ20e0BNWZzv3S7uxQQkD+TUKBbTI6jmUWI116sR4HFvQE8GifrJ1rm9 5uPujnAhbXnT2KgDS8DrCaApYq+HEz7A/ZBrDQPodt2S1G7ujfm8NWsWYbaGoexMbZDn tC3/mIwTD2QW67szFY3EBcw8vOBsRHgMy71CprwGuC2/HihwNYTPFmWA4YKsM173qahF tkKWao/prEp4EF1nR88Tyiy0XvpACdC/+WuGDPgPpCvlDHbOMslB+9B6eVvgCA4mkvre cvLZ3Vhr2wQ0YatI9EuCczSmMZmnEzgLIm7WEpN7OV38BA23hBoITN/1Mn1D7zq/cB1e IM2w== X-Received: by 10.14.4.194 with SMTP id 42mr73493889eej.35.1359992027092; Mon, 04 Feb 2013 07:33:47 -0800 (PST) Original-Received: from desktop ([37.229.4.200]) by mx.google.com with ESMTPS id a1sm2506791eep.2.2013.02.04.07.33.45 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 04 Feb 2013 07:33:45 -0800 (PST) In-Reply-To: <8gmwvktt72.fsf@fencepost.gnu.org> (Glenn Morris's message of "Mon, 04 Feb 2013 02:49:05 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:70677 Archived-At: 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!