]> git.eshelyaron.com Git - emacs.git/commit
Properly report errors about unbound ERT test symbols.
authorPhilipp Stephani <phst@google.com>
Thu, 30 Dec 2021 15:59:16 +0000 (16:59 +0100)
committerPhilipp Stephani <phst@google.com>
Thu, 30 Dec 2021 16:06:09 +0000 (17:06 +0100)
commitf6da1eed7447c363ef927fea9b23a7b35587473c
treec4dae7cf0d7d3da8100bb7df26c5ea319bb55753
parent94891dd225c7e74b89588814b6f8b11cec633659
Properly report errors about unbound ERT test symbols.

Assertions should only be used to check internal consistency within a
package, not to check arguments passed by callers.  Instead, define
and use a new error symbol.

* lisp/emacs-lisp/ert.el (ert-test-unbound): New error symbol.
(ert-select-tests): Use it.

* test/lisp/emacs-lisp/ert-tests.el (ert-test-select-undefined): New
unit test.

* etc/NEWS: Document new behavior.
etc/NEWS
lisp/emacs-lisp/ert.el
test/lisp/emacs-lisp/ert-tests.el