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 ;;