diff options
author | Yuuki Harano <masm+github@masm11.me> | 2021-11-11 00:39:53 +0900 |
---|---|---|
committer | Yuuki Harano <masm+github@masm11.me> | 2021-11-11 00:39:53 +0900 |
commit | 4dd1f56f29fc598a8339a345c2f8945250600602 (patch) | |
tree | af341efedffe027e533b1bcc0dbf270532e48285 /test/lisp/calc/calc-tests.el | |
parent | 4c49ec7f865bdad1629d2f125f71f4e506b258f2 (diff) | |
parent | 810fa21d26453f898de9747ece7205dfe6de9d08 (diff) | |
download | emacs-4dd1f56f29fc598a8339a345c2f8945250600602.tar.gz emacs-4dd1f56f29fc598a8339a345c2f8945250600602.tar.bz2 emacs-4dd1f56f29fc598a8339a345c2f8945250600602.zip |
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs into feature/pgtk
Diffstat (limited to 'test/lisp/calc/calc-tests.el')
-rw-r--r-- | test/lisp/calc/calc-tests.el | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/lisp/calc/calc-tests.el b/test/lisp/calc/calc-tests.el index 13dd228d3b3..3eb6b34c132 100644 --- a/test/lisp/calc/calc-tests.el +++ b/test/lisp/calc/calc-tests.el @@ -53,7 +53,7 @@ A and B should be calc expressions." (defun calc-tests-simple (fun string &rest args) "Push STRING on the calc stack, then call FUN and return the new top. -The result is a calc (i.e., lisp) expression, not its string representation. +The result is a calc (i.e., Lisp) expression, not its string representation. Also pop the entire stack afterwards. An existing calc stack is reused, otherwise a new one is created." (calc-eval string 'push) @@ -448,7 +448,7 @@ An existing calc stack is reused, otherwise a new one is created." ;; Generalisation for any n, integral k≥0: use falling product (/ (apply '* (number-sequence n (- n (1- k)) -1)) (calc-tests--fac k))) - (t (error "case not covered")))) + (t (error "Case not covered")))) (defun calc-tests--calc-to-number (x) "Convert a Calc object to a Lisp number." @@ -810,6 +810,12 @@ An existing calc stack is reused, otherwise a new one is created." (should (equal (calcFunc-test6 3) (* (* 3 2) (- 3 1)))) (should (equal (calcFunc-test7 3) (* 3 2)))) +(ert-deftest calc-nth-root () + ;; bug#51209 + (let* ((calc-display-working-message nil) + (x (calc-tests--calc-to-number (math-pow 8 '(frac 1 6))))) + (should (< (abs (- x (sqrt 2.0))) 1.0e-10)))) + (provide 'calc-tests) ;;; calc-tests.el ends here |