diff options
| author | Andrea Corallo | 2019-06-09 17:01:06 +0200 |
|---|---|---|
| committer | Andrea Corallo | 2020-01-01 11:33:40 +0100 |
| commit | 8bfe8ce8d0885e8022b2bea82d1cff9cbed86fb1 (patch) | |
| tree | f896aa9c8056aacacdb6d394e2de9923e955cf14 /test/src | |
| parent | 96fc40d7dbdc77efa7b2e01f231bef9e19e96786 (diff) | |
| download | emacs-8bfe8ce8d0885e8022b2bea82d1cff9cbed86fb1.tar.gz emacs-8bfe8ce8d0885e8022b2bea82d1cff9cbed86fb1.zip | |
add sub1
Diffstat (limited to 'test/src')
| -rw-r--r-- | test/src/comp-tests.el | 16 |
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) |