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
763ef2b9
authored
May 10, 2021
by
aquilescanta
Committed by
Oliver Woodman
May 10, 2021
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Avoid type-ambiguous overloads in ExoPlaybackExceptionTest
PiperOrigin-RevId: 372942778
parent
5167ca65
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
library/common/src/test/java/com/google/android/exoplayer2/ExoPlaybackExceptionTest.java
library/common/src/test/java/com/google/android/exoplayer2/ExoPlaybackExceptionTest.java
View file @
763ef2b9
...
...
@@ -31,7 +31,7 @@ public class ExoPlaybackExceptionTest {
public
void
roundTripViaBundle_ofExoPlaybackExceptionTypeRemote_yieldsEqualInstance
()
{
ExoPlaybackException
before
=
ExoPlaybackException
.
createForRemote
(
/* message= */
"test"
);
ExoPlaybackException
after
=
ExoPlaybackException
.
CREATOR
.
fromBundle
(
before
.
toBundle
());
assertThat
(
areEqual
(
before
,
after
)).
isTrue
();
assertThat
(
areE
xoPlaybackExceptionsE
qual
(
before
,
after
)).
isTrue
();
}
@Test
...
...
@@ -46,7 +46,7 @@ public class ExoPlaybackExceptionTest {
/* isRecoverable= */
true
);
ExoPlaybackException
after
=
ExoPlaybackException
.
CREATOR
.
fromBundle
(
before
.
toBundle
());
assertThat
(
areEqual
(
before
,
after
)).
isTrue
();
assertThat
(
areE
xoPlaybackExceptionsE
qual
(
before
,
after
)).
isTrue
();
}
@Test
...
...
@@ -61,7 +61,8 @@ public class ExoPlaybackExceptionTest {
assertThat
(
after
.
getCause
()).
hasMessageThat
().
isEqualTo
(
before
.
getCause
().
getMessage
());
}
private
static
boolean
areEqual
(
ExoPlaybackException
a
,
ExoPlaybackException
b
)
{
private
static
boolean
areExoPlaybackExceptionsEqual
(
ExoPlaybackException
a
,
ExoPlaybackException
b
)
{
if
(
a
==
null
||
b
==
null
)
{
return
a
==
b
;
}
...
...
@@ -73,10 +74,10 @@ public class ExoPlaybackExceptionTest {
&&
a
.
rendererFormatSupport
==
b
.
rendererFormatSupport
&&
a
.
timestampMs
==
b
.
timestampMs
&&
a
.
isRecoverable
==
b
.
isRecoverable
&&
areEqual
(
a
.
getCause
(),
b
.
getCause
());
&&
are
Throwables
Equal
(
a
.
getCause
(),
b
.
getCause
());
}
private
static
boolean
areEqual
(
Throwable
a
,
Throwable
b
)
{
private
static
boolean
are
Throwables
Equal
(
Throwable
a
,
Throwable
b
)
{
if
(
a
==
null
||
b
==
null
)
{
return
a
==
b
;
}
...
...
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