[libvirt] [PATCH v2 2/3] Add test case for virHashEqual function

Eric Blake eblake at redhat.com
Sat Jan 21 00:16:14 UTC 2012


On 01/18/2012 09:20 AM, Stefan Berger wrote:
> Add a test case to test the virHashEqual function.
> 
> ---
>  tests/hashtest.c |   78 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 78 insertions(+)

Even better - you test your new API.  I would have squashed this into
1/3, but separate patches is okay as well.

>  static int
> +testHashEqualCompValue(const void *value1, const void *value2)
> +{
> +    return strcmp (value1, value2);

Style: no space before (.

Suggestion - maybe use strcasecmp, and pass in strings that differ in
case to prove that definitions of 'equal' data values is user-defined.

ACK.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120120/9ac543cb/attachment-0001.sig>


More information about the libvir-list mailing list