]> git.eshelyaron.com Git - emacs.git/commitdiff
add primitve call test
authorAndrea Corallo <andrea_corallo@yahoo.it>
Sun, 30 Jun 2019 15:42:30 +0000 (17:42 +0200)
committerAndrea Corallo <akrl@sdf.org>
Wed, 1 Jan 2020 10:33:48 +0000 (11:33 +0100)
test/src/comp-tests.el

index d2b8f56d36ff81ae506ace0a8a01e3739d2107ad..125af64b569defbceb19724e34ca1397dc21904b 100644 (file)
   (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."