Add test for calculator-exp
* test/lisp/calculator-tests.el (calculator-expt): New test.
This commit is contained in:
parent
33d3e5c545
commit
cf5ae0507e
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue