]> git.eshelyaron.com Git - emacs.git/commitdiff
* test/lisp/calc/calc-tests.el (calc-imaginary-i): New test.
authorNoam Postavsky <npostavs@gmail.com>
Thu, 30 Aug 2018 02:47:00 +0000 (22:47 -0400)
committerNoam Postavsky <npostavs@gmail.com>
Thu, 30 Aug 2018 02:47:00 +0000 (22:47 -0400)
test/lisp/calc/calc-tests.el

index fbd5f0e3a1d6b322a1b9cbeb7f20f4777a9fa903..101786c30e3d9d1f71b97a1d3e9b81f04f23a00a 100644 (file)
@@ -86,6 +86,13 @@ An existing calc stack is reused, otherwise a new one is created."
                                               (math-read-expr "1m") "cm")
                            '(* -100 (var cm var-cm)))))
 
+(ert-deftest calc-imaginary-i ()
+  "Test `math-imaginary-i' for non-special-const values."
+  (let ((var-i (calcFunc-polar (calcFunc-sqrt -1))))
+    (should (math-imaginary-i)))
+  (let ((var-i (calcFunc-sqrt -1)))
+    (should (math-imaginary-i))))
+
 (ert-deftest test-calc-23889 ()
   "Test for https://debbugs.gnu.org/23889 and 25652."
   (skip-unless (>= math-bignum-digit-length 9))