diff options
| author | Daniel Colascione | 2015-03-03 13:18:00 -0800 |
|---|---|---|
| committer | Daniel Colascione | 2015-03-03 13:19:25 -0800 |
| commit | 8b38d30e1b02809c34cfba9c7f15ca46f9d45f80 (patch) | |
| tree | a5a5a73f2af6ca28da220e31965e20b9f128ab82 /test | |
| parent | 7133f262bbd818509825a3317c91e91e62bd56fb (diff) | |
| download | emacs-8b38d30e1b02809c34cfba9c7f15ca46f9d45f80.tar.gz emacs-8b38d30e1b02809c34cfba9c7f15ca46f9d45f80.zip | |
Use `macroexp-parse-body'
* lisp/emacs-lisp/generator.el: (iter-defun): Use `macroexp-parse-body'.
* test/automated/generator-tests.el (cps-testcase): Use
(cps-test-declarations-preserved): New test.
Diffstat (limited to 'test')
| -rw-r--r-- | test/ChangeLog | 1 | ||||
| -rw-r--r-- | test/automated/generator-tests.el | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index 55f8c6c8eb8..4488aab701f 100644 --- a/test/ChangeLog +++ b/test/ChangeLog | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | * automated/generator-tests.el (cps-testcase): Use | 3 | * automated/generator-tests.el (cps-testcase): Use |
| 4 | `cps-inhibit-atomic-optimization' instead of | 4 | `cps-inhibit-atomic-optimization' instead of |
| 5 | `cps-disable-atomic-optimization'. | 5 | `cps-disable-atomic-optimization'. |
| 6 | (cps-test-declarations-preserved): New test. | ||
| 6 | 7 | ||
| 7 | * automated/finalizer-tests.el (finalizer-basic) | 8 | * automated/finalizer-tests.el (finalizer-basic) |
| 8 | (finalizer-circular-reference, finalizer-cross-reference) | 9 | (finalizer-circular-reference, finalizer-cross-reference) |
diff --git a/test/automated/generator-tests.el b/test/automated/generator-tests.el index 3ee65105597..d9c81b59a23 100644 --- a/test/automated/generator-tests.el +++ b/test/automated/generator-tests.el | |||
| @@ -287,3 +287,12 @@ identical output. | |||
| 287 | (should (equal (iter-next iter) 1)) | 287 | (should (equal (iter-next iter) 1)) |
| 288 | (should-error (iter-next iter)) | 288 | (should-error (iter-next iter)) |
| 289 | (should (equal nr-unwound 1)))) | 289 | (should (equal nr-unwound 1)))) |
| 290 | |||
| 291 | (iter-defun generator-with-docstring () | ||
| 292 | "Documentation!" | ||
| 293 | (declare (indent 5)) | ||
| 294 | nil) | ||
| 295 | |||
| 296 | (ert-deftest cps-test-declarations-preserved () | ||
| 297 | (should (equal (documentation 'generator-with-docstring) "Documentation!")) | ||
| 298 | (should (equal (get 'generator-with-docstring 'lisp-indent-function) 5))) | ||