We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello. The test does not fail with this corrupted code:
@Override public void add(T element) { Objects.requireNonNull(element); if (elements.length != size) { elements[size] = element; } else { Object[] copy = new Object[size * 2]; System.arraycopy(elements, 0, copy, 0, size); elements = copy; } size++; }
We should check at least 5 elements (if InitialCapaciti is 5):
void add() { arrayList.add(10); arrayList.add(15); arrayList.add(20); arrayList.add(21); arrayList.add(24); arrayList.add(845); Object[] internalArray = getTestArray(); assertThat(internalArray[0]).isEqualTo(10); assertThat(internalArray[1]).isEqualTo(15); assertThat(internalArray[2]).isEqualTo(20); assertThat(internalArray[3]).isEqualTo(21); assertThat(internalArray[4]).isEqualTo(24); assertThat(internalArray[5]).isEqualTo(845); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello. The test does not fail with this corrupted code:
The text was updated successfully, but these errors were encountered: