diff options
Diffstat (limited to 'test/src')
| -rw-r--r-- | test/src/comp-tests.el | 17 |
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) |