diff options
| author | Andrea Corallo | 2020-11-11 16:17:03 +0100 |
|---|---|---|
| committer | Andrea Corallo | 2020-11-12 00:55:36 +0100 |
| commit | 175efec0732fc7317a444a2005f7b968a972b8e6 (patch) | |
| tree | 024b15cd36e48203c433dc38a31937b82193f4ba /test/src | |
| parent | e96cd4e82c9aca01f136ccdd7a3b0fbf2db01e50 (diff) | |
| download | emacs-175efec0732fc7317a444a2005f7b968a972b8e6.tar.gz emacs-175efec0732fc7317a444a2005f7b968a972b8e6.zip | |
Add a nativecomp testcase
Having this while re-debugging the boostrap would have saved few hours
of debug so let's add it.
* test/src/comp-tests.el (and-3): Add test.
* test/src/comp-test-funcs.el (comp-test-and-3-var): New var.
(comp-test-and-3-f): New function.
Diffstat (limited to 'test/src')
| -rw-r--r-- | test/src/comp-test-funcs.el | 6 | ||||
| -rw-r--r-- | test/src/comp-tests.el | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/test/src/comp-test-funcs.el b/test/src/comp-test-funcs.el index 35df46a9b84..1b0f3056b98 100644 --- a/test/src/comp-test-funcs.el +++ b/test/src/comp-test-funcs.el | |||
| @@ -348,6 +348,12 @@ | |||
| 348 | (defsubst comp-test-defsubst-f () | 348 | (defsubst comp-test-defsubst-f () |
| 349 | t) | 349 | t) |
| 350 | 350 | ||
| 351 | (defvar comp-test-and-3-var 1) | ||
| 352 | (defun comp-test-and-3-f (x) | ||
| 353 | (and (atom x) | ||
| 354 | comp-test-and-3-var | ||
| 355 | 2)) | ||
| 356 | |||
| 351 | 357 | ||
| 352 | ;;;;;;;;;;;;;;;;;;;; | 358 | ;;;;;;;;;;;;;;;;;;;; |
| 353 | ;; Tromey's tests ;; | 359 | ;; Tromey's tests ;; |
diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el index 48687d92021..8bedad5db73 100644 --- a/test/src/comp-tests.el +++ b/test/src/comp-tests.el | |||
| @@ -440,6 +440,10 @@ https://lists.gnu.org/archive/html/bug-gnu-emacs/2020-03/msg00914.html." | |||
| 440 | '(lambda () | 440 | '(lambda () |
| 441 | (delete-region (point-min) (point-max)))))))) | 441 | (delete-region (point-min) (point-max)))))))) |
| 442 | 442 | ||
| 443 | (comp-deftest and-3 () | ||
| 444 | (should (= (comp-test-and-3-f t) 2)) | ||
| 445 | (should (null (comp-test-and-3-f '(1 2))))) | ||
| 446 | |||
| 443 | 447 | ||
| 444 | ;;;;;;;;;;;;;;;;;;;;; | 448 | ;;;;;;;;;;;;;;;;;;;;; |
| 445 | ;; Tromey's tests. ;; | 449 | ;; Tromey's tests. ;; |