From b6288d1322ec476c156c165496d08e8f782bcb03 Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Sun, 11 Aug 2019 18:49:26 +0200 Subject: [PATCH] improve comp-tests-ffuncall --- test/src/comp-tests.el | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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)) -- 2.39.5