From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.org!.POSTED!not-for-mail
From: Tino Calancha <tino.calancha@gmail.com>
Newsgroups: gmane.emacs.devel
Subject: Re: [Emacs-diffs] master c48e539 2/2: Use the expression angle units
	while simplifying it
Date: Fri, 26 May 2017 11:03:52 +0900 (JST)
Message-ID: <alpine.DEB.2.20.1705261101330.8670@calancha-pc>
References: <20170518054755.876.89150@vcs0.savannah.gnu.org>
	<20170518054757.B498920AC9@vcs0.savannah.gnu.org>
	<481777e0-5b91-6d6c-7fbe-645e197a1502@cornell.edu>
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII; format=flowed
X-Trace: blaine.gmane.org 1495764286 23380 195.159.176.226 (26 May 2017 02:04:46 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Fri, 26 May 2017 02:04:46 +0000 (UTC)
User-Agent: Alpine 2.20 (DEB 67 2015-01-07)
Cc: Tino Calancha <tino.calancha@gmail.com>,
	Emacs developers <emacs-devel@gnu.org>
To: Ken Brown <kbrown@cornell.edu>
Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 26 04:04:38 2017
Return-path: <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org>
Envelope-to: ged-emacs-devel@m.gmane.org
Original-Received: from lists.gnu.org ([208.118.235.17])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org>)
	id 1dE4cH-0005tq-MY
	for ged-emacs-devel@m.gmane.org; Fri, 26 May 2017 04:04:37 +0200
Original-Received: from localhost ([::1]:34514 helo=lists.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org>)
	id 1dE4cN-0003Q4-BN
	for ged-emacs-devel@m.gmane.org; Thu, 25 May 2017 22:04:43 -0400
Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45889)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <tino.calancha@gmail.com>) id 1dE4bh-0003Px-90
	for emacs-devel@gnu.org; Thu, 25 May 2017 22:04:02 -0400
Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <tino.calancha@gmail.com>) id 1dE4be-0001cJ-54
	for emacs-devel@gnu.org; Thu, 25 May 2017 22:04:01 -0400
Original-Received: from mail-pf0-x236.google.com ([2607:f8b0:400e:c00::236]:36847)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <tino.calancha@gmail.com>)
	id 1dE4bd-0001cB-Vu
	for emacs-devel@gnu.org; Thu, 25 May 2017 22:03:58 -0400
Original-Received: by mail-pf0-x236.google.com with SMTP id m17so183207930pfg.3
	for <emacs-devel@gnu.org>; Thu, 25 May 2017 19:03:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
	h=from:date:to:cc:subject:in-reply-to:message-id:references
	:user-agent:mime-version;
	bh=V9gaEJT3k/0gLSNUMnoSKm8d7K5l3QKiJe4sWhVPRWc=;
	b=lTVnfKi6gOZ+w4e9bif94eUkXYOQTxz7nuOSuDfVSW+d4Xjn6KX6lUgnHZDAY1YqFL
	AlnSeQ5ndySwOEtwbatNAx6xUfEX2dT3s/NzNaAki85F2G1v8ga6bPrwepgtuFfZIW/w
	Yrt6O0En8ZHJ9qNkC1SToDvd+d+rTzHib15v47ur7KHjMlaHkzDXYoRL01ALncfvbLD+
	gfhOdEu93AyxnEMZETc4MbXGIJqtWE+4Vk5xbPnBJBkDj1RNOjDhX1QLpBUclpJFincM
	KC8wr2rMKAeD1w85ucf2++/j7Jm1Qi9ViRlAqEWiWjEe60OUyZlPTrOJ9YywhE4eYv1A
	HiHg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20161025;
	h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id
	:references:user-agent:mime-version;
	bh=V9gaEJT3k/0gLSNUMnoSKm8d7K5l3QKiJe4sWhVPRWc=;
	b=Mqu3Uv+q6NKLnC/Wal0hxV6YywTXsAGsFQjqbIraCS5qGiaag5pY4fr658vEHWhe+H
	SgQLXdolY+lU32DmP7OnI4cIRd6RQklUx5E8ucSPGQmWoKN6Km9E9Mn/ygvb9yWIdFdf
	WzaOgtm63TQOJ8fF8Hmpto7aYF6BPZ46ZHrabNZ/77+FYZBz/BkHCb7wGtMYxoq2YiFT
	0i0grWg2p8GXFUP5oV/qra8AIPIqCHHx1DoDgNgQl6lQE//UpMILFbMmma/8eogTCwRL
	W1hTm4gYX9qViJU8yhRiItrZO3R6XY+SiTjuT+iQSOLkpRLvYzJpYPuqOvs9x+ZXM/GO
	1fPg==
X-Gm-Message-State: AODbwcDhJBkn+UqAn5AGnaqLsoJMsBR+d6lYm6ATdN3lFQd+YQErl9tS
	isvc6eKe4nj7Gw==
X-Received: by 10.98.178.130 with SMTP id z2mr39983476pfl.77.1495764236768;
	Thu, 25 May 2017 19:03:56 -0700 (PDT)
Original-Received: from calancha-pc (222.139.137.133.dy.bbexcite.jp. [133.137.139.222])
	by smtp.gmail.com with ESMTPSA id
	k79sm16248017pfj.6.2017.05.25.19.03.54
	(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
	Thu, 25 May 2017 19:03:55 -0700 (PDT)
X-Google-Original-From: Tino Calancha <calancha@gmail.com>
X-X-Sender: calancha@calancha-pc
In-Reply-To: <481777e0-5b91-6d6c-7fbe-645e197a1502@cornell.edu>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 2607:f8b0:400e:c00::236
X-BeenThere: emacs-devel@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: "Emacs development discussions." <emacs-devel.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-devel>,
	<mailto:emacs-devel-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/emacs-devel/>
List-Post: <mailto:emacs-devel@gnu.org>
List-Help: <mailto:emacs-devel-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-devel>,
	<mailto:emacs-devel-request@gnu.org?subject=subscribe>
Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org
Original-Sender: "Emacs-devel" <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org>
Xref: news.gmane.org gmane.emacs.devel:215205
Archived-At: <http://permalink.gmane.org/gmane.emacs.devel/215205>



On Thu, 25 May 2017, Ken Brown wrote:

> On 5/18/2017 1:47 AM, Tino Calancha wrote:
>> --- a/test/lisp/calc/calc-tests.el
>> +++ b/test/lisp/calc/calc-tests.el
>> @@ -86,6 +86,50 @@ An existing calc stack is reused, otherwise a new one is 
>> created."
>>   					       (math-read-expr "1m") "cm")
>>   			    '(* -100 (var cm var-cm)))))
>>   +(ert-deftest test-calc-23889 ()
>> +  "Test forhttp://debbugs.gnu.org/23889  and 25652."
>> +  (dolist (mode '(deg rad))
>> +    (let ((calc-angle-mode mode))
>> +      ;; If user inputs angle units, then should ignore `calc-angle-mode'.
>> +      (should (string= "5253"
>> +                       (substring
>> +                        (number-to-string
>> +                         (nth 1
>> +                              (math-simplify-units
>> +                               '(calcFunc-cos (* 45 (var rad var-rad))))))
>> +                        0 4)))
>
> This can fail on some platforms, depending on the size of a Lisp integer, 
> because
>
> (nth 1
>     (math-simplify-units
>      '(calcFunc-cos (* 45 (var rad var-rad)))))
>
> doesn't necessarily evaluate to an integer.  For example, on 32-bit Cygwin it 
> evaluates to (bigpos 8818 2198 5253).  This causes the test to fail as 
> follows:
>
> $ make -C test calc-tests SELECTOR='\"test-calc-23889$$\"'
> [...]
> Test test-calc-23889 condition:
>    (wrong-type-argument numberp
>                         (bigpos 8818 2198 5253))
>   FAILED  1/1  test-calc-23889
Thank you.
I pushed a fix which skip the test if the Lisp integer isn't big enough.
It must be OK now.