On Tue, Apr 10, 2012 at 8:12 PM, Jim Mankovich <jm...@hp.com> wrote:

> Duncan,
>
> I can't commit to being able to submit changes for you, but I'll help out
> if I can.
>
> Do you have any thoughts on  specific functions you think there would be
> value in testing?
>
> -- Jim Mankovich | jm...@hp.com --
>
>
Jim,

as for commits, I understand.

As for specific function; every function should have, ideally, its own
mini-unit-test which makes sure this function works, at least a bit, as
expected. This is of course to programmer(s) advantage, although it brings
some maintenance cost as well.
Anyway, if I understand it correctly functions from './lib/helper.c' are
used pretty much all over the ipmitool, so it would make sense to start
there(?).

Thanks,

Duncan



>
>
> On 4/9/2012 8:59 AM, Duncan Idaho wrote:
>
>> Hello all,
>>
>> I would like to write couple of unit tests, because I think ipmitool
>> would really made use of some. However in one talk I've heard urge not to
>> write own unit-test framework, or something like that, I think. Hence I'm
>> wondering whether it is going to be enough if these unit tests are going to
>> be simple C-code "snippets" or whether some unit test framework should be
>> utilized? In case of latter I'm afraid of problems with license and what
>> not, so I would vote for simple C-code snippets.
>>
>> ~~~ SNIP
>> #<...includes...>
>>
>> int
>> main()
>> {
>>  // declarations
>>  if ( (rc = some_function()) ) {
>>    printf("FAIL: some_function: Got %s, expected %s", rc, expected);
>>  } else {
>>    printf("PASS: some_function: Got %s, expected %s", rc, expected);
>>  }
>>  /* and so on so forth */
>> }
>> ~~~ SNIP
>>
>> or something like that is what I have in mind.And place these under
>> './src/tests' or just './tests'.
>>
>> Even though I'm sure it is a crappy solution, I think it is better than
>> none. I'm also open to any other ideas.
>>
>> Jim, can I rely on you these will get committed into CVS?
>>
>> Thanks,
>> Duncan
>>
>
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Ipmitool-devel mailing list
Ipmitool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipmitool-devel

Reply via email to