Merge pull request #5907 from adamjrichter:dev-v2
PiperOrigin-RevId: 249044271
This commit is contained in:
commit
e39996e95f
@ -123,7 +123,8 @@ public final class ShuffleOrderTest {
|
|||||||
assertThat(shuffleOrder.getLastIndex()).isEqualTo(indices[length - 1]);
|
assertThat(shuffleOrder.getLastIndex()).isEqualTo(indices[length - 1]);
|
||||||
assertThat(shuffleOrder.getNextIndex(indices[length - 1])).isEqualTo(INDEX_UNSET);
|
assertThat(shuffleOrder.getNextIndex(indices[length - 1])).isEqualTo(INDEX_UNSET);
|
||||||
for (int i = 0; i < length; i++) {
|
for (int i = 0; i < length; i++) {
|
||||||
assertThat(indices[i] >= 0 && indices[i] < length).isTrue();
|
assertThat(indices[i] >= 0).isTrue();
|
||||||
|
assertThat(indices[i] < length).isTrue();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,8 @@ public final class DataSourceInputStreamTest {
|
|||||||
// Read bytes.
|
// Read bytes.
|
||||||
for (int i = 0; i < TEST_DATA.length; i++) {
|
for (int i = 0; i < TEST_DATA.length; i++) {
|
||||||
int readByte = inputStream.read();
|
int readByte = inputStream.read();
|
||||||
assertThat(0 <= readByte && readByte < 256).isTrue();
|
assertThat(0 <= readByte).isTrue();
|
||||||
|
assertThat(readByte < 256).isTrue();
|
||||||
assertThat(readByte).isEqualTo(TEST_DATA[i] & 0xFF);
|
assertThat(readByte).isEqualTo(TEST_DATA[i] & 0xFF);
|
||||||
assertThat(inputStream.bytesRead()).isEqualTo(i + 1);
|
assertThat(inputStream.bytesRead()).isEqualTo(i + 1);
|
||||||
}
|
}
|
||||||
|
@ -86,7 +86,8 @@ public final class FakeExtractorInput implements ExtractorInput {
|
|||||||
* @param position The position to set.
|
* @param position The position to set.
|
||||||
*/
|
*/
|
||||||
public void setPosition(int position) {
|
public void setPosition(int position) {
|
||||||
assertThat(0 <= position && position <= data.length).isTrue();
|
assertThat(0 <= position).isTrue();
|
||||||
|
assertThat(position <= data.length).isTrue();
|
||||||
readPosition = position;
|
readPosition = position;
|
||||||
peekPosition = position;
|
peekPosition = position;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user