Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
e39996e9
authored
May 20, 2019
by
Oliver Woodman
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge pull request #5907 from adamjrichter:dev-v2
PiperOrigin-RevId: 249044271
parents
bfeec25b
7f79db07
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
3 deletions
library/core/src/test/java/com/google/android/exoplayer2/source/ShuffleOrderTest.java
library/core/src/test/java/com/google/android/exoplayer2/upstream/DataSourceInputStreamTest.java
testutils/src/main/java/com/google/android/exoplayer2/testutil/FakeExtractorInput.java
library/core/src/test/java/com/google/android/exoplayer2/source/ShuffleOrderTest.java
View file @
e39996e9
...
@@ -123,7 +123,8 @@ public final class ShuffleOrderTest {
...
@@ -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
();
}
}
}
}
}
}
...
...
library/core/src/test/java/com/google/android/exoplayer2/upstream/DataSourceInputStreamTest.java
View file @
e39996e9
...
@@ -40,7 +40,8 @@ public final class DataSourceInputStreamTest {
...
@@ -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
);
}
}
...
...
testutils/src/main/java/com/google/android/exoplayer2/testutil/FakeExtractorInput.java
View file @
e39996e9
...
@@ -86,7 +86,8 @@ public final class FakeExtractorInput implements ExtractorInput {
...
@@ -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
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment