Add test for calculator-exp

* test/lisp/calculator-tests.el (calculator-expt): New test.
This commit is contained in:
Stefan Kangas 2023-08-16 09:14:49 +02:00
parent 33d3e5c545
commit cf5ae0507e

View file

@ -47,5 +47,11 @@
(let ((calculator-input-radix nil))
(should (equal (calculator-string-to-number str) expected)))))))
(ert-deftest calculator-expt ()
(should (= (calculator-expt 2 -1) 0.5))
(should (= (calculator-expt -2 2) 4))
(should (= (calculator-expt -2 3) -8))
(should (= (calculator-expt 2 64) 18446744073709551616)))
(provide 'calculator-tests)
;;; calculator-tests.el ends here