]> git.eshelyaron.com Git - emacs.git/commitdiff
add comp-tests-trampoline-removal
authorAndrea Corallo <akrl@sdf.org>
Sat, 16 Nov 2019 14:12:37 +0000 (15:12 +0100)
committerAndrea Corallo <akrl@sdf.org>
Wed, 1 Jan 2020 10:38:05 +0000 (11:38 +0100)
test/src/comp-test-funcs.el
test/src/comp-tests.el

index 5f33eacdb2fb487eb0223934cdbd06fa4a6252dc..214e07e6dde1c77fb77da4f2e45027a5061ebe7a 100644 (file)
 (defun comp-tests-string-trim-f (url)
   (string-trim url))
 
+(defun comp-tests-trampoline-removal-f ()
+  (make-hash-table))
+
 ;;;;;;;;;;;;;;;;;;;;
 ;; Tromey's tests ;;
 ;;;;;;;;;;;;;;;;;;;;
index 1f43a91d49c38661414ba34dda9754ad89406ee2..34d00896b4fe56afcbdb561eee6ee58773ab4f18 100644 (file)
@@ -306,6 +306,11 @@ Check that the resulting binaries do not differ."
 (ert-deftest comp-tests-string-trim ()
   (should (string= (comp-tests-string-trim-f "dsaf ") "dsaf")))
 
+(ert-deftest comp-tests-trampoline-removal ()
+  ;; This tests that we can can call primitives with no dedicated bytecode.
+  ;; At speed >= 2 the trampoline will not be used.
+  (should (hash-table-p (comp-tests-trampoline-removal-f))))
+
 ;;;;;;;;;;;;;;;;;;;;
 ;; Tromey's tests ;;
 ;;;;;;;;;;;;;;;;;;;;