Function: should

should is a macro defined in ert.el.gz.

Signature

(should FORM)

Documentation

Evaluate FORM. If it returns nil, abort the current test as failed.

Returns the value of FORM.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/ert.el.gz
(cl-defmacro should (form)
  "Evaluate FORM.  If it returns nil, abort the current test as failed.

Returns the value of FORM."
  (declare (debug t))
  (ert--expand-should `(should ,form) form
                      (lambda (inner-form form-description-form _value-var)
                        `(unless ,inner-form
                           (ert-fail ,form-description-form)))))