From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Engster Newsgroups: gmane.emacs.devel Subject: Testing errors from macros with ERT and byte-compilation Date: Sun, 18 Aug 2013 12:56:51 +0200 Message-ID: <87zjsfnu6k.fsf@engster.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1376823437 8919 80.91.229.3 (18 Aug 2013 10:57:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 18 Aug 2013 10:57:17 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Aug 18 12:57:20 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VB0fd-0006xj-O1 for ged-emacs-devel@m.gmane.org; Sun, 18 Aug 2013 12:57:17 +0200 Original-Received: from localhost ([::1]:38333 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VB0fd-0004Kp-9G for ged-emacs-devel@m.gmane.org; Sun, 18 Aug 2013 06:57:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52616) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VB0fV-0004K1-2p for emacs-devel@gnu.org; Sun, 18 Aug 2013 06:57:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VB0fM-0004o7-JG for emacs-devel@gnu.org; Sun, 18 Aug 2013 06:57:09 -0400 Original-Received: from randomsample.de ([83.169.19.17]:58596) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VB0fM-0004mo-6R for emacs-devel@gnu.org; Sun, 18 Aug 2013 06:57:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=randomsample.de; s=a; h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From; bh=1B7GBA+vju1gW1Epfy/FXP7eXegq/eGgu9GfWDLok/o=; b=eykA7FxaymMVTxd8hdiMp5XRd0iD7G8eR8fMEVkbwFTF1FqOAqZHXHGdkzHzQwLyu2vrroRhuI0pJ83mhNkjEV7NWyvVmXVj9BRlR9TEM3D/6zmW9M+fIDh6T7Lbr3nz; Original-Received: from dslc-082-083-048-158.pools.arcor-ip.net ([82.83.48.158] helo=spaten) by randomsample.de with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1VB0fE-0002yf-RB for emacs-devel@gnu.org; Sun, 18 Aug 2013 12:56:53 +0200 User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3 (gnu/linux) Mail-Followup-To: emacs-devel@gnu.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 83.169.19.17 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:162854 Archived-At: 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