Skip to content

Commit

Permalink
Merge pull request #297 from esabol/issue-279-fix-32bit-vector-test
Browse files Browse the repository at this point in the history
Issue #279: Fix t/vector test on 32-bit systems
  • Loading branch information
SpamapS authored Aug 27, 2020
2 parents bad144a + 4721515 commit aa41156
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/vector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,13 @@ static test_return_t bigger_resize_TEST(void*)

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

return TEST_SUCCESS;
Expand Down Expand Up @@ -542,7 +542,7 @@ test_st resize_TESTS[] ={
{ "smaller", 0, smaller_resize_TEST },
{ "bigger", 0, bigger_resize_TEST },
{ "random", 0, random_resize_TEST },
{ "INT64_MAX", 0, INT64_MAX_resize_TEST },
{ "INT64_MAX", 0, MAX_resize_TEST },
{ 0, 0, 0 }
};

Expand Down

0 comments on commit aa41156

Please sign in to comment.