1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

add comp-tests-free-fun

This commit is contained in:
Andrea Corallo 2019-11-24 16:03:01 +01:00
parent 960aa0c798
commit 0c94e69fa6

View file

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