]> git.eshelyaron.com Git - emacs.git/commitdiff
add a test for functions with more than 8 arguments
authorAndrea Corallo <akrl@sdf.org>
Sat, 2 Nov 2019 11:16:41 +0000 (12:16 +0100)
committerAndrea Corallo <akrl@sdf.org>
Wed, 1 Jan 2020 10:38:00 +0000 (11:38 +0100)
test/src/comp-test-funcs.el
test/src/comp-tests.el

index 540170ea966ae94ae76359dab5f00c7cc12d048f..66ce0e70e8d674bcb4aea2e3f889764ae7e2c3d5 100644 (file)
 (defun comp-tests-ffuncall-callee-rest-f (a b &rest c)
   (list a b c))
 
+(defun comp-tests-ffuncall-callee-more8-f (p1 p2 p3 p4 p5 p6 p7 p8 p9 p10)
+  ;; More then 8 args.
+  (list p1 p2 p3 p4 p5 p6 p7 p8 p9 p10))
+
+(defun comp-tests-ffuncall-callee-more8-rest-f (p1 p2 p3 p4 p5 p6 p7 p8 p9 &rest p10)
+  ;; More then 8 args.
+  (list p1 p2 p3 p4 p5 p6 p7 p8 p9 p10))
+
 (defun comp-tests-ffuncall-native-f ()
   "Call a primitive with no dedicate op."
   (make-vector 1 nil))
 
 (defun comp-test-callee (_ __) t)
 (defun comp-test-silly-frame1 (x)
+  ;; Check robustness against dead code.
   (cl-case x
     (0 (comp-test-callee
         (pcase comp-tests-var1
         3))))
 
 (defun comp-test-silly-frame2 (token)
+  ;; Check robustness against dead code.
   (while c
     (cl-case c
       (?< 1)
index 16726cb4bbee2f5888f30cf9b70ece1e2f3dd234..06a1ae90542959d6ece560f0057a8f8c47aaad30 100644 (file)
   (should (equal (comp-tests-ffuncall-callee-rest-f 1 2 3 4)
                  '(1 2 (3 4))))
 
+  (should (equal (comp-tests-ffuncall-callee-more8-f 1 2 3 4 5 6 7 8 9 10)
+                 '(1 2 3 4 5 6 7 8 9 10)))
+
+  (should (equal (comp-tests-ffuncall-callee-more8-rest-f 1 2 3 4 5 6 7 8 9 10 11)
+                 '(1 2 3 4 5 6 7 8 9 (10 11))))
+
   (should (equal (comp-tests-ffuncall-native-f) [nil]))
 
   (should (equal (comp-tests-ffuncall-native-rest-f) [1 2 3]))