You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Philip Martin <ph...@codematters.co.uk> on 2006/09/23 17:25:15 UTC

Re: svn commit: r21621 - in trunk/subversion: libsvn_subr tests/cmdline tests/cmdline/svntest tests/libsvn_subr

lgo@tigris.org writes:

> Author: lgo
> Date: Sat Sep 23 08:44:04 2006
> New Revision: 21621

> @@ -810,6 +896,8 @@
>  #if defined(WIN32)
>      "X:/foo",
>      "X:/",
> +    "X:foo",
> +    "X:",
>  #endif /* WIN32 */
>      "",
>    };

The number of tests...

> @@ -819,10 +907,11 @@
>      FALSE,
>      FALSE,
>      TRUE,
> -    FALSE,
>  #if defined(WIN32)
> +    FALSE,
>      TRUE,
>      FALSE,
> +    TRUE
>  #endif /* WIN32 */
>    };

...does not match the number of results.

I suggest you look at test_canonicalize to see how to combine these
two arrays into one as that makes it easy to see that the tests and
the results match.

-- 
Philip Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r21621 - in trunk/subversion: libsvn_subr tests/cmdline tests/cmdline/svntest tests/libsvn_subr

Posted by David Glasser <gl...@mit.edu>.
On 9/23/06, Lieven Govaerts <lg...@mobsol.be> wrote:
> Yep, you're right. Fixed that in r21622. Strangely enough it didn't fail
> neither on Windows or Linux, only the Mac buildslave had problems with
> this test.

Well, we were accessing memory off the end of an array, that's going
to be pretty implementation-dependent!

--dave

-- 
David Glasser | glasser@mit.edu | http://www.davidglasser.net/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r21621 - in trunk/subversion: libsvn_subr tests/cmdline tests/cmdline/svntest tests/libsvn_subr

Posted by Lieven Govaerts <sv...@mobsol.be>.
Daniel Rall wrote:
> On Sun, 24 Sep 2006, Lieven Govaerts wrote:
>
>   
>> Philip Martin wrote:
>>     
>>> Lieven Govaerts <lg...@mobsol.be> writes:
>>>
>>>       
>>>> I welcome a proposal to better fix the relation between input and
>>>> output for these two test.
>>>>         
>>> struct { 
>>>   const char *path;
>>>   svn_boolean_t result;
>>>  } tests[] = {
>>>    { "some_string", TRUE },
>>>    { "another_string", FALSE }
>>>  };
>>>
>>>       
>> Clean and simple. I applied this to four of the path tests, committed in 
>> r21625.
>>     
>
> I like this approach.  It might be worth defining a data type and
> using it in the three (of four) places in that test code that we're
> now defining anonymous data types.
>   
Committed in r21631.

Lieven.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r21621 - in trunk/subversion: libsvn_subr tests/cmdline tests/cmdline/svntest tests/libsvn_subr

Posted by Daniel Rall <dl...@collab.net>.
On Sun, 24 Sep 2006, Lieven Govaerts wrote:

> Philip Martin wrote:
> >Lieven Govaerts <lg...@mobsol.be> writes:
> >
> >>I welcome a proposal to better fix the relation between input and
> >>output for these two test.
> >
> > struct { 
> >   const char *path;
> >   svn_boolean_t result;
> >  } tests[] = {
> >    { "some_string", TRUE },
> >    { "another_string", FALSE }
> >  };
> >
> 
> Clean and simple. I applied this to four of the path tests, committed in 
> r21625.

I like this approach.  It might be worth defining a data type and
using it in the three (of four) places in that test code that we're
now defining anonymous data types.

Re: svn commit: r21621 - in trunk/subversion: libsvn_subr tests/cmdline tests/cmdline/svntest tests/libsvn_subr

Posted by Lieven Govaerts <lg...@mobsol.be>.
Philip Martin wrote:
> Lieven Govaerts <lg...@mobsol.be> writes:
> 
>> I welcome a proposal to better fix the relation between input and
>> output for these two test.
> 
>  struct { 
>    const char *path;
>    svn_boolean_t result;
>   } tests[] = {
>     { "some_string", TRUE },
>     { "another_string", FALSE }
>   };
> 

Clean and simple. I applied this to four of the path tests, committed in 
r21625.

thanks.

Lieven.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r21621 - in trunk/subversion: libsvn_subr tests/cmdline tests/cmdline/svntest tests/libsvn_subr

Posted by Philip Martin <ph...@codematters.co.uk>.
Lieven Govaerts <lg...@mobsol.be> writes:

> I welcome a proposal to better fix the relation between input and
> output for these two test.

 struct { 
   const char *path;
   svn_boolean_t result;
  } tests[] = {
    { "some_string", TRUE },
    { "another_string", FALSE }
  };

-- 
Philip Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r21621 - in trunk/subversion: libsvn_subr tests/cmdline tests/cmdline/svntest tests/libsvn_subr

Posted by Lieven Govaerts <lg...@mobsol.be>.
Philip Martin wrote:
> lgo@tigris.org writes:
> 
>> Author: lgo
>> Date: Sat Sep 23 08:44:04 2006
>> New Revision: 21621
> 
>> @@ -810,6 +896,8 @@
>>  #if defined(WIN32)
>>      "X:/foo",
>>      "X:/",
>> +    "X:foo",
>> +    "X:",
>>  #endif /* WIN32 */
>>      "",
>>    };
> 
> The number of tests...
> 
>> @@ -819,10 +907,11 @@
>>      FALSE,
>>      FALSE,
>>      TRUE,
>> -    FALSE,
>>  #if defined(WIN32)
>> +    FALSE,
>>      TRUE,
>>      FALSE,
>> +    TRUE
>>  #endif /* WIN32 */
>>    };
> 
> ...does not match the number of results.

Yep, you're right. Fixed that in r21622. Strangely enough it didn't fail 
neither on Windows or Linux, only the Mac buildslave had problems with 
this test.

> I suggest you look at test_canonicalize to see how to combine these
> two arrays into one as that makes it easy to see that the tests and
> the results match.
> 

Well, test_canonicalize is not a good example, because there both the 
input and the expected output are paths, so both can be stored in the 
same two-dimensional area of (const char *).

The test_is_root test looks is similar to test_is_uri_safe, which is 
implemented the same way.

I welcome a proposal to better fix the relation between input and output 
  for these two test.

thanks for the review,

Lieven.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org