[BAEL-3348] Added test to prove algorithm behaviour on array suggested in article comment

This commit is contained in:
dupirefr 2019-11-30 12:14:32 +01:00
parent 20566a4bca
commit bdfe144e00
1 changed files with 9 additions and 0 deletions

View File

@ -85,4 +85,13 @@ class SmallestMissingPositiveIntegerUnitTest {
assertThat(result).isEqualTo(input.length);
}
@Test
void givenArrayFromArticleComment_whenSearchInUnsortedArrayBooleanArray_thenZero() {
int[] input = new int[] {11, 13, 14, 15};
int result = SmallestMissingPositiveInteger.searchInUnsortedArrayBooleanArray(input);
assertThat(result).isEqualTo(0);
}
}