aboutsummaryrefslogtreecommitdiffstats
path: root/test/src
diff options
context:
space:
mode:
authorAndrea Corallo2019-06-16 11:21:29 +0200
committerAndrea Corallo2020-01-01 11:33:42 +0100
commit2a1bb41c14fba3ecb2f7ccdb251918ea0ac30c41 (patch)
tree34e0b7be78593888e1c9b9364417aa3e11d96112 /test/src
parent0438e245a15e91aac93a5df812ce292dd1ff681b (diff)
downloademacs-2a1bb41c14fba3ecb2f7ccdb251918ea0ac30c41.tar.gz
emacs-2a1bb41c14fba3ecb2f7ccdb251918ea0ac30c41.zip
Bintegerp support
Diffstat (limited to 'test/src')
-rw-r--r--test/src/comp-tests.el17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el
index 63dfafafb04..d7e6954455b 100644
--- a/test/src/comp-tests.el
+++ b/test/src/comp-tests.el
@@ -278,9 +278,26 @@
278 ;; Bconsp 278 ;; Bconsp
279 (consp x)) 279 (consp x))
280 280
281 ;; (byte-compile #'comp-tests-consp-f)
282 ;; (native-compile #'comp-tests-consp-f)
283
281 (should (eq (comp-tests-consp-f '(1)) t)) 284 (should (eq (comp-tests-consp-f '(1)) t))
282 (should (eq (comp-tests-consp-f 1) nil))) 285 (should (eq (comp-tests-consp-f 1) nil)))
283 286
287(ert-deftest comp-tests-num-inline ()
288 "Test some inlined number functions."
289 (defun comp-tests-integerp-f (x)
290 ;; Bintegerp
291 (integerp x))
292
293 (byte-compile #'comp-tests-integerp-f)
294 (native-compile #'comp-tests-integerp-f)
295
296 (should (eq (comp-tests-integerp-f 1) t))
297 (should (eq (comp-tests-integerp-f '(1)) nil))
298 (should (eq (comp-tests-integerp-f 3.5) nil))
299 (should (eq (comp-tests-integerp-f (1+ most-negative-fixnum)) t)))
300
284(ert-deftest comp-tests-gc () 301(ert-deftest comp-tests-gc ()
285 "Try to do some longer computation to let the gc kick in." 302 "Try to do some longer computation to let the gc kick in."
286 (dotimes (_ 100000) 303 (dotimes (_ 100000)