Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content
Snippets Groups Projects
Commit bcc468dc authored by ext-rogers_c's avatar ext-rogers_c
Browse files

Add out of bounds test to NDGrid

parent b3b9d76b
No related branches found
No related tags found
No related merge requests found
...@@ -339,9 +339,26 @@ TEST_F(NDGridTest, DualTest) { ...@@ -339,9 +339,26 @@ TEST_F(NDGridTest, DualTest) {
} }
} }
TEST_F(NDGridTest, IsOutOfBoundsTest) { TEST_F(NDGridTest, IsOutOfBoundsBeginTest) {
// nb isOutOfBounds is defined in Mesh.hh (but tested here for convenience // nb isOutOfBounds is defined in Mesh.hh (but tested here for convenience
EXPECT_TRUE(false) << "Do the test" << std::endl; interpolation::Mesh::Iterator it = grid_m->begin();
EXPECT_FALSE(it.isOutOfBounds());
for (size_t i = 0; i < it.getState().size(); ++i) {
it[i] -= 1;
EXPECT_TRUE(it.isOutOfBounds());
it[i] += 1;
}
}
TEST_F(NDGridTest, IsOutOfBoundsEndTest) {
interpolation::Mesh::Iterator it = grid_m->end();
it--;
EXPECT_FALSE(it.isOutOfBounds());
for (size_t i = 0; i < it.getState().size(); ++i) {
it[i] += 1;
EXPECT_TRUE(it.isOutOfBounds());
it[i] -= 1;
}
} }
} // namespace ndgridtest } // namespace ndgridtest
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment