Skip to content

Commit 4d2f0c9

Browse files
Hit missing part in the coverage related to empty grid
1 parent 233b9a4 commit 4d2f0c9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

examples/cpp/advanced-filling.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,13 @@ int main() {
158158
}
159159
//-----------------------------------------------------------------------//
160160

161+
// Check that the Grid contains an empty subgrid at (b, o, c)=(0, 0, 0)
162+
auto subgrid_dim = pineappl_grid_kinematics_len(grid);
163+
std::vector<std::size_t> subgrid_shape(subgrid_dim);
164+
std::vector<std::size_t> zero_vector(subgrid_dim, 0);
165+
pineappl_grid_subgrid_shape(grid, 0, 0, 0, subgrid_shape.data());
166+
assert(subgrid_shape == zero_vector);
167+
161168
pineappl_grid_write(grid, "advanced-filling.pineappl.lz4");
162169

163170
// release memory

0 commit comments

Comments
 (0)