Skip to content

Commit

Permalink
addressing review comments from PR #352
Browse files Browse the repository at this point in the history
  • Loading branch information
GitPaean committed Dec 19, 2018
1 parent 798636f commit d6c5290
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/test_compressed_cartesian_mapping.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,13 @@ BOOST_AUTO_TEST_CASE(mapping)
BOOST_CHECK_EQUAL(cartesian_to_compressed.at(8), 6);
BOOST_CHECK_EQUAL(cartesian_to_compressed.at(9), 7);

const int non_existing_index = 1829;
BOOST_CHECK_THROW(cartesian_to_compressed.at(non_existing_index), std::out_of_range);

const std::vector<int> compressed_to_cartesian = Opm::compressedToCartesian(num_cells, global_cell.data());

for (int i = 0; i < num_cells; ++i) {
BOOST_CHECK_EQUAL(compressed_to_cartesian[i], global_cell[i]);
}
BOOST_CHECK_EQUAL_COLLECTIONS(compressed_to_cartesian.begin(), compressed_to_cartesian.end(),
global_cell.begin(), global_cell.end());
}

BOOST_AUTO_TEST_CASE(nullmapping)
Expand Down

0 comments on commit d6c5290

Please sign in to comment.