Skip to content

Commit

Permalink
Fixing partitioned_vector serialization test
Browse files Browse the repository at this point in the history
  • Loading branch information
hkaiser committed Aug 5, 2017
1 parent af06b6d commit 3230612
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/unit/serialization/serialization_partitioned_vector.cpp
Expand Up @@ -36,8 +36,9 @@ void test(T minval, T maxval)
std::size_t sz = static_cast<std::size_t>(maxval-minval);

hpx::partitioned_vector<T> os(sz);
os.register_as("test_vector");
hpx::parallel::fill(
hpx::parallel::execution::par, std::begin(os), std::end(os), 0);
hpx::parallel::execution::par, std::begin(os), std::end(os), 42);

oarchive << os;

Expand All @@ -48,8 +49,9 @@ void test(T minval, T maxval)
hpx::parallel::execution::par, std::begin(is), std::end(is), 0);

iarchive >> is;

HPX_TEST_EQ(os.size(), is.size());
for (std::size_t i = 0; i < os.size(); ++i)
for (std::size_t i = 0; i != os.size(); ++i)
{
HPX_TEST_EQ(os[i], is[i]);
}
Expand Down

0 comments on commit 3230612

Please sign in to comment.