diff options
| author | Andrea Corallo | 2019-06-16 12:08:48 +0200 |
|---|---|---|
| committer | Andrea Corallo | 2020-01-01 11:33:42 +0100 |
| commit | 04aafb7f66dff551d80040a53c482bde08bbc254 (patch) | |
| tree | 40e1340caa71e50a575fe9aae40aacb64e65fbc4 /test/src | |
| parent | 96e1a5efb3bdeb9e70f7ea6030514e83e6ae8da1 (diff) | |
| download | emacs-04aafb7f66dff551d80040a53c482bde08bbc254.tar.gz emacs-04aafb7f66dff551d80040a53c482bde08bbc254.zip | |
Bnumberp support
Diffstat (limited to 'test/src')
| -rw-r--r-- | test/src/comp-tests.el | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el index 99dce77dc29..9d1ee65e4ee 100644 --- a/test/src/comp-tests.el +++ b/test/src/comp-tests.el | |||
| @@ -289,14 +289,23 @@ | |||
| 289 | (defun comp-tests-integerp-f (x) | 289 | (defun comp-tests-integerp-f (x) |
| 290 | ;; Bintegerp | 290 | ;; Bintegerp |
| 291 | (integerp x)) | 291 | (integerp x)) |
| 292 | (defun comp-tests-numberp-f (x) | ||
| 293 | ;; Bnumberp | ||
| 294 | (numberp x)) | ||
| 292 | 295 | ||
| 293 | (byte-compile #'comp-tests-integerp-f) | 296 | (byte-compile #'comp-tests-integerp-f) |
| 294 | (native-compile #'comp-tests-integerp-f) | 297 | (native-compile #'comp-tests-integerp-f) |
| 298 | (byte-compile #'comp-tests-numberp-f) | ||
| 299 | (native-compile #'comp-tests-numberp-f) | ||
| 295 | 300 | ||
| 296 | (should (eq (comp-tests-integerp-f 1) t)) | 301 | (should (eq (comp-tests-integerp-f 1) t)) |
| 297 | (should (eq (comp-tests-integerp-f '(1)) nil)) | 302 | (should (eq (comp-tests-integerp-f '(1)) nil)) |
| 298 | (should (eq (comp-tests-integerp-f 3.5) nil)) | 303 | (should (eq (comp-tests-integerp-f 3.5) nil)) |
| 299 | (should (eq (comp-tests-integerp-f (1+ most-negative-fixnum)) t))) | 304 | (should (eq (comp-tests-integerp-f (1+ most-negative-fixnum)) t)) |
| 305 | |||
| 306 | (should (eq (comp-tests-numberp-f 1) t)) | ||
| 307 | (should (eq (comp-tests-numberp-f 'a) nil)) | ||
| 308 | (should (eq (comp-tests-numberp-f 3.5) t))) | ||
| 300 | 309 | ||
| 301 | (ert-deftest comp-tests-gc () | 310 | (ert-deftest comp-tests-gc () |
| 302 | "Try to do some longer computation to let the gc kick in." | 311 | "Try to do some longer computation to let the gc kick in." |