diff options
| author | Andrea Corallo | 2019-08-03 19:42:57 +0200 |
|---|---|---|
| committer | Andrea Corallo | 2020-01-01 11:33:56 +0100 |
| commit | 318c4772af4fa04fd8dc498bdc252b691b3cdab5 (patch) | |
| tree | 2a5bd15e7949d3aa239979bc890f462b46ebcf61 /test/src | |
| parent | bebe5a9791f7db3f088e0c07b2fd68e1d21bb161 (diff) | |
| download | emacs-318c4772af4fa04fd8dc498bdc252b691b3cdab5.tar.gz emacs-318c4772af4fa04fd8dc498bdc252b691b3cdab5.zip | |
fix comp-limplify-listn
Diffstat (limited to 'test/src')
| -rw-r--r-- | test/src/comp-tests.el | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el index 58846ed50d0..9fbff7639e9 100644 --- a/test/src/comp-tests.el +++ b/test/src/comp-tests.el | |||
| @@ -45,6 +45,8 @@ | |||
| 45 | "Testing cons car cdr." | 45 | "Testing cons car cdr." |
| 46 | (defun comp-tests-list-f () | 46 | (defun comp-tests-list-f () |
| 47 | (list 1 2 3)) | 47 | (list 1 2 3)) |
| 48 | (defun comp-tests-list2-f (a b c) | ||
| 49 | (list a b c)) | ||
| 48 | (defun comp-tests-car-f (x) | 50 | (defun comp-tests-car-f (x) |
| 49 | ;; Bcar | 51 | ;; Bcar |
| 50 | (car x)) | 52 | (car x)) |
| @@ -59,12 +61,14 @@ | |||
| 59 | (cdr-safe x)) | 61 | (cdr-safe x)) |
| 60 | 62 | ||
| 61 | (native-compile #'comp-tests-list-f) | 63 | (native-compile #'comp-tests-list-f) |
| 64 | (native-compile #'comp-tests-list2-f) | ||
| 62 | (native-compile #'comp-tests-car-f) | 65 | (native-compile #'comp-tests-car-f) |
| 63 | (native-compile #'comp-tests-cdr-f) | 66 | (native-compile #'comp-tests-cdr-f) |
| 64 | (native-compile #'comp-tests-car-safe-f) | 67 | (native-compile #'comp-tests-car-safe-f) |
| 65 | (native-compile #'comp-tests-cdr-safe-f) | 68 | (native-compile #'comp-tests-cdr-safe-f) |
| 66 | 69 | ||
| 67 | (should (equal (comp-tests-list-f) '(1 2 3))) | 70 | (should (equal (comp-tests-list-f) '(1 2 3))) |
| 71 | (should (equal (comp-tests-list2-f 1 2 3) '(1 2 3))) | ||
| 68 | (should (= (comp-tests-car-f '(1 . 2)) 1)) | 72 | (should (= (comp-tests-car-f '(1 . 2)) 1)) |
| 69 | (should (null (comp-tests-car-f nil))) | 73 | (should (null (comp-tests-car-f nil))) |
| 70 | (should (= (condition-case err | 74 | (should (= (condition-case err |