Move assets from FLAC extension to testdata
PiperOrigin-RevId: 293553412
This commit is contained in:
parent
011efcc522
commit
79a3bad4c3
@ -29,10 +29,13 @@ android {
|
||||
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
|
||||
}
|
||||
|
||||
sourceSets.main {
|
||||
sourceSets {
|
||||
main {
|
||||
jniLibs.srcDir 'src/main/libs'
|
||||
jni.srcDirs = [] // Disable the automatic ndk-build call by Android Studio.
|
||||
}
|
||||
androidTest.assets.srcDir '../../testdata/src/test/assets/'
|
||||
}
|
||||
|
||||
testOptions.unitTests.includeAndroidResources = true
|
||||
}
|
||||
@ -46,6 +49,7 @@ dependencies {
|
||||
testImplementation 'androidx.test:core:' + androidxTestCoreVersion
|
||||
testImplementation 'androidx.test.ext:junit:' + androidxTestJUnitVersion
|
||||
testImplementation project(modulePrefix + 'testutils')
|
||||
testImplementation project(modulePrefix + 'testdata')
|
||||
testImplementation 'org.robolectric:robolectric:' + robolectricVersion
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,7 @@ import org.junit.runner.RunWith;
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public final class FlacBinarySearchSeekerTest {
|
||||
|
||||
private static final String NOSEEKTABLE_FLAC = "bear_no_seek.flac";
|
||||
private static final String NOSEEKTABLE_FLAC = "flac/ext-bear_no_seek.flac";
|
||||
private static final int DURATION_US = 2_741_000;
|
||||
|
||||
@Before
|
||||
|
@ -48,7 +48,7 @@ import org.junit.runner.RunWith;
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public final class FlacExtractorSeekTest {
|
||||
|
||||
private static final String NO_SEEKTABLE_FLAC = "bear_no_seek.flac";
|
||||
private static final String NO_SEEKTABLE_FLAC = "flac/ext-bear_no_seek.flac";
|
||||
private static final int DURATION_US = 2_741_000;
|
||||
private static final Uri FILE_URI = Uri.parse("file:///android_asset/" + NO_SEEKTABLE_FLAC);
|
||||
private static final Random RANDOM = new Random(1234L);
|
||||
|
@ -38,12 +38,14 @@ public class FlacExtractorTest {
|
||||
@Test
|
||||
public void testExtractFlacSample() throws Exception {
|
||||
ExtractorAsserts.assertBehavior(
|
||||
FlacExtractor::new, "bear.flac", ApplicationProvider.getApplicationContext());
|
||||
FlacExtractor::new, "flac/ext-bear.flac", ApplicationProvider.getApplicationContext());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testExtractFlacSampleWithId3Header() throws Exception {
|
||||
ExtractorAsserts.assertBehavior(
|
||||
FlacExtractor::new, "bear_with_id3.flac", ApplicationProvider.getApplicationContext());
|
||||
FlacExtractor::new,
|
||||
"flac/ext-bear_with_id3.flac",
|
||||
ApplicationProvider.getApplicationContext());
|
||||
}
|
||||
}
|
||||
|
@ -42,8 +42,8 @@ import org.junit.runner.RunWith;
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class FlacPlaybackTest {
|
||||
|
||||
private static final String BEAR_FLAC_16BIT = "bear-flac-16bit.mka";
|
||||
private static final String BEAR_FLAC_24BIT = "bear-flac-24bit.mka";
|
||||
private static final String BEAR_FLAC_16BIT = "flac/ext-bear-flac-16bit.mka";
|
||||
private static final String BEAR_FLAC_24BIT = "flac/ext-bear-flac-24bit.mka";
|
||||
|
||||
@Before
|
||||
public void setUp() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user