Turn on DepAnn for test-base and test-runner

Bug: 30188076
Test: m -j20 RUN_ERROR_PRONE=true android.test.base android.test.runner
Change-Id: I735e3fbfcc710f1dc1b96e04f91b9feda8727b6c
This commit is contained in:
Paul Duffin
2018-02-16 13:11:05 +00:00
parent 46656fa28e
commit 2d86c7a4c7
6 changed files with 22 additions and 1 deletions

View File

@@ -23,6 +23,10 @@ java_library {
java_version: "1.8",
srcs: ["src/**/*.java"],
errorprone: {
javacflags: ["-Xep:DepAnn:ERROR"],
},
no_framework_libs: true,
libs: [
"framework",

View File

@@ -19,8 +19,9 @@ package android.test;
/**
* Thrown when an assert equals for Strings failed.
*
* @deprecated use junit.framework.ComparisonFailure
* @deprecated use org.junit.ComparisonFailure
*/
@Deprecated
public class ComparisonFailure extends AssertionFailedError {
private junit.framework.ComparisonFailure mComparison;

View File

@@ -20,6 +20,11 @@ import junit.framework.TestSuite;
/**
* Implementors will know how to get a test suite.
*
* @deprecated Use
* <a href="{@docRoot}reference/android/support/test/runner/AndroidJUnitRunner.html">
* AndroidJUnitRunner</a> instead. New tests should be written using the
* <a href="{@docRoot}tools/testing-support-library/index.html">Android Testing Support Library</a>.
*/
@Deprecated
public interface TestSuiteProvider {

View File

@@ -207,6 +207,7 @@ public abstract class BaseTestRunner implements TestListener {
*
* @deprecated not present in JUnit4.10
*/
@Deprecated
public TestSuiteLoader getLoader() {
return new StandardTestSuiteLoader();
}
@@ -279,6 +280,7 @@ public abstract class BaseTestRunner implements TestListener {
// BEGIN android-changed - add back this method for API compatibility
/** @deprecated not present in JUnit4.10 */
@Deprecated
public static boolean inVAJava() {
return false;
}