From: David Engster <deng@randomsample.de>
To: emacs-devel@gnu.org
Subject: Testing errors from macros with ERT and byte-compilation
Date: Sun, 18 Aug 2013 12:56:51 +0200 [thread overview]
Message-ID: <87zjsfnu6k.fsf@engster.org> (raw)
I have a bit of a hard time porting the EIEIO test suite to use ERT. My
problem is with testing failures from macros and their byte
compilation. An example:
(require 'eieio)
(require 'ert)
(ert-deftest eieio-broken-initform ()
(should-error
(defclass broken-init nil
((broken :initform 1
:type string))
"This class should break.")
:type 'invalid-slot-type))
While this works fine when eval'ed, I cannot byte-compile this because
the macro expansion fails, obviously:
Compiling file /home/void/foo.el at Sun Aug 18 12:48:13 2013
foo.el:4:1:Error: Invalid slot type: broken, string, 1
Is there some trick I could use? Simply wrapping the defclass in 'progn'
does not work.
Or should I just use 'no-byte-compile: t' for the test suite?
-David
next reply other threads:[~2013-08-18 10:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-18 10:56 David Engster [this message]
2013-08-18 18:55 ` Testing errors from macros with ERT and byte-compilation Glenn Morris
2013-08-18 19:13 ` David Engster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zjsfnu6k.fsf@engster.org \
--to=deng@randomsample.de \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).