From: Andrea Corallo Date: Sun, 24 Nov 2019 15:03:01 +0000 (+0100) Subject: add comp-tests-free-fun X-Git-Tag: emacs-28.0.90~2727^2~950 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0c94e69fa6ed5a4f5d551f37f7f2632d2f2b2952;p=emacs.git add comp-tests-free-fun --- diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el index 361f116edae..570dcbd1ffa 100644 --- a/test/src/comp-tests.el +++ b/test/src/comp-tests.el @@ -30,7 +30,7 @@ (require 'comp) ;; (setq comp-debug 1) -(setq comp-speed 3) +(setq comp-speed 0) (defconst comp-test-directory (file-name-directory (or load-file-name buffer-file-name))) @@ -307,6 +307,14 @@ Check that the resulting binaries do not differ." ;; See `comp-propagate-insn' `comp-function-call-remove'. (should (= (comp-tests-func-call-removal-f) 1))) +(ert-deftest comp-tests-free-fun () + "Check we are able to compile a single function." + (defun comp-tests-free-fun-f () + 3) + (load (native-compile #'comp-tests-free-fun-f)) + (should (subr-native-elisp-p (symbol-function #'comp-tests-free-fun-f))) + (should (= (comp-tests-free-fun-f) 3))) + ;;;;;;;;;;;;;;;;;;;; ;; Tromey's tests ;;