Fixed test compilation
This commit is contained in:
parent
102c05e927
commit
93deaa5687
1 changed files with 13 additions and 13 deletions
|
@ -199,17 +199,17 @@ public class ListHelperTest {
|
||||||
public void getHighestQualityAudioFormatTest() {
|
public void getHighestQualityAudioFormatTest() {
|
||||||
AudioStream stream = AUDIO_STREAMS_TEST_LIST.get(ListHelper.getHighestQualityAudioIndex(
|
AudioStream stream = AUDIO_STREAMS_TEST_LIST.get(ListHelper.getHighestQualityAudioIndex(
|
||||||
MediaFormat.M4A, AUDIO_STREAMS_TEST_LIST));
|
MediaFormat.M4A, AUDIO_STREAMS_TEST_LIST));
|
||||||
assertEquals(320, stream.average_bitrate);
|
assertEquals(320, stream.getAverageBitrate());
|
||||||
assertEquals(MediaFormat.M4A, stream.getFormat());
|
assertEquals(MediaFormat.M4A, stream.getFormat());
|
||||||
|
|
||||||
stream = AUDIO_STREAMS_TEST_LIST.get(ListHelper.getHighestQualityAudioIndex(
|
stream = AUDIO_STREAMS_TEST_LIST.get(ListHelper.getHighestQualityAudioIndex(
|
||||||
MediaFormat.WEBMA, AUDIO_STREAMS_TEST_LIST));
|
MediaFormat.WEBMA, AUDIO_STREAMS_TEST_LIST));
|
||||||
assertEquals(320, stream.average_bitrate);
|
assertEquals(320, stream.getAverageBitrate());
|
||||||
assertEquals(MediaFormat.WEBMA, stream.getFormat());
|
assertEquals(MediaFormat.WEBMA, stream.getFormat());
|
||||||
|
|
||||||
stream = AUDIO_STREAMS_TEST_LIST.get(ListHelper.getHighestQualityAudioIndex(
|
stream = AUDIO_STREAMS_TEST_LIST.get(ListHelper.getHighestQualityAudioIndex(
|
||||||
MediaFormat.MP3, AUDIO_STREAMS_TEST_LIST));
|
MediaFormat.MP3, AUDIO_STREAMS_TEST_LIST));
|
||||||
assertEquals(192, stream.average_bitrate);
|
assertEquals(192, stream.getAverageBitrate());
|
||||||
assertEquals(MediaFormat.MP3, stream.getFormat());
|
assertEquals(MediaFormat.MP3, stream.getFormat());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -227,7 +227,7 @@ public class ListHelperTest {
|
||||||
// It should fallback to the highest bitrate audio no matter what format it is
|
// It should fallback to the highest bitrate audio no matter what format it is
|
||||||
AudioStream stream = testList.get(ListHelper.getHighestQualityAudioIndex(
|
AudioStream stream = testList.get(ListHelper.getHighestQualityAudioIndex(
|
||||||
MediaFormat.MP3, testList));
|
MediaFormat.MP3, testList));
|
||||||
assertEquals(192, stream.average_bitrate);
|
assertEquals(192, stream.getAverageBitrate());
|
||||||
assertEquals(MediaFormat.WEBMA, stream.getFormat());
|
assertEquals(MediaFormat.WEBMA, stream.getFormat());
|
||||||
|
|
||||||
////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////
|
||||||
|
@ -245,14 +245,14 @@ public class ListHelperTest {
|
||||||
// List doesn't contains this format, it should fallback to the highest bitrate audio and
|
// List doesn't contains this format, it should fallback to the highest bitrate audio and
|
||||||
// the highest quality format.
|
// the highest quality format.
|
||||||
stream = testList.get(ListHelper.getHighestQualityAudioIndex(MediaFormat.MP3, testList));
|
stream = testList.get(ListHelper.getHighestQualityAudioIndex(MediaFormat.MP3, testList));
|
||||||
assertEquals(192, stream.average_bitrate);
|
assertEquals(192, stream.getAverageBitrate());
|
||||||
assertEquals(MediaFormat.M4A, stream.getFormat());
|
assertEquals(MediaFormat.M4A, stream.getFormat());
|
||||||
|
|
||||||
// Adding a new format and bitrate. Adding another stream will have no impact since
|
// Adding a new format and bitrate. Adding another stream will have no impact since
|
||||||
// it's not a preferred format.
|
// it's not a preferred format.
|
||||||
testList.add(new AudioStream("", MediaFormat.WEBMA, /**/ 192));
|
testList.add(new AudioStream("", MediaFormat.WEBMA, /**/ 192));
|
||||||
stream = testList.get(ListHelper.getHighestQualityAudioIndex(MediaFormat.MP3, testList));
|
stream = testList.get(ListHelper.getHighestQualityAudioIndex(MediaFormat.MP3, testList));
|
||||||
assertEquals(192, stream.average_bitrate);
|
assertEquals(192, stream.getAverageBitrate());
|
||||||
assertEquals(MediaFormat.M4A, stream.getFormat());
|
assertEquals(MediaFormat.M4A, stream.getFormat());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -266,17 +266,17 @@ public class ListHelperTest {
|
||||||
public void getLowestQualityAudioFormatTest() {
|
public void getLowestQualityAudioFormatTest() {
|
||||||
AudioStream stream = AUDIO_STREAMS_TEST_LIST.get(ListHelper.getMostCompactAudioIndex(
|
AudioStream stream = AUDIO_STREAMS_TEST_LIST.get(ListHelper.getMostCompactAudioIndex(
|
||||||
MediaFormat.M4A, AUDIO_STREAMS_TEST_LIST));
|
MediaFormat.M4A, AUDIO_STREAMS_TEST_LIST));
|
||||||
assertEquals(128, stream.average_bitrate);
|
assertEquals(128, stream.getAverageBitrate());
|
||||||
assertEquals(MediaFormat.M4A, stream.getFormat());
|
assertEquals(MediaFormat.M4A, stream.getFormat());
|
||||||
|
|
||||||
stream = AUDIO_STREAMS_TEST_LIST.get(ListHelper.getMostCompactAudioIndex(
|
stream = AUDIO_STREAMS_TEST_LIST.get(ListHelper.getMostCompactAudioIndex(
|
||||||
MediaFormat.WEBMA, AUDIO_STREAMS_TEST_LIST));
|
MediaFormat.WEBMA, AUDIO_STREAMS_TEST_LIST));
|
||||||
assertEquals(64, stream.average_bitrate);
|
assertEquals(64, stream.getAverageBitrate());
|
||||||
assertEquals(MediaFormat.WEBMA, stream.getFormat());
|
assertEquals(MediaFormat.WEBMA, stream.getFormat());
|
||||||
|
|
||||||
stream = AUDIO_STREAMS_TEST_LIST.get(ListHelper.getMostCompactAudioIndex(
|
stream = AUDIO_STREAMS_TEST_LIST.get(ListHelper.getMostCompactAudioIndex(
|
||||||
MediaFormat.MP3, AUDIO_STREAMS_TEST_LIST));
|
MediaFormat.MP3, AUDIO_STREAMS_TEST_LIST));
|
||||||
assertEquals(64, stream.average_bitrate);
|
assertEquals(64, stream.getAverageBitrate());
|
||||||
assertEquals(MediaFormat.MP3, stream.getFormat());
|
assertEquals(MediaFormat.MP3, stream.getFormat());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -294,13 +294,13 @@ public class ListHelperTest {
|
||||||
// It should fallback to the most compact audio no matter what format it is.
|
// It should fallback to the most compact audio no matter what format it is.
|
||||||
AudioStream stream = testList.get(ListHelper.getMostCompactAudioIndex(
|
AudioStream stream = testList.get(ListHelper.getMostCompactAudioIndex(
|
||||||
MediaFormat.MP3, testList));
|
MediaFormat.MP3, testList));
|
||||||
assertEquals(128, stream.average_bitrate);
|
assertEquals(128, stream.getAverageBitrate());
|
||||||
assertEquals(MediaFormat.M4A, stream.getFormat());
|
assertEquals(MediaFormat.M4A, stream.getFormat());
|
||||||
|
|
||||||
// WEBMA is more compact than M4A
|
// WEBMA is more compact than M4A
|
||||||
testList.add(new AudioStream("", MediaFormat.WEBMA, /**/ 128));
|
testList.add(new AudioStream("", MediaFormat.WEBMA, /**/ 128));
|
||||||
stream = testList.get(ListHelper.getMostCompactAudioIndex(MediaFormat.MP3, testList));
|
stream = testList.get(ListHelper.getMostCompactAudioIndex(MediaFormat.MP3, testList));
|
||||||
assertEquals(128, stream.average_bitrate);
|
assertEquals(128, stream.getAverageBitrate());
|
||||||
assertEquals(MediaFormat.WEBMA, stream.getFormat());
|
assertEquals(MediaFormat.WEBMA, stream.getFormat());
|
||||||
|
|
||||||
////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////
|
||||||
|
@ -317,12 +317,12 @@ public class ListHelperTest {
|
||||||
// List doesn't contain this format
|
// List doesn't contain this format
|
||||||
// It should fallback to the most compact audio no matter what format it is.
|
// It should fallback to the most compact audio no matter what format it is.
|
||||||
stream = testList.get(ListHelper.getMostCompactAudioIndex(MediaFormat.MP3, testList));
|
stream = testList.get(ListHelper.getMostCompactAudioIndex(MediaFormat.MP3, testList));
|
||||||
assertEquals(192, stream.average_bitrate);
|
assertEquals(192, stream.getAverageBitrate());
|
||||||
assertEquals(MediaFormat.WEBMA, stream.getFormat());
|
assertEquals(MediaFormat.WEBMA, stream.getFormat());
|
||||||
|
|
||||||
// Should be same as above
|
// Should be same as above
|
||||||
stream = testList.get(ListHelper.getMostCompactAudioIndex(null, testList));
|
stream = testList.get(ListHelper.getMostCompactAudioIndex(null, testList));
|
||||||
assertEquals(192, stream.average_bitrate);
|
assertEquals(192, stream.getAverageBitrate());
|
||||||
assertEquals(MediaFormat.WEBMA, stream.getFormat());
|
assertEquals(MediaFormat.WEBMA, stream.getFormat());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue