From beab272a8c333f459d72bfccccfaa4f6d2368adc Mon Sep 17 00:00:00 2001 From: olly Date: Thu, 12 Mar 2020 13:37:17 +0000 Subject: [PATCH] Drop prefix test- from test methods under v2/playbacktests This is one step toward following the google3's test naming convention. See go/java-testing/getting_started#basic-test-template for details why prefix test isn't necessary. This CL is generated by following command $ find -name '*Test.java' | xargs -I{} sed -i 's/^\ \ public\ void\ test\([A-Z]\)\(.*\)$/ public void \L\1\E\2/' {} PiperOrigin-RevId: 300537212 --- .../gts/CommonEncryptionDrmTest.java | 8 +-- .../playbacktests/gts/DashDownloadTest.java | 2 +- .../playbacktests/gts/DashStreamingTest.java | 60 +++++++++---------- .../gts/DashWidevineOfflineTest.java | 8 +-- .../gts/EnumerateDecodersTest.java | 2 +- 5 files changed, 40 insertions(+), 40 deletions(-) diff --git a/playbacktests/src/androidTest/java/com/google/android/exoplayer2/playbacktests/gts/CommonEncryptionDrmTest.java b/playbacktests/src/androidTest/java/com/google/android/exoplayer2/playbacktests/gts/CommonEncryptionDrmTest.java index a01ab3a250..d25836eee3 100644 --- a/playbacktests/src/androidTest/java/com/google/android/exoplayer2/playbacktests/gts/CommonEncryptionDrmTest.java +++ b/playbacktests/src/androidTest/java/com/google/android/exoplayer2/playbacktests/gts/CommonEncryptionDrmTest.java @@ -63,7 +63,7 @@ public final class CommonEncryptionDrmTest { } @Test - public void testCencSchemeTypeV18() { + public void cencSchemeTypeV18() { if (Util.SDK_INT < 18) { // Pass. return; @@ -75,7 +75,7 @@ public final class CommonEncryptionDrmTest { } @Test - public void testCbc1SchemeTypeV25() { + public void cbc1SchemeTypeV25() { if (Util.SDK_INT < 25) { // cbc1 support was added in API 24, but it is stable from API 25 onwards. // See [internal: b/65634809]. @@ -89,7 +89,7 @@ public final class CommonEncryptionDrmTest { } @Test - public void testCbcsSchemeTypeV25() { + public void cbcsSchemeTypeV25() { if (Util.SDK_INT < 25) { // cbcs support was added in API 24, but it is stable from API 25 onwards. // See [internal: b/65634809]. @@ -103,7 +103,7 @@ public final class CommonEncryptionDrmTest { } @Test - public void testCensSchemeTypeV25() { + public void censSchemeTypeV25() { // TODO: Implement once content is available. Track [internal: b/31219813]. } } diff --git a/playbacktests/src/androidTest/java/com/google/android/exoplayer2/playbacktests/gts/DashDownloadTest.java b/playbacktests/src/androidTest/java/com/google/android/exoplayer2/playbacktests/gts/DashDownloadTest.java index f5af2472c9..c2e14ab5d2 100644 --- a/playbacktests/src/androidTest/java/com/google/android/exoplayer2/playbacktests/gts/DashDownloadTest.java +++ b/playbacktests/src/androidTest/java/com/google/android/exoplayer2/playbacktests/gts/DashDownloadTest.java @@ -87,7 +87,7 @@ public final class DashDownloadTest { // Download tests @Test - public void testDownload() throws Exception { + public void download() throws Exception { DashDownloader dashDownloader = downloadContent(); dashDownloader.download(/* progressListener= */ null); diff --git a/playbacktests/src/androidTest/java/com/google/android/exoplayer2/playbacktests/gts/DashStreamingTest.java b/playbacktests/src/androidTest/java/com/google/android/exoplayer2/playbacktests/gts/DashStreamingTest.java index 5ae4708006..259c2e61f6 100644 --- a/playbacktests/src/androidTest/java/com/google/android/exoplayer2/playbacktests/gts/DashStreamingTest.java +++ b/playbacktests/src/androidTest/java/com/google/android/exoplayer2/playbacktests/gts/DashStreamingTest.java @@ -101,7 +101,7 @@ public final class DashStreamingTest { // H264 CDD. @Test - public void testH264Fixed() throws Exception { + public void h264Fixed() throws Exception { testRunner .setStreamName("test_h264_fixed") .setManifestUrl(DashTestData.H264_MANIFEST) @@ -112,7 +112,7 @@ public final class DashStreamingTest { } @Test - public void testH264Adaptive() throws Exception { + public void h264Adaptive() throws Exception { if (shouldSkipAdaptiveTest(MimeTypes.VIDEO_H264)) { // Pass. return; @@ -128,7 +128,7 @@ public final class DashStreamingTest { } @Test - public void testH264AdaptiveWithSeeking() throws Exception { + public void h264AdaptiveWithSeeking() throws Exception { if (shouldSkipAdaptiveTest(MimeTypes.VIDEO_H264)) { // Pass. return; @@ -146,7 +146,7 @@ public final class DashStreamingTest { } @Test - public void testH264AdaptiveWithRendererDisabling() throws Exception { + public void h264AdaptiveWithRendererDisabling() throws Exception { if (shouldSkipAdaptiveTest(MimeTypes.VIDEO_H264)) { // Pass. return; @@ -166,7 +166,7 @@ public final class DashStreamingTest { // H265 CDD. @Test - public void testH265FixedV23() throws Exception { + public void h265FixedV23() throws Exception { if (Util.SDK_INT < 23) { // Pass. return; @@ -181,7 +181,7 @@ public final class DashStreamingTest { } @Test - public void testH265AdaptiveV24() throws Exception { + public void h265AdaptiveV24() throws Exception { if (Util.SDK_INT < 24) { // Pass. return; @@ -197,7 +197,7 @@ public final class DashStreamingTest { } @Test - public void testH265AdaptiveWithSeekingV24() throws Exception { + public void h265AdaptiveWithSeekingV24() throws Exception { if (Util.SDK_INT < 24) { // Pass. return; @@ -214,7 +214,7 @@ public final class DashStreamingTest { } @Test - public void testH265AdaptiveWithRendererDisablingV24() throws Exception { + public void h265AdaptiveWithRendererDisablingV24() throws Exception { if (Util.SDK_INT < 24) { // Pass. return; @@ -233,7 +233,7 @@ public final class DashStreamingTest { // VP9 (CDD). @Test - public void testVp9Fixed360pV23() throws Exception { + public void vp9Fixed360pV23() throws Exception { if (Util.SDK_INT < 23) { // Pass. return; @@ -249,7 +249,7 @@ public final class DashStreamingTest { } @Test - public void testVp9AdaptiveV24() throws Exception { + public void vp9AdaptiveV24() throws Exception { if (Util.SDK_INT < 24) { // Pass. return; @@ -265,7 +265,7 @@ public final class DashStreamingTest { } @Test - public void testVp9AdaptiveWithSeekingV24() throws Exception { + public void vp9AdaptiveWithSeekingV24() throws Exception { if (Util.SDK_INT < 24) { // Pass. return; @@ -282,7 +282,7 @@ public final class DashStreamingTest { } @Test - public void testVp9AdaptiveWithRendererDisablingV24() throws Exception { + public void vp9AdaptiveWithRendererDisablingV24() throws Exception { if (Util.SDK_INT < 24) { // Pass. return; @@ -355,7 +355,7 @@ public final class DashStreamingTest { // H264 CDD. @Test - public void testWidevineH264FixedV18() throws Exception { + public void widevineH264FixedV18() throws Exception { if (Util.SDK_INT < 18) { // Pass. return; @@ -372,7 +372,7 @@ public final class DashStreamingTest { } @Test - public void testWidevineH264AdaptiveV18() throws Exception { + public void widevineH264AdaptiveV18() throws Exception { if (Util.SDK_INT < 18 || shouldSkipAdaptiveTest(MimeTypes.VIDEO_H264)) { // Pass. return; @@ -389,7 +389,7 @@ public final class DashStreamingTest { } @Test - public void testWidevineH264AdaptiveWithSeekingV18() throws Exception { + public void widevineH264AdaptiveWithSeekingV18() throws Exception { if (Util.SDK_INT < 18 || shouldSkipAdaptiveTest(MimeTypes.VIDEO_H264)) { // Pass. return; @@ -407,7 +407,7 @@ public final class DashStreamingTest { } @Test - public void testWidevineH264AdaptiveWithRendererDisablingV18() throws Exception { + public void widevineH264AdaptiveWithRendererDisablingV18() throws Exception { if (Util.SDK_INT < 18 || shouldSkipAdaptiveTest(MimeTypes.VIDEO_H264)) { // Pass. return; @@ -427,7 +427,7 @@ public final class DashStreamingTest { // H265 CDD. @Test - public void testWidevineH265FixedV23() throws Exception { + public void widevineH265FixedV23() throws Exception { if (Util.SDK_INT < 23) { // Pass. return; @@ -444,7 +444,7 @@ public final class DashStreamingTest { } @Test - public void testWidevineH265AdaptiveV24() throws Exception { + public void widevineH265AdaptiveV24() throws Exception { if (Util.SDK_INT < 24) { // Pass. return; @@ -461,7 +461,7 @@ public final class DashStreamingTest { } @Test - public void testWidevineH265AdaptiveWithSeekingV24() throws Exception { + public void widevineH265AdaptiveWithSeekingV24() throws Exception { if (Util.SDK_INT < 24) { // Pass. return; @@ -479,7 +479,7 @@ public final class DashStreamingTest { } @Test - public void testWidevineH265AdaptiveWithRendererDisablingV24() throws Exception { + public void widevineH265AdaptiveWithRendererDisablingV24() throws Exception { if (Util.SDK_INT < 24) { // Pass. return; @@ -499,7 +499,7 @@ public final class DashStreamingTest { // VP9 (CDD). @Test - public void testWidevineVp9Fixed360pV23() throws Exception { + public void widevineVp9Fixed360pV23() throws Exception { if (Util.SDK_INT < 23) { // Pass. return; @@ -516,7 +516,7 @@ public final class DashStreamingTest { } @Test - public void testWidevineVp9AdaptiveV24() throws Exception { + public void widevineVp9AdaptiveV24() throws Exception { if (Util.SDK_INT < 24) { // Pass. return; @@ -533,7 +533,7 @@ public final class DashStreamingTest { } @Test - public void testWidevineVp9AdaptiveWithSeekingV24() throws Exception { + public void widevineVp9AdaptiveWithSeekingV24() throws Exception { if (Util.SDK_INT < 24) { // Pass. return; @@ -551,7 +551,7 @@ public final class DashStreamingTest { } @Test - public void testWidevineVp9AdaptiveWithRendererDisablingV24() throws Exception { + public void widevineVp9AdaptiveWithRendererDisablingV24() throws Exception { if (Util.SDK_INT < 24) { // Pass. return; @@ -572,7 +572,7 @@ public final class DashStreamingTest { // 23.976 fps. @Test - public void testWidevine23FpsH264FixedV23() throws Exception { + public void widevine23FpsH264FixedV23() throws Exception { if (Util.SDK_INT < 23) { // Pass. return; @@ -590,7 +590,7 @@ public final class DashStreamingTest { // 24 fps. @Test - public void testWidevine24FpsH264FixedV23() throws Exception { + public void widevine24FpsH264FixedV23() throws Exception { if (Util.SDK_INT < 23) { // Pass. return; @@ -608,7 +608,7 @@ public final class DashStreamingTest { // 29.97 fps. @Test - public void testWidevine29FpsH264FixedV23() throws Exception { + public void widevine29FpsH264FixedV23() throws Exception { if (Util.SDK_INT < 23) { // Pass. return; @@ -627,7 +627,7 @@ public final class DashStreamingTest { // Decoder info. @Test - public void testDecoderInfoH264() throws Exception { + public void decoderInfoH264() throws Exception { MediaCodecInfo decoderInfo = MediaCodecUtil.getDecoderInfo( MimeTypes.VIDEO_H264, /* secure= */ false, /* tunneling= */ false); @@ -636,7 +636,7 @@ public final class DashStreamingTest { } @Test - public void testDecoderInfoH265V24() throws Exception { + public void decoderInfoH265V24() throws Exception { if (Util.SDK_INT < 24) { // Pass. return; @@ -649,7 +649,7 @@ public final class DashStreamingTest { } @Test - public void testDecoderInfoVP9V24() throws Exception { + public void decoderInfoVP9V24() throws Exception { if (Util.SDK_INT < 24) { // Pass. return; diff --git a/playbacktests/src/androidTest/java/com/google/android/exoplayer2/playbacktests/gts/DashWidevineOfflineTest.java b/playbacktests/src/androidTest/java/com/google/android/exoplayer2/playbacktests/gts/DashWidevineOfflineTest.java index ae08669936..c049de4ae8 100644 --- a/playbacktests/src/androidTest/java/com/google/android/exoplayer2/playbacktests/gts/DashWidevineOfflineTest.java +++ b/playbacktests/src/androidTest/java/com/google/android/exoplayer2/playbacktests/gts/DashWidevineOfflineTest.java @@ -98,7 +98,7 @@ public final class DashWidevineOfflineTest { // Offline license tests @Test - public void testWidevineOfflineLicenseV22() throws Exception { + public void widevineOfflineLicenseV22() throws Exception { if (Util.SDK_INT < 22) { return; // Pass. } @@ -111,7 +111,7 @@ public final class DashWidevineOfflineTest { } @Test - public void testWidevineOfflineReleasedLicenseV22() throws Throwable { + public void widevineOfflineReleasedLicenseV22() throws Throwable { if (Util.SDK_INT < 22) { return; // Pass. } @@ -138,7 +138,7 @@ public final class DashWidevineOfflineTest { } @Test - public void testWidevineOfflineExpiredLicenseV22() throws Exception { + public void widevineOfflineExpiredLicenseV22() throws Exception { if (Util.SDK_INT < 22) { return; // Pass. } @@ -168,7 +168,7 @@ public final class DashWidevineOfflineTest { } @Test - public void testWidevineOfflineLicenseExpiresOnPauseV22() throws Exception { + public void widevineOfflineLicenseExpiresOnPauseV22() throws Exception { if (Util.SDK_INT < 22) { return; // Pass. } diff --git a/playbacktests/src/androidTest/java/com/google/android/exoplayer2/playbacktests/gts/EnumerateDecodersTest.java b/playbacktests/src/androidTest/java/com/google/android/exoplayer2/playbacktests/gts/EnumerateDecodersTest.java index f7b376d7ad..a29b056edb 100644 --- a/playbacktests/src/androidTest/java/com/google/android/exoplayer2/playbacktests/gts/EnumerateDecodersTest.java +++ b/playbacktests/src/androidTest/java/com/google/android/exoplayer2/playbacktests/gts/EnumerateDecodersTest.java @@ -47,7 +47,7 @@ public class EnumerateDecodersTest { } @Test - public void testEnumerateDecoders() throws Exception { + public void enumerateDecoders() throws Exception { enumerateDecoders(MimeTypes.VIDEO_H263); enumerateDecoders(MimeTypes.VIDEO_H264); enumerateDecoders(MimeTypes.VIDEO_H265);