From: Andrea Corallo Date: Sun, 11 Aug 2019 16:49:26 +0000 (+0200) Subject: improve comp-tests-ffuncall X-Git-Tag: emacs-28.0.90~2727^2~1289 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b6288d1322ec476c156c165496d08e8f782bcb03;p=emacs.git improve comp-tests-ffuncall --- diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el index 1f15a0bd8bd..e7b370c9321 100644 --- a/test/src/comp-tests.el +++ b/test/src/comp-tests.el @@ -159,12 +159,21 @@ (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))