From: Ken Brown <kbrown@cornell.edu>
To: emacs-devel@gnu.org, Tino Calancha <tino.calancha@gmail.com>
Subject: Re: [Emacs-diffs] master c48e539 2/2: Use the expression angle units while simplifying it
Date: Thu, 25 May 2017 17:42:05 -0400 [thread overview]
Message-ID: <481777e0-5b91-6d6c-7fbe-645e197a1502@cornell.edu> (raw)
In-Reply-To: <20170518054757.B498920AC9@vcs0.savannah.gnu.org>
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
Ken
next parent reply other threads:[~2017-05-25 21:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20170518054755.876.89150@vcs0.savannah.gnu.org>
[not found] ` <20170518054757.B498920AC9@vcs0.savannah.gnu.org>
2017-05-25 21:42 ` Ken Brown [this message]
2017-05-26 2:03 ` [Emacs-diffs] master c48e539 2/2: Use the expression angle units while simplifying it Tino Calancha
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=481777e0-5b91-6d6c-7fbe-645e197a1502@cornell.edu \
--to=kbrown@cornell.edu \
--cc=emacs-devel@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.