From 0c94e69fa6ed5a4f5d551f37f7f2632d2f2b2952 Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Sun, 24 Nov 2019 16:03:01 +0100 Subject: [PATCH] add comp-tests-free-fun --- test/src/comp-tests.el | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 ;; -- 2.39.5