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
93e203f9
authored
Mar 12, 2020
by
ibaker
Committed by
Oliver Woodman
Mar 19, 2020
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Tweak the assertions in MediaSourceTestRunner to give clearer failures
PiperOrigin-RevId: 300519989
parent
16e6ea6e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
testutils/src/main/java/com/google/android/exoplayer2/testutil/MediaSourceTestRunner.java
testutils/src/main/java/com/google/android/exoplayer2/testutil/MediaSourceTestRunner.java
View file @
93e203f9
...
...
@@ -215,7 +215,7 @@ public class MediaSourceTestRunner {
* runner was created if neither method has been called).
*/
public
void
assertNoTimelineChange
()
{
assertThat
(
timelines
.
isEmpty
()).
isTrue
();
assertThat
(
timelines
).
isEmpty
();
}
/**
...
...
@@ -304,8 +304,10 @@ public class MediaSourceTestRunner {
List
<
Integer
>
expectedWindowIndices
=
new
ArrayList
<>(
Arrays
.
asList
(
windowIndices
));
for
(
Pair
<
Integer
,
MediaPeriodId
>
windowIndexAndMediaPeriodId
:
completedLoads
)
{
if
(
windowIndexAndMediaPeriodId
.
second
==
null
)
{
boolean
loadExpected
=
expectedWindowIndices
.
remove
(
windowIndexAndMediaPeriodId
.
first
);
assertThat
(
loadExpected
).
isTrue
();
assertWithMessage
(
"Missing expected load"
)
.
that
(
expectedWindowIndices
)
.
contains
(
windowIndexAndMediaPeriodId
.
first
);
expectedWindowIndices
.
remove
(
windowIndexAndMediaPeriodId
.
first
);
}
}
assertWithMessage
(
"Not all expected media source loads have been completed."
)
...
...
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