diff options
| author | Andrea Corallo | 2019-06-16 12:40:23 +0200 |
|---|---|---|
| committer | Andrea Corallo | 2020-01-01 11:33:42 +0100 |
| commit | 0c7115c7b894c8e1655a0d5e482cc7ed8b231506 (patch) | |
| tree | 0b58b1d5855cb783a69a319669e4ebef7d50b615 /test/src | |
| parent | 04aafb7f66dff551d80040a53c482bde08bbc254 (diff) | |
| download | emacs-0c7115c7b894c8e1655a0d5e482cc7ed8b231506.tar.gz emacs-0c7115c7b894c8e1655a0d5e482cc7ed8b231506.zip | |
BdiscardN support
Diffstat (limited to 'test/src')
| -rw-r--r-- | test/src/comp-tests.el | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el index 9d1ee65e4ee..f1acc42b8ca 100644 --- a/test/src/comp-tests.el +++ b/test/src/comp-tests.el | |||
| @@ -307,6 +307,20 @@ | |||
| 307 | (should (eq (comp-tests-numberp-f 'a) nil)) | 307 | (should (eq (comp-tests-numberp-f 'a) nil)) |
| 308 | (should (eq (comp-tests-numberp-f 3.5) t))) | 308 | (should (eq (comp-tests-numberp-f 3.5) t))) |
| 309 | 309 | ||
| 310 | (ert-deftest comp-tests-stack () | ||
| 311 | "Test some stack operation." | ||
| 312 | (defun comp-tests-discardn-f (x) | ||
| 313 | ;; BdiscardN | ||
| 314 | (1+ (let ((a 1) | ||
| 315 | (_b) | ||
| 316 | (_c)) | ||
| 317 | a))) | ||
| 318 | |||
| 319 | (byte-compile #'comp-tests-discardn-f) | ||
| 320 | (native-compile #'comp-tests-discardn-f) | ||
| 321 | |||
| 322 | (should (= (comp-tests-discardn-f 10) 2))) | ||
| 323 | |||
| 310 | (ert-deftest comp-tests-gc () | 324 | (ert-deftest comp-tests-gc () |
| 311 | "Try to do some longer computation to let the gc kick in." | 325 | "Try to do some longer computation to let the gc kick in." |
| 312 | (dotimes (_ 100000) | 326 | (dotimes (_ 100000) |