[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Adding tests for some function in svn_checksum.h in SWIG bindings for python

From: Shivani Poddar <shivani.poddar92_at_gmail.com>
Date: Tue, 19 Mar 2013 18:09:03 +0530

On Tue, Mar 19, 2013 at 5:58 PM, Philip Martin
<philip.martin_at_wandisco.com>wrote:

> Shivani Poddar <shivani.poddar92_at_gmail.com> writes:
>
> > Index: subversion/bindings/swig/python/tests/checksum.py
> > ===================================================================
> > --- subversion/bindings/swig/python/tests/checksum.py (revision 1448005)
> > +++ subversion/bindings/swig/python/tests/checksum.py (working copy)
> > @@ -28,14 +28,50 @@
> > kind, expected_length = svn.core.svn_checksum_md5, 128/8
> > val = svn.core.svn_checksum_create(kind)
> > check_val = svn.core.svn_checksum_to_cstring_display(val)
> > -
> > + rand_checksum = svn.core.svn_checksum_t()
> > + rand_checksum.digest = 'd41d8cd98f00b204e9800998ecf8427e'
> > + rand_checksum2 = svn.core.svn_checksum_t()
> > + rand_checksum2.digest = '568554e2bf0fc50aa347777731081a80'
>
> That looks odd. svn_checksum_t.digest is binary and you are setting it
> to the string representation of the binary not the binary data itself.
> What are you trying to do?
>
>

I basically tried to assign some random md5 checksum values to
rand_checksum.digest and similarly for rand_checksum2.digest. This was to
facilitate the tests which follow wherein I am trying to check for all the
cases of equal and unequal (zero and non zero) checksums with
svn_checksum_match() function.

> --
> Certified & Supported Apache Subversion Downloads:
> http://www.wandisco.com/subversion/download
>

-- 
Shivani Poddar,
Received on 2013-03-19 13:39:35 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.