Ignore ert-deftest body value
* lisp/emacs-lisp/ert.el (ert-deftest): Since the return value of the body isn't going to be used, ignore it explicitly so that the compiler can warn if we try to return something anyway. In particular, this exposes some comparisons whose result weren't actually checked.
This commit is contained in:
parent
31ee2ad5ac
commit
33bcd4f2d2
1 changed files with 3 additions and 1 deletions
|
@ -237,7 +237,9 @@ in batch mode, an error is signaled.
|
|||
`(:expected-result-type ,expected-result))
|
||||
,@(when tags-supplied-p
|
||||
`(:tags ,tags))
|
||||
:body (lambda () ,@body)
|
||||
;; Add `nil' after the body to enable compiler warnings
|
||||
;; about unused computations at the end.
|
||||
:body (lambda () ,@body nil)
|
||||
:file-name ,(or (macroexp-file-name) buffer-file-name)))
|
||||
',name))))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue