aboutsummaryrefslogtreecommitdiffstats
path: root/test/src
diff options
context:
space:
mode:
authorAndrea Corallo2019-11-24 16:03:01 +0100
committerAndrea Corallo2020-01-01 11:38:09 +0100
commit0c94e69fa6ed5a4f5d551f37f7f2632d2f2b2952 (patch)
tree36707333c9995b3813c84e9220457bda27c7f3fd /test/src
parent960aa0c7985f6c61a26f99653c6e9ae9369e944e (diff)
downloademacs-0c94e69fa6ed5a4f5d551f37f7f2632d2f2b2952.tar.gz
emacs-0c94e69fa6ed5a4f5d551f37f7f2632d2f2b2952.zip
add comp-tests-free-fun
Diffstat (limited to 'test/src')
-rw-r--r--test/src/comp-tests.el10
1 files changed, 9 insertions, 1 deletions
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 @@
30(require 'comp) 30(require 'comp)
31 31
32;; (setq comp-debug 1) 32;; (setq comp-debug 1)
33(setq comp-speed 3) 33(setq comp-speed 0)
34 34
35(defconst comp-test-directory (file-name-directory (or load-file-name 35(defconst comp-test-directory (file-name-directory (or load-file-name
36 buffer-file-name))) 36 buffer-file-name)))
@@ -307,6 +307,14 @@ Check that the resulting binaries do not differ."
307 ;; See `comp-propagate-insn' `comp-function-call-remove'. 307 ;; See `comp-propagate-insn' `comp-function-call-remove'.
308 (should (= (comp-tests-func-call-removal-f) 1))) 308 (should (= (comp-tests-func-call-removal-f) 1)))
309 309
310(ert-deftest comp-tests-free-fun ()
311 "Check we are able to compile a single function."
312 (defun comp-tests-free-fun-f ()
313 3)
314 (load (native-compile #'comp-tests-free-fun-f))
315 (should (subr-native-elisp-p (symbol-function #'comp-tests-free-fun-f)))
316 (should (= (comp-tests-free-fun-f) 3)))
317
310 318
311;;;;;;;;;;;;;;;;;;;; 319;;;;;;;;;;;;;;;;;;;;
312;; Tromey's tests ;; 320;; Tromey's tests ;;