Skip to content

Commit aa41156

Browse files
authored
Merge pull request #297 from esabol/issue-279-fix-32bit-vector-test
Issue #279: Fix t/vector test on 32-bit systems
2 parents bad144a + 4721515 commit aa41156

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/vector.cc

+3-3
Original file line numberDiff line numberDiff line change
@@ -201,13 +201,13 @@ static test_return_t bigger_resize_TEST(void*)
201201

202202
#pragma GCC diagnostic push
203203
#pragma GCC diagnostic ignored "-Woverflow"
204-
static test_return_t INT64_MAX_resize_TEST(void*)
204+
static test_return_t MAX_resize_TEST(void*)
205205
{
206206
const size_t max_block= 10 * GEARMAN_VECTOR_BLOCK_SIZE;
207207
for (size_t x= 0; x < 20; x++)
208208
{
209209
gearman_vector_st vec(random() % max_block);
210-
ASSERT_FALSE(vec.resize(INT64_MAX));
210+
ASSERT_FALSE(vec.resize(std::numeric_limits<size_t>::max() -1));
211211
}
212212

213213
return TEST_SUCCESS;
@@ -542,7 +542,7 @@ test_st resize_TESTS[] ={
542542
{ "smaller", 0, smaller_resize_TEST },
543543
{ "bigger", 0, bigger_resize_TEST },
544544
{ "random", 0, random_resize_TEST },
545-
{ "INT64_MAX", 0, INT64_MAX_resize_TEST },
545+
{ "INT64_MAX", 0, MAX_resize_TEST },
546546
{ 0, 0, 0 }
547547
};
548548

0 commit comments

Comments
 (0)