unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How to assert "throw" by ERT?
@ 2013-01-17 21:03 Oleksandr Gavenko
  2013-01-18  3:15 ` Dmitry Gutov
  0 siblings, 1 reply; 2+ messages in thread
From: Oleksandr Gavenko @ 2013-01-17 21:03 UTC (permalink / raw)
  To: help-gnu-emacs

ERT is Emacs Lisp Regression Testing and ERT packed in GNU Emacs.

I want to check that my function throw on some input data:

  (defun foo (arg) (unless arg (throw :invalid-arg nil)))

I write:

  (ert-deftest foo-fail-test ()
    (should-error (foo nil) :type :invalid-arg)
    )

but seems this is wrong usege or 'should-error'.

Please help me with example...

-- 
Best regards!




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-18  3:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-17 21:03 How to assert "throw" by ERT? Oleksandr Gavenko
2013-01-18  3:15 ` Dmitry Gutov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).