From aa312e07b7a9d3e952ccb59abfe9e03dc977217e Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Sun, 30 Jun 2019 17:42:30 +0200 Subject: [PATCH] add primitve call test --- test/src/comp-tests.el | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el index d2b8f56d36f..125af64b569 100644 --- a/test/src/comp-tests.el +++ b/test/src/comp-tests.el @@ -153,15 +153,25 @@ (should (string= (comp-tests-concat-f "bar") "abcdabcabfoobar"))) (ert-deftest comp-tests-ffuncall () - "Testing varset." + "Test calling conventions." (defun comp-tests-ffuncall-callee-f (x y z) (list x y z)) (defun comp-tests-ffuncall-caller-f () (comp-tests-ffuncall-callee-f 1 2 3)) + (byte-compile #'comp-tests-ffuncall-caller-f) (native-compile #'comp-tests-ffuncall-caller-f) - (should (equal (comp-tests-ffuncall-caller-f) '(1 2 3)))) + (should (equal (comp-tests-ffuncall-caller-f) '(1 2 3))) + + (defun comp-tests-ffuncall-native-f () + "Call a primitive with no dedicate op." + (make-vector 1 nil)) + + (byte-compile #'comp-tests-ffuncall-native-f) + (native-compile #'comp-tests-ffuncall-native-f) + + (should (vectorp (comp-tests-ffuncall-native-f)))) (ert-deftest comp-tests-conditionals () "Testing conditionals." -- 2.39.5