summaryrefslogtreecommitdiff
path: root/test/lisp/calculator-tests.el
diff options
context:
space:
mode:
Diffstat (limited to 'test/lisp/calculator-tests.el')
-rw-r--r--test/lisp/calculator-tests.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/lisp/calculator-tests.el b/test/lisp/calculator-tests.el
index 00e8fe046a6..5b485fe6dc5 100644
--- a/test/lisp/calculator-tests.el
+++ b/test/lisp/calculator-tests.el
@@ -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