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
c3866449
authored
May 31, 2022
by
bachinger
Committed by
Marc Baechinger
May 31, 2022
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Ignore decoding test cases when library not available
#minor-release PiperOrigin-RevId: 452043577
parent
14ed32c6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
extensions/opus/src/test/java/com/google/android/exoplayer2/ext/opus/OpusDecoderTest.java
extensions/opus/src/test/java/com/google/android/exoplayer2/ext/opus/OpusDecoderTest.java
View file @
c3866449
...
...
@@ -16,6 +16,7 @@
package
com
.
google
.
android
.
exoplayer2
.
ext
.
opus
;
import
static
com
.
google
.
common
.
truth
.
Truth
.
assertThat
;
import
static
org
.
junit
.
Assume
.
assumeTrue
;
import
androidx.annotation.Nullable
;
import
androidx.test.ext.junit.runners.AndroidJUnit4
;
...
...
@@ -26,7 +27,6 @@ import com.google.android.exoplayer2.util.LibraryLoader;
import
com.google.common.collect.ImmutableList
;
import
java.nio.ByteBuffer
;
import
java.nio.ByteOrder
;
import
org.junit.Before
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
...
...
@@ -69,11 +69,6 @@ public final class OpusDecoderTest {
private
static
final
ImmutableList
<
byte
[]>
FULL_INITIALIZATION_DATA
=
ImmutableList
.
of
(
HEADER
,
CUSTOM_PRE_SKIP_BYTES
,
CUSTOM_SEEK_PRE_ROLL_BYTES
);
@Before
public
void
setUp
()
{
assertThat
(
LOADER
.
isAvailable
()).
isTrue
();
}
@Test
public
void
getChannelCount
()
{
int
channelCount
=
OpusDecoder
.
getChannelCount
(
HEADER
);
...
...
@@ -120,6 +115,7 @@ public final class OpusDecoderTest {
@Test
public
void
decode_removesPreSkipFromOutput
()
throws
OpusDecoderException
{
assumeTrue
(
LOADER
.
isAvailable
());
OpusDecoder
decoder
=
new
OpusDecoder
(
/* numInputBuffers= */
0
,
...
...
@@ -139,6 +135,7 @@ public final class OpusDecoderTest {
@Test
public
void
decode_whenDiscardPaddingDisabled_returnsDiscardPadding
()
throws
OpusDecoderException
{
assumeTrue
(
LOADER
.
isAvailable
());
OpusDecoder
decoder
=
new
OpusDecoder
(
/* numInputBuffers= */
0
,
...
...
@@ -159,6 +156,7 @@ public final class OpusDecoderTest {
@Test
public
void
decode_whenDiscardPaddingEnabled_removesDiscardPadding
()
throws
OpusDecoderException
{
assumeTrue
(
LOADER
.
isAvailable
());
OpusDecoder
decoder
=
new
OpusDecoder
(
/* numInputBuffers= */
0
,
...
...
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