aboutsummaryrefslogtreecommitdiffstats
path: root/test/src
diff options
context:
space:
mode:
authorAndrea Corallo2019-06-09 17:01:06 +0200
committerAndrea Corallo2020-01-01 11:33:40 +0100
commit8bfe8ce8d0885e8022b2bea82d1cff9cbed86fb1 (patch)
treef896aa9c8056aacacdb6d394e2de9923e955cf14 /test/src
parent96fc40d7dbdc77efa7b2e01f231bef9e19e96786 (diff)
downloademacs-8bfe8ce8d0885e8022b2bea82d1cff9cbed86fb1.tar.gz
emacs-8bfe8ce8d0885e8022b2bea82d1cff9cbed86fb1.zip
add sub1
Diffstat (limited to 'test/src')
-rw-r--r--test/src/comp-tests.el16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el
index e1d6f313fd7..e13db89ddc6 100644
--- a/test/src/comp-tests.el
+++ b/test/src/comp-tests.el
@@ -146,6 +146,22 @@
146 (should (= (comp-tests-conditionals-2-f t) 1340)) 146 (should (= (comp-tests-conditionals-2-f t) 1340))
147 (should (eq (comp-tests-conditionals-2-f nil) nil))) 147 (should (eq (comp-tests-conditionals-2-f nil) nil)))
148 148
149(ert-deftest comp-tests-fixnum ()
150 "Testing some fixnum inline operation."
151 (defun comp-tests-fixnum-1-f (x)
152 (1- x))
153
154 (byte-compile #'comp-tests-fixnum-1-f)
155 (native-compile #'comp-tests-fixnum-1-f)
156
157 (should (= (comp-tests-fixnum-1-f 10) 9))
158 (should (= (comp-tests-fixnum-1-f most-negative-fixnum)
159 (1- most-negative-fixnum)))
160 (should (equal (condition-case err
161 (comp-tests-fixnum-1-f 'a)
162 (error (print err)))
163 '(wrong-type-argument number-or-marker-p a))))
164
149(ert-deftest comp-tests-gc () 165(ert-deftest comp-tests-gc ()
150 "Try to do some longer computation to let the gc kick in." 166 "Try to do some longer computation to let the gc kick in."
151 (dotimes (_ 100000) 167 (dotimes (_ 100000)