emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Testing library for C code


From: Eli Zaretskii
Subject: Re: Testing library for C code
Date: Thu, 08 Oct 2015 17:44:15 +0300

> Date: Thu, 08 Oct 2015 13:36:30 +0200
> From: Przemysław Wojnowski <address@hidden>
> 
> 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?
> 
> Simply there are more choices when C++ can be used (for example 
> googletest, cppunit).
> But if not, then there are C-only options too (for example 
> https://cmocka.org/).

In the Free Software world, the person who does the job gets to choose
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 is
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 their
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.)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]