Test file deck iteration over empty blocks - #5334
Conversation
|
PR #5341, which was recently merged into the master branch, addressed a similar problem. Would you mind checking if this problem still persist in the latest development sources? |
7dc6be8 to
a8f5cdb
Compare
@bska Yes, PR #5341 fixed the same issue. I have updated my PR so that only the unit test remains. The unit test explicitly tests backward iteration which was not tested well in the other PR. |
|
jenkins build this please |
|
Looks like we may have a stale commit graph on GitHub which causes (erroneous) regression test failures. I'll temporarily close this PR now and reopen it in a few minutes to see if that's sufficient to get GitHub to agree on what the commit graph is... |
|
jenkins build this please |
|
jenkins build this please |
|
jenkins build this update_data please |
|
jenkins build this opm-tests=1596 please |
Reason: PR OPM/opm-common#5334 opm-common = a732b077f3960c6101c23e5927b86ff94f42c9b2 opm-grid = 798166c5de06f16cc4d9d0acd19d15cc681f6ffd opm-simulators = 99920922be1d7ae5b90fa6a36cb3033d20899856 ### Changed Tests ### * fpr_nonhc * micp * gasoil_precsalt * sshift_compositional
Automatic Reference Data Update for PR OPM/opm-common#5334
bska
left a comment
There was a problem hiding this comment.
Thanks a lot for the updates. This looks good to me now and I'll merge into master.
Apologies for the many confusing build triggers. That turned out to be an unrelated issue.
FileDeck::Index steps through the keywords of one input file at a time, and erasing every keyword of an included file leaves a block with no keywords behind. operator++ then stopped on that block and compared the keyword index to blocks[file_index].size() - 1, which wraps around for an empty block, so the iteration never left the block. operator-- placed the index on the same wrapped keyword index, and dereferencing it threw.
Move past empty blocks in both operators. Reverse iteration reports the same error as an index at the start of the deck if only empty blocks remain.