It seems that at some point in time, assigning a string iterator a value past-the-end of the string became quite illegal, at least in MSVC's STL. As such, the Boyer-Moore search would throw, including in one of the existing tests (the one expecting the needle to not be found).
As such, I've added extra checks to ensure no iterator is ever set past last in there.
I've also added a few extra tests to check for such edge cases that would set any iterator past-the-end as well.
It seems that at some point in time, assigning a string iterator a value past-the-end of the string became quite illegal, at least in MSVC's STL. As such, the Boyer-Moore search would throw, including in one of the existing tests (the one expecting the needle to not be found). As such, I've added extra checks to ensure no iterator is ever set past last in there. I've also added a few extra tests to check for such edge cases that would set any iterator past-the-end as well.