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

Re: svn commit: r1028104 - /subversion/branches/performance/subversion/tests/libsvn_subr/string -test.c

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Thu, 28 Oct 2010 16:24:01 +0200

+1

stefan2_at_apache.org wrote on Wed, Oct 27, 2010 at 21:23:35 -0000:
> Author: stefan2
> Date: Wed Oct 27 21:23:34 2010
> New Revision: 1028104
>
> URL: http://svn.apache.org/viewvc?rev=1028104&view=rev
> Log:
> Adapt string unit test to recent behavioral changes.
>
> * subversion/tests/libsvn_subr/string-test.c
> (test10): relax tests on string capacity
>
> Modified:
> subversion/branches/performance/subversion/tests/libsvn_subr/string-test.c
>
> Modified: subversion/branches/performance/subversion/tests/libsvn_subr/string-test.c
> URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/tests/libsvn_subr/string-test.c?rev=1028104&r1=1028103&r2=1028104&view=diff
> ==============================================================================
> --- subversion/branches/performance/subversion/tests/libsvn_subr/string-test.c (original)
> +++ subversion/branches/performance/subversion/tests/libsvn_subr/string-test.c Wed Oct 27 21:23:34 2010
> @@ -231,13 +231,15 @@ test10(apr_pool_t *pool)
> block_len_2 = (s->blocksize);
>
> /* Test that:
> - * - The initial block was just the right fit.
> + * - The initial block was at least the right fit.
> + * - The initial block was not excessively large.
> * - The block more than doubled (because second string so long).
> * - The block grew by a power of 2.
> */
> - if ((len_1 == (block_len_1 - 1))
> - && ((block_len_2 / block_len_1) > 2)
> - && (((block_len_2 / block_len_1) % 2) == 0))
> + if ((len_1 <= (block_len_1 - 1))
> + && ((block_len_1 - len_1) <= APR_ALIGN_DEFAULT(1))
> + && ((block_len_2 / block_len_1) > 2)
> + && (((block_len_2 / block_len_1) % 2) == 0))
> return SVN_NO_ERROR;
> else
> return fail(pool, "test failed");
>
>
Received on 2010-10-28 16:25:35 CEST

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.