From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Testing library for C code Date: Thu, 08 Oct 2015 17:44:15 +0300 Message-ID: <83ziztctds.fsf@gnu.org> References: <60744168ef0e5c54fe322cc55ad89f6f@mail.iq.pl> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: ger.gmane.org 1444315518 12679 80.91.229.3 (8 Oct 2015 14:45:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 8 Oct 2015 14:45:18 +0000 (UTC) Cc: emacs-devel@gnu.org To: =?utf-8?Q?Przemys=C5=82aw?= Wojnowski Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 08 16:45:07 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from eggs.gnu.org ([208.118.235.92]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZkCRO-00005P-7l for ged-emacs-devel@m.gmane.org; Thu, 08 Oct 2015 16:45:06 +0200 Original-Received: from lists.gnu.org ([208.118.235.17]:45995) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkCRN-00046n-NA for ged-emacs-devel@m.gmane.org; Thu, 08 Oct 2015 10:45:05 -0400 Original-Received: from localhost ([::1]:35309 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkCRN-00065K-Ja for ged-emacs-devel@m.gmane.org; Thu, 08 Oct 2015 10:45:05 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40413) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkCQd-0005y3-2Z for emacs-devel@gnu.org; Thu, 08 Oct 2015 10:44:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZkCQZ-0003ne-Le for emacs-devel@gnu.org; Thu, 08 Oct 2015 10:44:18 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:55700) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkCQZ-0003nN-ER for emacs-devel@gnu.org; Thu, 08 Oct 2015 10:44:15 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0NVW00900OXJM600@a-mtaout21.012.net.il> for emacs-devel@gnu.org; Thu, 08 Oct 2015 17:44:13 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NVW0098IOXPHIB0@a-mtaout21.012.net.il>; Thu, 08 Oct 2015 17:44:13 +0300 (IDT) In-reply-to: <60744168ef0e5c54fe322cc55ad89f6f@mail.iq.pl> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.169 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 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x Xref: news.gmane.org gmane.emacs.devel:191066 Archived-At: > Date: Thu, 08 Oct 2015 13:36:30 +0200 > From: Przemys=C5=82aw Wojnowski >=20 > I'm looking at libraries for testing C code and I'm wondering > if it's acceptable to use C++ to write the tests for Emacs' C code? >=20 > Simply there are more choices when C++ can be used (for example= =20 > googletest, cppunit). > But if not, then there are C-only options too (for example=20 > https://cmocka.org/). In the Free Software world, the person who does the job gets to choos= e the tools. Emacs is no different. So yes, C++ would be acceptable, IMO, as would any other tool that is wide spread enough, if they are a good tool for the job. The only requirements I'd think we should insist on is (a) if a C++ compiler i= s not available, the tests should be skipped without producing errors, and (b) the tools should be free and portable. Please note, however, that any dependency on external libraries is in general a nuisance, however small: people need to install it. So I would suggest to show a few examples of tests for Emacs code using whatever method you'd like to use, so we could see whether these libraries indeed get us some significant advantages that justify thei= r use. Making a scratch/something branch would be a good start. Thanks. (Btw, cppunit hints that you are looking for unit-testing frameworks, which I'm not sure is what we want.)