From a18e54f54bdcd5d9b2c11b0307b0a157f52e5926 Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Sat, 2 Nov 2019 12:16:41 +0100 Subject: [PATCH] add a test for functions with more than 8 arguments --- test/src/comp-test-funcs.el | 10 ++++++++++ test/src/comp-tests.el | 6 ++++++ 2 files changed, 16 insertions(+) diff --git a/test/src/comp-test-funcs.el b/test/src/comp-test-funcs.el index 540170ea966..66ce0e70e8d 100644 --- a/test/src/comp-test-funcs.el +++ b/test/src/comp-test-funcs.el @@ -81,6 +81,14 @@ (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)) @@ -342,6 +350,7 @@ (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 @@ -350,6 +359,7 @@ 3)))) (defun comp-test-silly-frame2 (token) + ;; Check robustness against dead code. (while c (cl-case c (?< 1) diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el index 16726cb4bbe..06a1ae90542 100644 --- a/test/src/comp-tests.el +++ b/test/src/comp-tests.el @@ -124,6 +124,12 @@ (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])) -- 2.39.5