]> git.eshelyaron.com Git - emacs.git/commitdiff
improve comp-tests-ffuncall
authorAndrea Corallo <andrea_corallo@yahoo.it>
Sun, 11 Aug 2019 16:49:26 +0000 (18:49 +0200)
committerAndrea Corallo <akrl@sdf.org>
Wed, 1 Jan 2020 10:33:59 +0000 (11:33 +0100)
test/src/comp-tests.el

index 1f15a0bd8bd7b14a1a7b8bd6d39f4d3a03f15174..e7b370c93217a23f30696fd298780d4f5903b299 100644 (file)
 
 (ert-deftest comp-tests-ffuncall ()
   "Test calling conventions."
-  (native-compile #'comp-tests-ffuncall-calle-f)
+
   (defun comp-tests-ffuncall-caller-f ()
     (comp-tests-ffuncall-callee-f 1 2 3))
 
   (should (equal (comp-test-apply #'comp-tests-ffuncall-caller-f) '(1 2 3)))
 
+  ;; After it gets compiled
+  (native-compile #'comp-tests-ffuncall-callee-f)
+  (should (equal (comp-test-apply #'comp-tests-ffuncall-caller-f) '(1 2 3)))
+
+  ;; Recompiling the caller once with callee already compiled
+  (defun comp-tests-ffuncall-caller-f ()
+    (comp-tests-ffuncall-callee-f 1 2 3))
+  (should (equal (comp-test-apply #'comp-tests-ffuncall-caller-f) '(1 2 3)))
+
   (defun comp-tests-ffuncall-callee-optional-f (a b &optional c d)
     (list a b c d))