diff options
| author | Andrea Corallo | 2019-06-11 23:47:16 +0200 |
|---|---|---|
| committer | Andrea Corallo | 2020-01-01 11:33:41 +0100 |
| commit | 3ee58c64e57cde232a062cb199688b2686488ef1 (patch) | |
| tree | e6829737b40a9e8a7c3d7d53f0f15d240cfe526a /test/src | |
| parent | 5c406adac75e1b007545991fb7f20068bcaa5b22 (diff) | |
| download | emacs-3ee58c64e57cde232a062cb199688b2686488ef1.tar.gz emacs-3ee58c64e57cde232a062cb199688b2686488ef1.zip | |
add setcar setcdr
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 f83fa8c8be9..e7d5ca67f47 100644 --- a/test/src/comp-tests.el +++ b/test/src/comp-tests.el | |||
| @@ -233,6 +233,23 @@ | |||
| 233 | (should (eq (comp-tests-geq-f 3 3) t)) | 233 | (should (eq (comp-tests-geq-f 3 3) t)) |
| 234 | (should (eq (comp-tests-geq-f 2 3) nil))) | 234 | (should (eq (comp-tests-geq-f 2 3) nil))) |
| 235 | 235 | ||
| 236 | (ert-deftest comp-tests-setcarcdr () | ||
| 237 | "Testing setcar setcdr." | ||
| 238 | (defun comp-tests-setcar-f (x y) | ||
| 239 | (setcar x y) | ||
| 240 | x) | ||
| 241 | (defun comp-tests-setcdr-f (x y) | ||
| 242 | (setcdr x y) | ||
| 243 | x) | ||
| 244 | |||
| 245 | (byte-compile #'comp-tests-setcar-f) | ||
| 246 | (byte-compile #'comp-tests-setcdr-f) | ||
| 247 | (native-compile #'comp-tests-setcar-f) | ||
| 248 | (native-compile #'comp-tests-setcdr-f) | ||
| 249 | |||
| 250 | (should (equal (comp-tests-setcar-f '(10 . 10) 3) '(3 . 10))) | ||
| 251 | (should (equal (comp-tests-setcdr-f '(10 . 10) 3) '(10 . 3)))) | ||
| 252 | |||
| 236 | (ert-deftest comp-tests-gc () | 253 | (ert-deftest comp-tests-gc () |
| 237 | "Try to do some longer computation to let the gc kick in." | 254 | "Try to do some longer computation to let the gc kick in." |
| 238 | (dotimes (_ 100000) | 255 | (dotimes (_ 100000) |