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");