mirror of
https://github.com/samsonjs/media.git
synced 2026-03-28 09:55:48 +00:00
Split a few assertThat(a && b).isTrue() calls into separate assertions for more precise diagnostics.
This commit is contained in:
parent
59b2dd2701
commit
7f79db0724
3 changed files with 6 additions and 3 deletions
|
|
@ -123,7 +123,8 @@ public final class ShuffleOrderTest {
|
|||
assertThat(shuffleOrder.getLastIndex()).isEqualTo(indices[length - 1]);
|
||||
assertThat(shuffleOrder.getNextIndex(indices[length - 1])).isEqualTo(INDEX_UNSET);
|
||||
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.
|
||||
for (int i = 0; i < TEST_DATA.length; i++) {
|
||||
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(inputStream.bytesRead()).isEqualTo(i + 1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,7 +86,8 @@ public final class FakeExtractorInput implements ExtractorInput {
|
|||
* @param position The position to set.
|
||||
*/
|
||||
public void setPosition(int position) {
|
||||
assertThat(0 <= position && position <= data.length).isTrue();
|
||||
assertThat(0 <= position).isTrue();
|
||||
assertThat(position <= data.length).isTrue();
|
||||
readPosition = position;
|
||||
peekPosition = position;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue