disable part of comp-tests-ffuncall

This commit is contained in:
Andrea Corallo 2019-09-02 17:28:25 +02:00 committed by Andrea Corallo
parent 6cd45fbf37
commit 41f1fd53c8

View file

@ -27,13 +27,15 @@
(require 'ert)
(require 'comp)
;; (require 'cl-lib)
(require 'cl-lib)
(setq comp-speed 3)
(defun comp-test-apply (func &rest args)
(unless (subrp (symbol-function func))
(native-compile func))
(native-compile func)
(cl-assert (symbol-name func))
(load (concat (symbol-name func) ".eln")))
(apply func args))
(defun comp-mashup (&rest args)
@ -127,7 +129,7 @@
(ert-deftest comp-tests-length ()
"Testing length."
(defun comp-tests-length-f ()
(length '(1 2 3)))
(length '(1 2 3)))
(should (= (comp-test-apply #'comp-tests-length-f) 3)))
@ -162,19 +164,19 @@
(ert-deftest comp-tests-ffuncall ()
"Test calling conventions."
(defun comp-tests-ffuncall-caller-f ()
(comp-tests-ffuncall-callee-f 1 2 3))
;; (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)))
;; (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)))
;; ;; 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)))
;; ;; 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))