|
Message-ID: <4E398092.8070907@gmail.com> Date: Wed, 03 Aug 2011 19:08:34 +0200 From: Luka Marčetić <paxcoder@...il.com> To: musl@...ts.openwall.com Subject: Re: cluts weekly reports On 08/03/2011 03:31 PM, Rich Felker wrote: > On Wed, Aug 03, 2011 at 03:15:15PM +0200, Luka Marčetić wrote: > Well the question is whether the intended usage, for someone adding > tests, is to add them by hand or by going back to the json "source" > file, adding them there, and rebuilding using the Python tool. In this > case cluts doesn't depend on Python to *run* the tests, but it does > depend on it to modify or update the tests. It doesn't, seeing as they can be written by hand. There's nothing stopping one from modifying C directly. The only problem here is the discrepancy between json and C, but that doesn't imply python dependency. In fact it is assumed that C code would need to be modified sometimes. In such cases, one can generate a single new test with the generator, and paste the code into the C source file. > I'm still confused why > this can't be done in plain C, with the test parameters in C > structures that you loop over, much like some of the existing tests > (e.g. numeric). It's just a lot of work. The biggest problem C has when applied in writing unit tests is its inability to use function pointers with arbitrary number of arguments, and the fact that there's no (dynamic?) type casting - eg there's no way to pass varying type arguments to say printf with a correct fmt; once a float, once an int. Those two make for a load of syntax that like anything but sugar. That's what I'm trying to generate, instead of having to type it all. Luka
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.