From dbd04752b51372998f7fbd75d1e88ef731cefffe Mon Sep 17 00:00:00 2001 From: ghm Date: Tue, 3 Jan 2023 12:33:28 -0800 Subject: [PATCH] Nit: remove `test` prefix from JUnit4 tests. This is a real JUnit3-ism; the fact it's a test is adequately expressed by the @Test annotation. PiperOrigin-RevId: 499289382 --- .../apply/AndroidImportOrganizerTest.java | 4 +- .../apply/BasicImportOrganizerTest.java | 4 +- .../apply/IdeaImportOrganizerTest.java | 2 +- .../NonNullAssumptionsTest.java | 8 +- .../nullnesspropagation/NullnessTest.java | 6 +- .../fixes/BranchedSuggestedFixesTest.java | 6 +- .../errorprone/matchers/DescriptionTest.java | 8 +- .../google/errorprone/DiagnosticKindTest.java | 6 +- .../ErrorProneJavaCompilerTest.java | 32 +-- .../com/google/errorprone/SubContextTest.java | 4 +- .../bugpatterns/ArrayEqualsTest.java | 8 +- .../ArrayFillIncompatibleTypeTest.java | 8 +- .../bugpatterns/ArrayHashCodeTest.java | 6 +- .../bugpatterns/ArrayToStringTest.java | 12 +- .../bugpatterns/AssertFalseTest.java | 4 +- .../AsyncFunctionReturnsNullTest.java | 4 +- .../AutoValueFinalMethodsTest.java | 10 +- .../bugpatterns/BadComparableTest.java | 4 +- .../errorprone/bugpatterns/BadImportTest.java | 6 +- .../bugpatterns/BadShiftAmountTest.java | 4 +- .../errorprone/bugpatterns/BanJNDITest.java | 6 +- .../bugpatterns/BanSerializableReadTest.java | 6 +- .../bugpatterns/BareDotMetacharacterTest.java | 2 +- .../BoxedPrimitiveConstructorTest.java | 2 +- .../ByteBufferBackingArrayTest.java | 4 +- .../bugpatterns/CannotMockFinalClassTest.java | 6 +- .../errorprone/bugpatterns/CatchFailTest.java | 2 +- .../ChainedAssertionLosesContextTest.java | 4 +- ...ainingConstructorIgnoresParameterTest.java | 4 +- .../bugpatterns/CheckReturnValueTest.java | 46 ++-- .../bugpatterns/ClassCanBeStaticTest.java | 8 +- .../CollectionToArraySafeParameterTest.java | 4 +- .../CollectorShouldNotUseStateTest.java | 4 +- .../bugpatterns/ComparableTypeTest.java | 4 +- .../bugpatterns/CompareToZeroTest.java | 2 +- .../ComparisonContractViolatedTest.java | 4 +- .../bugpatterns/ComparisonOutOfRangeTest.java | 4 +- .../CompileTimeConstantCheckerTest.java | 54 ++--- ...ComputeIfAbsentAmbiguousReferenceTest.java | 6 +- .../ConstantPatternCompileTest.java | 28 +-- .../bugpatterns/DeadExceptionTest.java | 6 +- .../bugpatterns/DefaultPackageTest.java | 8 +- .../errorprone/bugpatterns/DepAnnTest.java | 8 +- .../DoNotClaimAnnotationsTest.java | 6 +- .../bugpatterns/DuplicateMapKeysTest.java | 4 +- .../bugpatterns/EmptyCatchTest.java | 4 +- .../bugpatterns/EmptyIfStatementTest.java | 4 +- .../bugpatterns/EqualsHashCodeTest.java | 4 +- .../EqualsIncompatibleTypeTest.java | 8 +- .../errorprone/bugpatterns/EqualsNaNTest.java | 4 +- .../bugpatterns/EqualsReferenceTest.java | 4 +- .../errorprone/bugpatterns/FinallyTest.java | 8 +- ...oatingPointAssertionWithinEpsilonTest.java | 6 +- .../bugpatterns/ForOverrideCheckerTest.java | 34 +-- .../FunctionalInterfaceMethodChangedTest.java | 4 +- .../FutureReturnValueIgnoredTest.java | 10 +- ...resGetCheckedIllegalExceptionTypeTest.java | 4 +- ...ualsShouldNotBeUsedInEqualsMethodTest.java | 4 +- .../bugpatterns/GetClassOnClassTest.java | 4 +- .../bugpatterns/HidingFieldTest.java | 4 +- .../IdentityHashMapBoxingTest.java | 8 +- .../ImplementAssertionWithChainingTest.java | 4 +- .../ImpossibleNullComparisonTest.java | 12 +- .../IncompatibleModifiersCheckerTest.java | 10 +- .../InconsistentCapitalizationTest.java | 2 +- .../bugpatterns/InsecureCipherModeTest.java | 4 +- .../InstanceOfAndCastMatchWrongTypeTest.java | 4 +- .../bugpatterns/InvalidPatternSyntaxTest.java | 4 +- .../bugpatterns/InvalidTimeZoneIDTest.java | 4 +- .../bugpatterns/InvalidZoneIdTest.java | 4 +- .../bugpatterns/IterableAndIteratorTest.java | 4 +- .../bugpatterns/JUnit3TestNotRunTest.java | 12 +- .../bugpatterns/JUnit4SetUpNotRunTest.java | 8 +- .../bugpatterns/JUnit4TearDownNotRunTest.java | 8 +- .../bugpatterns/JUnit4TestNotRunTest.java | 16 +- .../bugpatterns/JUnitAssertSameCheckTest.java | 4 +- .../LambdaFunctionalInterfaceTest.java | 12 +- .../bugpatterns/LiteEnumValueOfTest.java | 6 +- .../LongLiteralLowerCaseSuffixTest.java | 8 +- .../MissingCasesInEnumSwitchTest.java | 12 +- .../bugpatterns/MissingFailTest.java | 18 +- .../bugpatterns/MisusedWeekYearTest.java | 8 +- ...ModifyCollectionInEnhancedForLoopTest.java | 4 +- .../ModifySourceCollectionInStreamTest.java | 4 +- .../ModifyingCollectionWithItselfTest.java | 4 +- ...MultipleParallelOrSequentialCallsTest.java | 2 +- ...ultipleUnaryOperatorsInMethodCallTest.java | 4 +- .../NarrowingCompoundAssignmentTest.java | 82 +++---- .../NestedInstanceOfConditionsTest.java | 4 +- .../bugpatterns/NoAllocationCheckerTest.java | 4 +- .../NonAtomicVolatileUpdateTest.java | 4 +- .../bugpatterns/NonOverridingEqualsTest.java | 28 +-- .../bugpatterns/NonRuntimeAnnotationTest.java | 4 +- .../bugpatterns/NullablePrimitiveTest.java | 4 +- .../ObjectEqualsForPrimitivesTest.java | 14 +- .../bugpatterns/ObjectToStringTest.java | 6 +- .../bugpatterns/OptionalEqualityTest.java | 6 +- .../bugpatterns/OptionalNotPresentTest.java | 4 +- .../OverrideThrowableToStringTest.java | 2 +- .../errorprone/bugpatterns/OverridesTest.java | 16 +- ...PreconditionsCheckNotNullRepeatedTest.java | 4 +- .../PreconditionsInvalidPlaceholderTest.java | 4 +- ...imitiveArrayPassedToVarargsMethodTest.java | 4 +- ...rivateSecurityContractProtoAccessTest.java | 6 +- .../ProtectedMembersInFinalClassTest.java | 6 +- .../bugpatterns/ProtoRedundantSetTest.java | 4 +- .../ProtocolBufferOrdinalTest.java | 4 +- .../bugpatterns/ReferenceEqualityTest.java | 4 +- .../RequiredModifiersCheckerTest.java | 16 +- .../bugpatterns/RestrictedApiCheckerTest.java | 28 +-- .../bugpatterns/ReturnValueIgnoredTest.java | 14 +- .../SelfAlwaysReturnsThisTest.java | 32 +-- .../bugpatterns/SelfAssignmentTest.java | 6 +- .../bugpatterns/SelfComparisonTest.java | 4 +- .../bugpatterns/SelfEqualsTest.java | 8 +- .../bugpatterns/ShouldHaveEvenArgsTest.java | 8 +- .../SizeGreaterThanOrEqualsZeroTest.java | 4 +- .../bugpatterns/StaticMockMemberTest.java | 4 +- .../StaticQualifiedUsingExpressionTest.java | 6 +- .../StringBuilderInitWithCharTest.java | 4 +- .../bugpatterns/StringSplitterTest.java | 4 +- .../SuppressWarningsDeprecatedTest.java | 4 +- .../bugpatterns/SwigMemoryLeakTest.java | 4 +- .../bugpatterns/ThreadJoinLoopTest.java | 6 +- .../ThreeLetterTimeZoneIDTest.java | 16 +- .../ThrowIfUncheckedKnownCheckedTest.java | 4 +- .../ThrowsUncheckedExceptionTest.java | 4 +- .../bugpatterns/TooManyParametersTest.java | 4 +- .../bugpatterns/TreeToStringTest.java | 4 +- .../bugpatterns/TruthAssertExpectedTest.java | 4 +- .../bugpatterns/TruthConstantAssertsTest.java | 4 +- .../bugpatterns/TruthGetOrDefaultTest.java | 6 +- .../bugpatterns/TruthSelfEqualsTest.java | 4 +- .../bugpatterns/TryFailThrowableTest.java | 4 +- .../bugpatterns/URLEqualsHashCodeTest.java | 4 +- .../UnnecessaryBoxedAssignmentTest.java | 2 +- .../UnnecessaryBoxedVariableTest.java | 2 +- .../UnsafeReflectiveConstructionCastTest.java | 8 +- .../bugpatterns/WaitNotInLoopTest.java | 4 +- .../BundleDeserializationCastTest.java | 28 +-- .../android/FragmentNotInstantiableTest.java | 8 +- .../android/HardCodedSdCardPathTest.java | 2 +- .../android/IsLoggableTagLengthTest.java | 24 +- .../android/MislabeledAndroidStringTest.java | 10 +- .../RectIntersectReturnValueIgnoredTest.java | 4 +- .../StaticOrDefaultInterfaceMethodTest.java | 8 +- .../CanIgnoreReturnValueSuggesterTest.java | 54 ++--- ...heckReturnValueWellKnownLibrariesTest.java | 14 +- .../NoCanIgnoreReturnValueOnClassesTest.java | 22 +- .../UnnecessarilyUsedValueTest.java | 6 +- .../UsingJsr305CheckReturnValueTest.java | 6 +- .../CollectionIncompatibleTypeTest.java | 14 +- .../CompatibleWithMisuseTest.java | 10 +- .../IncompatibleArgumentTypeTest.java | 8 +- .../FloggerRedundantIsEnabledTest.java | 2 +- .../FormatStringAnnotationCheckerTest.java | 26 +-- .../formatstring/FormatStringTest.java | 72 +++--- ...stedInjectAndInjectOnConstructorsTest.java | 4 +- ...dInjectAndInjectOnSameConstructorTest.java | 4 +- .../inject/AutoFactoryAtInjectTest.java | 4 +- .../inject/CloseableProvidesTest.java | 4 +- ...njectOnConstructorOfAbstractClassTest.java | 10 +- .../InjectOnMemberAndConstructorTest.java | 4 +- .../InjectedConstructorAnnotationsTest.java | 4 +- ...validTargetingOnScopingAnnotationTest.java | 4 +- .../JavaxInjectOnAbstractMethodTest.java | 4 +- .../inject/JavaxInjectOnFinalFieldTest.java | 4 +- .../inject/MisplacedScopeAnnotationsTest.java | 14 +- .../MoreThanOneInjectableConstructorTest.java | 4 +- .../inject/MoreThanOneQualifierTest.java | 4 +- ...MoreThanOneScopeAnnotationOnClassTest.java | 4 +- ...appingQualifierAndScopeAnnotationTest.java | 4 +- .../QualifierOrScopeOnInjectMethodTest.java | 6 +- .../inject/QualifierWithTypeUseTest.java | 4 +- ...otationOnInterfaceOrAbstractClassTest.java | 4 +- ...opeOrQualifierAnnotationRetentionTest.java | 10 +- .../AndroidInjectionBeforeSuperTest.java | 4 +- .../guice/AssistedInjectScopingTest.java | 4 +- .../inject/guice/AssistedParametersTest.java | 4 +- .../BindingToUnqualifiedCommonTypeTest.java | 4 +- .../inject/guice/InjectOnFinalFieldTest.java | 4 +- .../OverridesGuiceInjectableMethodTest.java | 4 +- .../OverridesJavaxInjectableMethodTest.java | 4 +- .../ProvidesMethodOutsideOfModuleTest.java | 4 +- .../bugpatterns/inlineme/InlinerTest.java | 52 ++--- .../bugpatterns/inlineme/SuggesterTest.java | 62 +++--- .../bugpatterns/inlineme/ValidatorTest.java | 56 ++--- .../javadoc/InvalidInlineTagTest.java | 2 +- .../nullness/EqualsBrokenForNullTest.java | 4 +- .../nullness/EqualsMissingNullableTest.java | 16 +- .../nullness/FieldMissingNullableTest.java | 50 ++--- .../NullArgumentForNonNullParameterTest.java | 18 +- .../ParameterMissingNullableTest.java | 56 ++--- .../nullness/ReturnMissingNullableTest.java | 208 +++++++++--------- .../nullness/UnnecessaryCheckNotNullTest.java | 10 +- .../nullness/UnsafeWildcardTest.java | 2 +- .../nullness/VoidMissingNullableTest.java | 4 +- .../threadsafety/GuardedByBinderTest.java | 8 +- .../threadsafety/GuardedByCheckerTest.java | 76 +++---- .../threadsafety/GuardedByLockMethodTest.java | 2 +- .../threadsafety/GuardedByValidatorTest.java | 18 +- .../threadsafety/HeldLockAnalyzerTest.java | 16 +- .../threadsafety/ImmutableCheckerTest.java | 2 +- .../SynchronizeOnNonFinalFieldTest.java | 8 +- .../bugpatterns/time/DateCheckerTest.java | 2 +- .../bugpatterns/time/DurationFromTest.java | 2 +- .../JavaDurationGetSecondsGetNanoTest.java | 34 +-- .../JavaInstantGetSecondsGetNanoTest.java | 34 +-- .../bugpatterns/time/PeriodFromTest.java | 2 +- .../bugpatterns/time/PeriodTimeMathTest.java | 2 +- .../ProtoDurationGetSecondsGetNanoTest.java | 42 ++-- .../ProtoTimestampGetSecondsGetNanoTest.java | 36 +-- .../NullnessInferenceTest.java | 30 +-- .../NullnessPropagationTest.java | 64 +++--- .../errorprone/fixes/SuggestedFixesTest.java | 8 +- .../AnnotationHasArgumentWithValueTest.java | 4 +- ...pileTimeConstantExpressionMatcherTest.java | 2 +- .../matchers/ConstructorOfClassTest.java | 2 +- .../matchers/JUnitMatchersTest.java | 4 +- .../matchers/MethodHasParametersTest.java | 2 +- .../matchers/NextStatementTest.java | 4 +- .../errorprone/refaster/BindingsTest.java | 4 +- .../errorprone/refaster/ChoiceTest.java | 8 +- .../errorprone/suppress/SuppressLintTest.java | 2 +- .../suppress/SuppressWarningsTest.java | 2 +- .../suppress/UnsuppressibleTest.java | 2 +- .../BugPatternFileGeneratorTest.java | 2 +- .../BugCheckerRefactoringTestHelperTest.java | 14 +- 228 files changed, 1271 insertions(+), 1271 deletions(-) diff --git a/check_api/src/test/java/com/google/errorprone/apply/AndroidImportOrganizerTest.java b/check_api/src/test/java/com/google/errorprone/apply/AndroidImportOrganizerTest.java index 434b54680d3..cb64f67de59 100644 --- a/check_api/src/test/java/com/google/errorprone/apply/AndroidImportOrganizerTest.java +++ b/check_api/src/test/java/com/google/errorprone/apply/AndroidImportOrganizerTest.java @@ -47,7 +47,7 @@ public class AndroidImportOrganizerTest { .collect(toImmutableList()); @Test - public void testStaticFirstOrdering() { + public void staticFirstOrdering() { AndroidImportOrganizer organizer = new AndroidImportOrganizer(StaticOrder.STATIC_FIRST); ImportOrganizer.OrganizedImports organized = organizer.organizeImports(IMPORTS); assertThat(organized.asImportBlock()) @@ -79,7 +79,7 @@ public void testStaticFirstOrdering() { } @Test - public void testStaticLastOrdering() { + public void staticLastOrdering() { AndroidImportOrganizer organizer = new AndroidImportOrganizer(StaticOrder.STATIC_LAST); ImportOrganizer.OrganizedImports organized = organizer.organizeImports(IMPORTS); assertThat(organized.asImportBlock()) diff --git a/check_api/src/test/java/com/google/errorprone/apply/BasicImportOrganizerTest.java b/check_api/src/test/java/com/google/errorprone/apply/BasicImportOrganizerTest.java index fc5b5d4c61d..c0b165e3f96 100644 --- a/check_api/src/test/java/com/google/errorprone/apply/BasicImportOrganizerTest.java +++ b/check_api/src/test/java/com/google/errorprone/apply/BasicImportOrganizerTest.java @@ -47,7 +47,7 @@ public class BasicImportOrganizerTest { .collect(toImmutableList()); @Test - public void testStaticFirstOrdering() { + public void staticFirstOrdering() { BasicImportOrganizer organizer = new BasicImportOrganizer(StaticOrder.STATIC_FIRST); ImportOrganizer.OrganizedImports organized = organizer.organizeImports(IMPORTS); assertThat(organized.asImportBlock()) @@ -69,7 +69,7 @@ public void testStaticFirstOrdering() { } @Test - public void testStaticLastOrdering() { + public void staticLastOrdering() { BasicImportOrganizer organizer = new BasicImportOrganizer(StaticOrder.STATIC_LAST); ImportOrganizer.OrganizedImports organized = organizer.organizeImports(IMPORTS); assertThat(organized.asImportBlock()) diff --git a/check_api/src/test/java/com/google/errorprone/apply/IdeaImportOrganizerTest.java b/check_api/src/test/java/com/google/errorprone/apply/IdeaImportOrganizerTest.java index 7fdf3c47f79..ff433217c6a 100644 --- a/check_api/src/test/java/com/google/errorprone/apply/IdeaImportOrganizerTest.java +++ b/check_api/src/test/java/com/google/errorprone/apply/IdeaImportOrganizerTest.java @@ -48,7 +48,7 @@ public class IdeaImportOrganizerTest { .collect(toImmutableList()); @Test - public void testStaticLastOrdering() { + public void staticLastOrdering() { IdeaImportOrganizer organizer = new IdeaImportOrganizer(); ImportOrganizer.OrganizedImports organized = organizer.organizeImports(IMPORTS); assertThat(organized.asImportBlock()) diff --git a/check_api/src/test/java/com/google/errorprone/dataflow/nullnesspropagation/NonNullAssumptionsTest.java b/check_api/src/test/java/com/google/errorprone/dataflow/nullnesspropagation/NonNullAssumptionsTest.java index bebb476c2e3..5c8161b7ca9 100644 --- a/check_api/src/test/java/com/google/errorprone/dataflow/nullnesspropagation/NonNullAssumptionsTest.java +++ b/check_api/src/test/java/com/google/errorprone/dataflow/nullnesspropagation/NonNullAssumptionsTest.java @@ -43,7 +43,7 @@ public class NonNullAssumptionsTest { @Test - public void testClassesWithNonNullStaticFields() throws Exception { + public void classesWithNonNullStaticFields() throws Exception { for (String classname : NullnessPropagationTransfer.CLASSES_WITH_NON_NULL_CONSTANTS) { int found = 0; Class clazz = loadClass(classname); @@ -59,7 +59,7 @@ public void testClassesWithNonNullStaticFields() throws Exception { } @Test - public void testNullImpliesTrueParameters() throws Exception { + public void nullImpliesTrueParameters() throws Exception { for (MemberName member : NullnessPropagationTransfer.NULL_IMPLIES_TRUE_PARAMETERS.keySet()) { ImmutableSet nullParameters = NullnessPropagationTransfer.NULL_IMPLIES_TRUE_PARAMETERS.get(member); @@ -86,7 +86,7 @@ public void testNullImpliesTrueParameters() throws Exception { } @Test - public void testRequiredNonNullParameters() throws Exception { + public void requiredNonNullParameters() throws Exception { for (MemberName member : NullnessPropagationTransfer.REQUIRED_NON_NULL_PARAMETERS.keySet()) { ImmutableSet nonNullParameters = NullnessPropagationTransfer.REQUIRED_NON_NULL_PARAMETERS.get(member); @@ -116,7 +116,7 @@ public void testRequiredNonNullParameters() throws Exception { } @Test - public void testEqualsParameters() throws Exception { + public void equalsParameters() throws Exception { int found = 0; for (Method method : loadClass("java.lang.Object").getMethods()) { if (!method.getName().equals("equals")) { diff --git a/check_api/src/test/java/com/google/errorprone/dataflow/nullnesspropagation/NullnessTest.java b/check_api/src/test/java/com/google/errorprone/dataflow/nullnesspropagation/NullnessTest.java index 87e9528349d..3cef2b7fe08 100644 --- a/check_api/src/test/java/com/google/errorprone/dataflow/nullnesspropagation/NullnessTest.java +++ b/check_api/src/test/java/com/google/errorprone/dataflow/nullnesspropagation/NullnessTest.java @@ -34,7 +34,7 @@ @RunWith(JUnit4.class) public class NullnessTest { @Test - public void testLeastUpperBound() { + public void leastUpperBound() { assertThat(NULLABLE.leastUpperBound(NULLABLE)).isEqualTo(NULLABLE); assertThat(NULLABLE.leastUpperBound(NULL)).isEqualTo(NULLABLE); assertThat(NULLABLE.leastUpperBound(NONNULL)).isEqualTo(NULLABLE); @@ -57,7 +57,7 @@ public void testLeastUpperBound() { } @Test - public void testGreatestLowerBound() { + public void greatestLowerBound() { assertThat(NULLABLE.greatestLowerBound(NULLABLE)).isEqualTo(NULLABLE); assertThat(NULLABLE.greatestLowerBound(NULL)).isEqualTo(NULL); assertThat(NULLABLE.greatestLowerBound(NONNULL)).isEqualTo(NONNULL); @@ -80,7 +80,7 @@ public void testGreatestLowerBound() { } @Test - public void testDeducedValueWhenNotEqual() { + public void deducedValueWhenNotEqual() { assertThat(NULLABLE.deducedValueWhenNotEqual()).isEqualTo(NULLABLE); assertThat(NULL.deducedValueWhenNotEqual()).isEqualTo(NONNULL); assertThat(NONNULL.deducedValueWhenNotEqual()).isEqualTo(NULLABLE); diff --git a/check_api/src/test/java/com/google/errorprone/fixes/BranchedSuggestedFixesTest.java b/check_api/src/test/java/com/google/errorprone/fixes/BranchedSuggestedFixesTest.java index 6539776ad6d..c00cd9ddd97 100644 --- a/check_api/src/test/java/com/google/errorprone/fixes/BranchedSuggestedFixesTest.java +++ b/check_api/src/test/java/com/google/errorprone/fixes/BranchedSuggestedFixesTest.java @@ -27,7 +27,7 @@ public class BranchedSuggestedFixesTest { @Test - public void testCombinesBranchWithFirst() { + public void combinesBranchWithFirst() { ImmutableList fixes = BranchedSuggestedFixes.builder() .startWith(SuggestedFix.builder().addImport("A").build()) @@ -43,7 +43,7 @@ public void testCombinesBranchWithFirst() { } @Test - public void testEmptyIfNoProgress() { + public void emptyIfNoProgress() { ImmutableList fixes = BranchedSuggestedFixes.builder() .startWith(SuggestedFix.builder().addImport("A").build()) @@ -55,7 +55,7 @@ public void testEmptyIfNoProgress() { } @Test - public void testEmptyIfResumedProgress() { + public void emptyIfResumedProgress() { ImmutableList fixes = BranchedSuggestedFixes.builder() .startWith(SuggestedFix.builder().addImport("A").build()) diff --git a/check_api/src/test/java/com/google/errorprone/matchers/DescriptionTest.java b/check_api/src/test/java/com/google/errorprone/matchers/DescriptionTest.java index 472fe584879..c3338a12a93 100644 --- a/check_api/src/test/java/com/google/errorprone/matchers/DescriptionTest.java +++ b/check_api/src/test/java/com/google/errorprone/matchers/DescriptionTest.java @@ -83,7 +83,7 @@ Description getDescription() { private static final String URL = " (see https://errorprone.info/bugpattern/DeadException)"; @Test - public void testDescriptionFromBugPattern() { + public void descriptionFromBugPattern() { Description description = new MyChecker().getDescription(); assertThat(description.checkName).isEqualTo("DeadException"); assertThat(description.getMessageWithoutCheckName()) @@ -93,7 +93,7 @@ public void testDescriptionFromBugPattern() { } @Test - public void testCustomDescription() { + public void customDescription() { Description description = new MyChecker() .buildDescription((DiagnosticPosition) new MockTree()) @@ -117,7 +117,7 @@ Description getDescription() { } @Test - public void testCustomLink() { + public void customLink() { Description description = new CustomLinkChecker() .buildDescription((DiagnosticPosition) new MockTree()) @@ -128,7 +128,7 @@ public void testCustomLink() { } @Test - public void testCustomLinkOverride() { + public void customLinkOverride() { Description description = new CustomLinkChecker() .buildDescription((DiagnosticPosition) new MockTree()) diff --git a/core/src/test/java/com/google/errorprone/DiagnosticKindTest.java b/core/src/test/java/com/google/errorprone/DiagnosticKindTest.java index 2cb07c120ce..b7566daeb4c 100644 --- a/core/src/test/java/com/google/errorprone/DiagnosticKindTest.java +++ b/core/src/test/java/com/google/errorprone/DiagnosticKindTest.java @@ -70,7 +70,7 @@ public Description matchReturn(ReturnTree tree, VisitorState state) { } @Test - public void testError() { + public void error() { compilerBuilder.report(ScannerSupplier.fromBugCheckerClasses(ErrorChecker.class)); ErrorProneTestCompiler compiler = compilerBuilder.build(); Result result = compiler.compile(Arrays.asList(forSourceLines("Test.java", TEST_CODE))); @@ -93,7 +93,7 @@ public Description matchReturn(ReturnTree tree, VisitorState state) { } @Test - public void testWarning() { + public void warning() { compilerBuilder.report(ScannerSupplier.fromBugCheckerClasses(WarningChecker.class)); ErrorProneTestCompiler compiler = compilerBuilder.build(); Result result = compiler.compile(Arrays.asList(forSourceLines("Test.java", TEST_CODE))); @@ -117,7 +117,7 @@ public Description matchReturn(ReturnTree tree, VisitorState state) { } @Test - public void testSuggestion() { + public void suggestion() { compilerBuilder.report(ScannerSupplier.fromBugCheckerClasses(SuggestionChecker.class)); ErrorProneTestCompiler compiler = compilerBuilder.build(); Result result = compiler.compile(Arrays.asList(forSourceLines("Test.java", TEST_CODE))); diff --git a/core/src/test/java/com/google/errorprone/ErrorProneJavaCompilerTest.java b/core/src/test/java/com/google/errorprone/ErrorProneJavaCompilerTest.java index 556d4b655f6..42f592a1f2c 100644 --- a/core/src/test/java/com/google/errorprone/ErrorProneJavaCompilerTest.java +++ b/core/src/test/java/com/google/errorprone/ErrorProneJavaCompilerTest.java @@ -76,7 +76,7 @@ public class ErrorProneJavaCompilerTest { @Rule public final TemporaryFolder tempDir = new TemporaryFolder(); @Test - public void testIsSupportedOption() { + public void isSupportedOption() { ErrorProneJavaCompiler compiler = new ErrorProneJavaCompiler(); // javac options should be passed through @@ -94,7 +94,7 @@ public void testIsSupportedOption() { interface JavaFileObjectDiagnosticListener extends DiagnosticListener {} @Test - public void testGetStandardJavaFileManager() { + public void getStandardJavaFileManager() { JavaCompiler mockCompiler = mock(JavaCompiler.class); ErrorProneJavaCompiler compiler = new ErrorProneJavaCompiler(mockCompiler); @@ -106,7 +106,7 @@ public void testGetStandardJavaFileManager() { } @Test - public void testRun() { + public void run() { JavaCompiler mockCompiler = mock(JavaCompiler.class); ErrorProneJavaCompiler compiler = new ErrorProneJavaCompiler(mockCompiler); @@ -120,7 +120,7 @@ public void testRun() { } @Test - public void testSourceVersion() { + public void sourceVersion() { ErrorProneJavaCompiler compiler = new ErrorProneJavaCompiler(); assertThat(compiler.getSourceVersions()).contains(SourceVersion.latest()); assertThat(compiler.getSourceVersions()).doesNotContain(SourceVersion.RELEASE_5); @@ -140,7 +140,7 @@ public void fileWithErrorIntegrationTest() { } @Test - public void testWithDisabledCheck() { + public void withDisabledCheck() { CompilationResult result = doCompile( Arrays.asList("bugpatterns/testdata/SelfAssignmentPositiveCases1.java"), @@ -157,7 +157,7 @@ public void testWithDisabledCheck() { } @Test - public void testWithCheckPromotedToError() { + public void withCheckPromotedToError() { CompilationResult result = doCompile( Arrays.asList("bugpatterns/testdata/WaitNotInLoopPositiveCases.java"), @@ -180,7 +180,7 @@ public void testWithCheckPromotedToError() { } @Test - public void testWithCheckDemotedToWarning() { + public void withCheckDemotedToWarning() { CompilationResult result = doCompile( Arrays.asList("bugpatterns/testdata/SelfAssignmentPositiveCases1.java"), @@ -203,7 +203,7 @@ public void testWithCheckDemotedToWarning() { } @Test - public void testWithNonDefaultCheckOn() { + public void withNonDefaultCheckOn() { CompilationResult result = doCompile( Arrays.asList("bugpatterns/testdata/EmptyIfStatementPositiveCases.java"), @@ -225,7 +225,7 @@ public void testWithNonDefaultCheckOn() { } @Test - public void testBadFlagThrowsException() { + public void badFlagThrowsException() { try { doCompile( Arrays.asList("bugpatterns/testdata/EmptyIfStatementPositiveCases.java"), @@ -246,7 +246,7 @@ public void testBadFlagThrowsException() { public static class UnsuppressibleArrayEquals extends ArrayEquals {} @Test - public void testCantDisableNonDisableableCheck() { + public void cantDisableNonDisableableCheck() { try { doCompile( Arrays.asList("bugpatterns/testdata/ArrayEqualsPositiveCases.java"), @@ -259,7 +259,7 @@ public void testCantDisableNonDisableableCheck() { } @Test - public void testWithCustomCheckPositive() { + public void withCustomCheckPositive() { CompilationResult result = doCompile( Arrays.asList("bugpatterns/testdata/BadShiftAmountPositiveCases.java"), @@ -273,7 +273,7 @@ public void testWithCustomCheckPositive() { } @Test - public void testWithCustomCheckNegative() { + public void withCustomCheckNegative() { CompilationResult result = doCompile( Arrays.asList("bugpatterns/testdata/SelfAssignmentPositiveCases1.java"), @@ -284,7 +284,7 @@ public void testWithCustomCheckNegative() { } @Test - public void testSeverityResetsAfterOverride() throws IOException { + public void severityResetsAfterOverride() throws IOException { DiagnosticTestHelper diagnosticHelper = new DiagnosticTestHelper(); ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); PrintWriter printWriter = new PrintWriter(new OutputStreamWriter(outputStream, UTF_8), true); @@ -327,7 +327,7 @@ public void testSeverityResetsAfterOverride() throws IOException { } @Test - public void testMaturityResetsAfterOverride() throws Exception { + public void maturityResetsAfterOverride() throws Exception { DiagnosticTestHelper diagnosticHelper = new DiagnosticTestHelper(); ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); PrintWriter printWriter = new PrintWriter(new OutputStreamWriter(outputStream, UTF_8), true); @@ -373,7 +373,7 @@ public Description matchClass(ClassTree tree, VisitorState state) { } @Test - public void testFixGeneratedConstructor() { + public void fixGeneratedConstructor() { CompilationResult result = doCompile( Arrays.asList("testdata/DeleteGeneratedConstructorTestCase.java"), @@ -388,7 +388,7 @@ public void testFixGeneratedConstructor() { } @Test - public void testWithExcludedPaths() { + public void withExcludedPaths() { CompilationResult result = doCompile( Arrays.asList("bugpatterns/testdata/SelfAssignmentPositiveCases1.java"), diff --git a/core/src/test/java/com/google/errorprone/SubContextTest.java b/core/src/test/java/com/google/errorprone/SubContextTest.java index 66e6db5b260..c5939ae8082 100644 --- a/core/src/test/java/com/google/errorprone/SubContextTest.java +++ b/core/src/test/java/com/google/errorprone/SubContextTest.java @@ -43,7 +43,7 @@ enum Enum2 { } @Test - public void testOverlay() { + public void overlay() { Context base = new Context(); base.put(KEY1, "key1"); base.put(Enum1.class, Enum1.VALUE1); @@ -61,7 +61,7 @@ public void testOverlay() { } @Test - public void testOverride() { + public void override() { Context base = new Context(); base.put(KEY1, "key1"); base.put(Enum1.class, Enum1.VALUE1); diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/ArrayEqualsTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/ArrayEqualsTest.java index c66ae61e131..eac2c3c9a48 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/ArrayEqualsTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/ArrayEqualsTest.java @@ -31,22 +31,22 @@ public class ArrayEqualsTest { CompilationTestHelper.newInstance(ArrayEquals.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.addSourceFile("ArrayEqualsPositiveCases.java").doTest(); } @Test - public void testJava7PositiveCase() { + public void java7PositiveCase() { compilationHelper.addSourceFile("ArrayEqualsPositiveCases2.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("ArrayEqualsNegativeCases.java").doTest(); } @Test - public void testJava7NegativeCase() { + public void java7NegativeCase() { compilationHelper.addSourceFile("ArrayEqualsNegativeCases2.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/ArrayFillIncompatibleTypeTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/ArrayFillIncompatibleTypeTest.java index 7e18b6bde93..21b00df1dd6 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/ArrayFillIncompatibleTypeTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/ArrayFillIncompatibleTypeTest.java @@ -32,7 +32,7 @@ public class ArrayFillIncompatibleTypeTest { CompilationTestHelper.newInstance(ArrayFillIncompatibleType.class, getClass()); @Test - public void testPrimitiveBoxingIntoObject() { + public void primitiveBoxingIntoObject() { assumeFalse(RuntimeVersion.isAtLeast12()); // https://bugs.openjdk.java.net/browse/JDK-8028563 compilationHelper .addSourceLines( @@ -48,7 +48,7 @@ public void testPrimitiveBoxingIntoObject() { } @Test - public void testPositive() { + public void positive() { compilationHelper .addSourceLines( "Test.java", @@ -67,7 +67,7 @@ public void testPositive() { } @Test - public void testTernary() { + public void ternary() { compilationHelper .addSourceLines( "Test.java", @@ -85,7 +85,7 @@ public void testTernary() { } @Test - public void testBoxing() { + public void boxing() { compilationHelper .addSourceLines( "Test.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/ArrayHashCodeTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/ArrayHashCodeTest.java index bb06b029dc0..ddc47d37ae8 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/ArrayHashCodeTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/ArrayHashCodeTest.java @@ -31,18 +31,18 @@ public class ArrayHashCodeTest { CompilationTestHelper.newInstance(ArrayHashCode.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.addSourceFile("ArrayHashCodePositiveCases.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("ArrayHashCodeNegativeCases.java").doTest(); } /** Tests java.util.Objects hashCode methods, which are only in JDK 7 and above. */ @Test - public void testJava7NegativeCase() { + public void java7NegativeCase() { compilationHelper.addSourceFile("ArrayHashCodeNegativeCases2.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/ArrayToStringTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/ArrayToStringTest.java index dc1ffbe5378..972a9c852c8 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/ArrayToStringTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/ArrayToStringTest.java @@ -33,12 +33,12 @@ public class ArrayToStringTest { BugCheckerRefactoringTestHelper.newInstance(ArrayToString.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.addSourceFile("ArrayToStringPositiveCases.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("ArrayToStringNegativeCases.java").doTest(); } @@ -167,22 +167,22 @@ public void throwableToString() { } @Test - public void testPositiveCompoundAssignment() { + public void positiveCompoundAssignment() { compilationHelper.addSourceFile("ArrayToStringCompoundAssignmentPositiveCases.java").doTest(); } @Test - public void testNegativeCompoundAssignment() { + public void negativeCompoundAssignment() { compilationHelper.addSourceFile("ArrayToStringCompoundAssignmentNegativeCases.java").doTest(); } @Test - public void testPositiveConcat() { + public void positiveConcat() { compilationHelper.addSourceFile("ArrayToStringConcatenationPositiveCases.java").doTest(); } @Test - public void testNegativeConcat() { + public void negativeConcat() { compilationHelper.addSourceFile("ArrayToStringConcatenationNegativeCases.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/AssertFalseTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/AssertFalseTest.java index f3da306b7df..aa953941a35 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/AssertFalseTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/AssertFalseTest.java @@ -31,12 +31,12 @@ public class AssertFalseTest { CompilationTestHelper.newInstance(AssertFalse.class, getClass()); @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("AssertFalseNegativeCases.java").doTest(); } @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.addSourceFile("AssertFalsePositiveCases.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/AsyncFunctionReturnsNullTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/AsyncFunctionReturnsNullTest.java index aa5723c0886..77225e16849 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/AsyncFunctionReturnsNullTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/AsyncFunctionReturnsNullTest.java @@ -28,12 +28,12 @@ public class AsyncFunctionReturnsNullTest { CompilationTestHelper.newInstance(AsyncFunctionReturnsNull.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.addSourceFile("AsyncFunctionReturnsNullPositiveCases.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("AsyncFunctionReturnsNullNegativeCases.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/AutoValueFinalMethodsTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/AutoValueFinalMethodsTest.java index 9ba09dac0b4..2d0dd2b9454 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/AutoValueFinalMethodsTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/AutoValueFinalMethodsTest.java @@ -35,7 +35,7 @@ public class AutoValueFinalMethodsTest { CompilationTestHelper.newInstance(AutoValueFinalMethods.class, getClass()); @Test - public void testFinalAdditionToEqHcTs() { + public void finalAdditionToEqHcTs() { testHelper .addInputLines( "in/Test.java", @@ -87,7 +87,7 @@ public void testFinalAdditionToEqHcTs() { } @Test - public void testNegativeCases() { + public void negativeCases() { compilationHelper .addSourceLines( "out/Test.java", @@ -125,7 +125,7 @@ public void testNegativeCases() { } @Test - public void testAbstractMemoizedNegativeCase() { + public void abstractMemoizedNegativeCase() { compilationHelper .addSourceLines( "out/Test.java", @@ -144,7 +144,7 @@ public void testAbstractMemoizedNegativeCase() { } @Test - public void testDiagnosticString() { + public void diagnosticString() { compilationHelper .addSourceLines( "out/Test.java", @@ -165,7 +165,7 @@ public void testDiagnosticString() { } @Test - public void testDiagnosticStringWithMultipleMethodMatches() { + public void diagnosticStringWithMultipleMethodMatches() { compilationHelper .addSourceLines( "out/Test.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/BadComparableTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/BadComparableTest.java index ef513664b39..5a8007066fb 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/BadComparableTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/BadComparableTest.java @@ -30,12 +30,12 @@ public class BadComparableTest { CompilationTestHelper.newInstance(BadComparable.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.addSourceFile("BadComparablePositiveCases.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("BadComparableNegativeCases.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/BadImportTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/BadImportTest.java index b093882cab2..0a8b57605ee 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/BadImportTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/BadImportTest.java @@ -45,7 +45,7 @@ public void positive_static_simpleCase() { } @Test - public void testMsg() { + public void msg() { compilationTestHelper .addSourceLines( "Test.java", @@ -206,7 +206,7 @@ public void negative_badImportIsTopLevelClass() { } @Test - public void test_nested_fixes() { + public void nestedFixes() { refactoringTestHelper .addInput("BadImportPositiveCases.java") .addOutput("BadImportPositiveCases_expected.java") @@ -214,7 +214,7 @@ public void test_nested_fixes() { } @Test - public void test_nested_typeUseAnnotation() { + public void nestedTypeUseAnnotation() { refactoringTestHelper .addInputLines( "input/TypeUseAnnotation.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/BadShiftAmountTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/BadShiftAmountTest.java index 7c3f9cca093..1742822f515 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/BadShiftAmountTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/BadShiftAmountTest.java @@ -31,12 +31,12 @@ public class BadShiftAmountTest { CompilationTestHelper.newInstance(BadShiftAmount.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.addSourceFile("BadShiftAmountPositiveCases.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("BadShiftAmountNegativeCases.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/BanJNDITest.java b/core/src/test/java/com/google/errorprone/bugpatterns/BanJNDITest.java index e89b1bd4e93..6df39d6f09a 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/BanJNDITest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/BanJNDITest.java @@ -32,17 +32,17 @@ public class BanJNDITest { BugCheckerRefactoringTestHelper.newInstance(BanJNDI.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.addSourceFile("BanJNDIPositiveCases.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("BanJNDINegativeCases.java").doTest(); } @Test - public void testNegativeCaseUnchanged() { + public void negativeCaseUnchanged() { refactoringHelper .addInput("BanJNDINegativeCases.java") .expectUnchanged() diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/BanSerializableReadTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/BanSerializableReadTest.java index ba025ec577a..26cc3aeaa4f 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/BanSerializableReadTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/BanSerializableReadTest.java @@ -32,17 +32,17 @@ public class BanSerializableReadTest { BugCheckerRefactoringTestHelper.newInstance(BanSerializableRead.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.addSourceFile("BanSerializableReadPositiveCases.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("BanSerializableReadNegativeCases.java").doTest(); } @Test - public void testNegativeCaseUnchanged() { + public void negativeCaseUnchanged() { refactoringHelper .addInput("BanSerializableReadNegativeCases.java") .expectUnchanged() diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/BareDotMetacharacterTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/BareDotMetacharacterTest.java index c40002e2834..d760c2110db 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/BareDotMetacharacterTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/BareDotMetacharacterTest.java @@ -29,7 +29,7 @@ public class BareDotMetacharacterTest { BugCheckerRefactoringTestHelper.newInstance(BareDotMetacharacter.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { refactoringHelper .addInputLines( "Test.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/BoxedPrimitiveConstructorTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/BoxedPrimitiveConstructorTest.java index 4be83ea81b0..49618cc9c44 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/BoxedPrimitiveConstructorTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/BoxedPrimitiveConstructorTest.java @@ -208,7 +208,7 @@ public void compareTo() { } @Test - public void testHashCode() { + public void hashCodeRefactoring() { compilationHelper .addSourceLines( "Test.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/ByteBufferBackingArrayTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/ByteBufferBackingArrayTest.java index 3aa276bec8e..5fee65ea4e3 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/ByteBufferBackingArrayTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/ByteBufferBackingArrayTest.java @@ -29,12 +29,12 @@ public class ByteBufferBackingArrayTest { CompilationTestHelper.newInstance(ByteBufferBackingArray.class, getClass()); @Test - public void testPositiveCases() { + public void positiveCases() { compilationHelper.addSourceFile("ByteBufferBackingArrayPositiveCases.java").doTest(); } @Test - public void testNegativeCases() { + public void negativeCases() { compilationHelper.addSourceFile("ByteBufferBackingArrayNegativeCases.java").doTest(); } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/CannotMockFinalClassTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/CannotMockFinalClassTest.java index a075f9eefcd..dd6264f25db 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/CannotMockFinalClassTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/CannotMockFinalClassTest.java @@ -32,17 +32,17 @@ public class CannotMockFinalClassTest { CompilationTestHelper.newInstance(CannotMockFinalClass.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.addSourceFile("CannotMockFinalClassPositiveCases.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("CannotMockFinalClassNegativeCases.java").doTest(); } @Test - public void testNegativeCase2() { + public void negativeCase2() { compilationHelper.addSourceFile("CannotMockFinalClassNegativeCases2.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/CatchFailTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/CatchFailTest.java index b569b624985..2af18a1efd3 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/CatchFailTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/CatchFailTest.java @@ -253,7 +253,7 @@ public void failVariations() { } @Test - public void testExpected() { + public void expected() { testHelper .addInputLines( "in/Foo.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/ChainedAssertionLosesContextTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/ChainedAssertionLosesContextTest.java index 61854819928..19adf35a399 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/ChainedAssertionLosesContextTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/ChainedAssertionLosesContextTest.java @@ -30,12 +30,12 @@ public class ChainedAssertionLosesContextTest { CompilationTestHelper.newInstance(ChainedAssertionLosesContext.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.addSourceFile("ChainedAssertionLosesContextPositiveCases.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("ChainedAssertionLosesContextNegativeCases.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/ChainingConstructorIgnoresParameterTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/ChainingConstructorIgnoresParameterTest.java index 9a9efee90d6..0d41839cdb8 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/ChainingConstructorIgnoresParameterTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/ChainingConstructorIgnoresParameterTest.java @@ -30,14 +30,14 @@ public class ChainingConstructorIgnoresParameterTest { CompilationTestHelper.newInstance(ChainingConstructorIgnoresParameter.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper .addSourceFile("ChainingConstructorIgnoresParameterPositiveCases.java") .doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper .addSourceFile("ChainingConstructorIgnoresParameterNegativeCases.java") .doTest(); diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/CheckReturnValueTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/CheckReturnValueTest.java index 35d99d4cf05..d5e6dc00945 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/CheckReturnValueTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/CheckReturnValueTest.java @@ -46,12 +46,12 @@ public class CheckReturnValueTest { @Rule public TemporaryFolder temporaryFolder = new TemporaryFolder(); @Test - public void testPositiveCases() { + public void positiveCases() { compilationHelper.addSourceFile("CheckReturnValuePositiveCases.java").doTest(); } @Test - public void testCustomCheckReturnValueAnnotation() { + public void customCheckReturnValueAnnotation() { compilationHelper .addSourceLines( "foo/bar/CheckReturnValue.java", @@ -75,7 +75,7 @@ public void testCustomCheckReturnValueAnnotation() { } @Test - public void testCustomCanIgnoreReturnValueAnnotation() { + public void customCanIgnoreReturnValueAnnotation() { compilationHelper .addSourceLines( "foo/bar/CanIgnoreReturnValue.java", @@ -99,12 +99,12 @@ public void testCustomCanIgnoreReturnValueAnnotation() { } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("CheckReturnValueNegativeCases.java").doTest(); } @Test - public void testPackageAnnotation() { + public void packageAnnotation() { compilationHelper .addSourceLines( "package-info.java", // @@ -128,7 +128,7 @@ public void testPackageAnnotation() { } @Test - public void testClassAnnotation() { + public void classAnnotation() { compilationHelper .addSourceLines( "lib/Lib.java", @@ -150,7 +150,7 @@ public void testClassAnnotation() { // Don't match void-returning methods in packages with @CRV @Test - public void testVoidReturningMethodInAnnotatedPackage() { + public void voidReturningMethodInAnnotatedPackage() { compilationHelper .addSourceLines( "package-info.java", // @@ -205,7 +205,7 @@ public void badCRVOnPseudoProcedure() { } @Test - public void testPackageAnnotationButCanIgnoreReturnValue() { + public void packageAnnotationButCanIgnoreReturnValue() { compilationHelper .addSourceLines( "package-info.java", @@ -229,7 +229,7 @@ public void testPackageAnnotationButCanIgnoreReturnValue() { } @Test - public void testClassAnnotationButCanIgnoreReturnValue() { + public void classAnnotationButCanIgnoreReturnValue() { compilationHelper .addSourceLines( "lib/Lib.java", @@ -265,7 +265,7 @@ public void badCanIgnoreReturnValueOnProcedure() { } @Test - public void testNestedClassAnnotation() { + public void nestedClassAnnotation() { compilationHelper .addSourceLines( "lib/Lib.java", @@ -290,7 +290,7 @@ public void testNestedClassAnnotation() { } @Test - public void testNestedClassWithCanIgnoreAnnotation() { + public void nestedClassWithCanIgnoreAnnotation() { compilationHelper .addSourceLines( "lib/Lib.java", @@ -315,7 +315,7 @@ public void testNestedClassWithCanIgnoreAnnotation() { } @Test - public void testPackageWithCanIgnoreAnnotation() { + public void packageWithCanIgnoreAnnotation() { compilationHelper .addSourceLines( "package-info.java", @@ -368,7 +368,7 @@ public void errorBothMethod() { // Don't match Void-returning methods in packages with @CRV @Test - public void testJavaLangVoidReturningMethodInAnnotatedPackage() { + public void javaLangVoidReturningMethodInAnnotatedPackage() { compilationHelper .addSourceLines( "package-info.java", @@ -653,7 +653,7 @@ public void allMethods_withExternallyConfiguredIgnoreList() { } @Test - public void testPackagesRule() { + public void packagesRule() { compilationHelperWithPackagePatterns("java.util") .addSourceLines( "Test.java", @@ -671,7 +671,7 @@ public void testPackagesRule() { } @Test - public void testPackagesRule_negativePattern() { + public void packagesRule_negativePattern() { compilationHelperWithPackagePatterns("java.util", "-java.util.regex") .addSourceLines( "Test.java", @@ -688,7 +688,7 @@ public void testPackagesRule_negativePattern() { } @Test - public void testPackagesRule_negativePattern_doesNotMakeOptional() { + public void packagesRule_negativePattern_doesNotMakeOptional() { // A negative pattern just makes the packages rule itself not apply to that package and its // subpackages if it otherwise would because of a positive pattern on a superpackage. It doesn't // make APIs in that package CIRV. @@ -742,7 +742,7 @@ public void refactoringAssignsToOriginalBasedOnSubstitutedTypes() { } @Test - public void testSuggestCanIgnoreReturnValueForMethodInvocation() { + public void suggestCanIgnoreReturnValueForMethodInvocation() { refactoringHelper .addInputLines( "Test.java", @@ -774,7 +774,7 @@ public void testSuggestCanIgnoreReturnValueForMethodInvocation() { } @Test - public void testSuggestCanIgnoreReturnValueForMethodReference() { + public void suggestCanIgnoreReturnValueForMethodReference() { refactoringHelper .addInputLines( "Test.java", @@ -802,7 +802,7 @@ public void testSuggestCanIgnoreReturnValueForMethodReference() { } @Test - public void testSuggestCanIgnoreReturnValueForConstructor() { + public void suggestCanIgnoreReturnValueForConstructor() { refactoringHelper .addInputLines( "Test.java", @@ -830,7 +830,7 @@ public void testSuggestCanIgnoreReturnValueForConstructor() { } @Test - public void testSuggestCanIgnoreReturnValueAndRemoveCheckReturnValue() { + public void suggestCanIgnoreReturnValueAndRemoveCheckReturnValue() { refactoringHelper .addInputLines( "Test.java", @@ -861,7 +861,7 @@ public void testSuggestCanIgnoreReturnValueAndRemoveCheckReturnValue() { } @Test - public void testDoesNotSuggestCanIgnoreReturnValueForOtherFile() { + public void doesNotSuggestCanIgnoreReturnValueForOtherFile() { refactoringHelper .addInputLines( "Lib.java", @@ -896,7 +896,7 @@ public void testDoesNotSuggestCanIgnoreReturnValueForOtherFile() { } @Test - public void testSuggestsVarUnusedForConstructor() { + public void suggestsVarUnusedForConstructor() { refactoringHelper .addInputLines( "Test.java", @@ -918,7 +918,7 @@ public void testSuggestsVarUnusedForConstructor() { } @Test - public void testSuggestsVarUnused2() { + public void suggestsVarUnused2() { refactoringHelper .addInputLines( "Lib.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/ClassCanBeStaticTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/ClassCanBeStaticTest.java index 3f242589802..b34625358b2 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/ClassCanBeStaticTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/ClassCanBeStaticTest.java @@ -29,22 +29,22 @@ public class ClassCanBeStaticTest { CompilationTestHelper.newInstance(ClassCanBeStatic.class, getClass()); @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("ClassCanBeStaticNegativeCases.java").doTest(); } @Test - public void testPositiveCase1() { + public void positiveCase1() { compilationHelper.addSourceFile("ClassCanBeStaticPositiveCase1.java").doTest(); } @Test - public void testPositiveCase2() { + public void positiveCase2() { compilationHelper.addSourceFile("ClassCanBeStaticPositiveCase2.java").doTest(); } @Test - public void testPositiveCase3() { + public void positiveCase3() { compilationHelper.addSourceFile("ClassCanBeStaticPositiveCase3.java").doTest(); } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/CollectionToArraySafeParameterTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/CollectionToArraySafeParameterTest.java index 135ec8cccdb..e467bfd267a 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/CollectionToArraySafeParameterTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/CollectionToArraySafeParameterTest.java @@ -29,12 +29,12 @@ public class CollectionToArraySafeParameterTest { CompilationTestHelper.newInstance(CollectionToArraySafeParameter.class, getClass()); @Test - public void testPositiveCases() { + public void positiveCases() { compilationHelper.addSourceFile("CollectionToArraySafeParameterPositiveCases.java").doTest(); } @Test - public void testNegativeCases() { + public void negativeCases() { compilationHelper.addSourceFile("CollectionToArraySafeParameterNegativeCases.java").doTest(); } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/CollectorShouldNotUseStateTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/CollectorShouldNotUseStateTest.java index a0145ea3585..fa452be5ca0 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/CollectorShouldNotUseStateTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/CollectorShouldNotUseStateTest.java @@ -29,12 +29,12 @@ public class CollectorShouldNotUseStateTest { CompilationTestHelper.newInstance(CollectorShouldNotUseState.class, getClass()); @Test - public void testPositiveCases() { + public void positiveCases() { compilationHelper.addSourceFile("CollectorShouldNotUseStatePositiveCases.java").doTest(); } @Test - public void testNegativeCases() { + public void negativeCases() { compilationHelper.addSourceFile("CollectorShouldNotUseStateNegativeCases.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/ComparableTypeTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/ComparableTypeTest.java index 4cee51bc2c7..30542b68746 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/ComparableTypeTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/ComparableTypeTest.java @@ -27,12 +27,12 @@ public class ComparableTypeTest { CompilationTestHelper.newInstance(ComparableType.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.addSourceFile("ComparableTypePositiveCases.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("ComparableTypeNegativeCases.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/CompareToZeroTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/CompareToZeroTest.java index f24d0f69a8f..7a54aa2e92c 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/CompareToZeroTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/CompareToZeroTest.java @@ -89,7 +89,7 @@ public void positiveAddition() { } @Test - public void testStringConcat_ignored() { + public void stringConcat_ignored() { compilationHelper .addSourceLines( "Test.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/ComparisonContractViolatedTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/ComparisonContractViolatedTest.java index 5c598a9c419..548ad97f064 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/ComparisonContractViolatedTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/ComparisonContractViolatedTest.java @@ -30,12 +30,12 @@ public class ComparisonContractViolatedTest { CompilationTestHelper.newInstance(ComparisonContractViolated.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.addSourceFile("ComparisonContractViolatedPositiveCases.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("ComparisonContractViolatedNegativeCases.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/ComparisonOutOfRangeTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/ComparisonOutOfRangeTest.java index de71158991c..75feb4d5717 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/ComparisonOutOfRangeTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/ComparisonOutOfRangeTest.java @@ -31,12 +31,12 @@ public class ComparisonOutOfRangeTest { CompilationTestHelper.newInstance(ComparisonOutOfRange.class, getClass()); @Test - public void testPositiveCases() { + public void positiveCases() { compilationHelper.addSourceFile("ComparisonOutOfRangePositiveCases.java").doTest(); } @Test - public void testNegativeCases() { + public void negativeCases() { compilationHelper.addSourceFile("ComparisonOutOfRangeNegativeCases.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/CompileTimeConstantCheckerTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/CompileTimeConstantCheckerTest.java index 32b249fc1ae..6f27f96a9aa 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/CompileTimeConstantCheckerTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/CompileTimeConstantCheckerTest.java @@ -29,7 +29,7 @@ public class CompileTimeConstantCheckerTest { CompilationTestHelper.newInstance(CompileTimeConstantChecker.class, getClass()); @Test - public void testMatches_fieldAccessFailsWithNonConstant() { + public void matches_fieldAccessFailsWithNonConstant() { compilationHelper .addSourceLines( "test/CompileTimeConstantTestCase.java", @@ -44,7 +44,7 @@ public void testMatches_fieldAccessFailsWithNonConstant() { } @Test - public void testMatches_fieldAccessFailsWithNonConstantExpression() { + public void matches_fieldAccessFailsWithNonConstantExpression() { compilationHelper .addSourceLines( "test/CompileTimeConstantTestCase.java", @@ -59,7 +59,7 @@ public void testMatches_fieldAccessFailsWithNonConstantExpression() { } @Test - public void testMatches_fieldAccessSucceedsWithLiteral() { + public void matches_fieldAccessSucceedsWithLiteral() { compilationHelper .addSourceLines( "test/CompileTimeConstantTestCase.java", @@ -73,7 +73,7 @@ public void testMatches_fieldAccessSucceedsWithLiteral() { } @Test - public void testMatches_fieldAccessSucceedsWithStaticFinal() { + public void matches_fieldAccessSucceedsWithStaticFinal() { compilationHelper .addSourceLines( "test/CompileTimeConstantTestCase.java", @@ -88,7 +88,7 @@ public void testMatches_fieldAccessSucceedsWithStaticFinal() { } @Test - public void testMatches_fieldAccessSucceedsWithConstantConcatenation() { + public void matches_fieldAccessSucceedsWithConstantConcatenation() { compilationHelper .addSourceLines( "test/CompileTimeConstantTestCase.java", @@ -103,7 +103,7 @@ public void testMatches_fieldAccessSucceedsWithConstantConcatenation() { } @Test - public void testMatches_identCallFailsWithNonConstant() { + public void matches_identCallFailsWithNonConstant() { compilationHelper .addSourceLines( "test/CompileTimeConstantTestCase.java", @@ -118,7 +118,7 @@ public void testMatches_identCallFailsWithNonConstant() { } @Test - public void testMatches_identCallSucceedsWithLiteral() { + public void matches_identCallSucceedsWithLiteral() { compilationHelper .addSourceLines( "test/CompileTimeConstantTestCase.java", @@ -133,7 +133,7 @@ public void testMatches_identCallSucceedsWithLiteral() { } @Test - public void testMatches_staticCallFailsWithNonConstant() { + public void matches_staticCallFailsWithNonConstant() { compilationHelper .addSourceLines( "test/CompileTimeConstantTestCase.java", @@ -148,7 +148,7 @@ public void testMatches_staticCallFailsWithNonConstant() { } @Test - public void testMatches_staticCallSucceedsWithLiteral() { + public void matches_staticCallSucceedsWithLiteral() { compilationHelper .addSourceLines( "test/CompileTimeConstantTestCase.java", @@ -162,7 +162,7 @@ public void testMatches_staticCallSucceedsWithLiteral() { } @Test - public void testMatches_qualifiedStaticCallFailsWithNonConstant() { + public void matches_qualifiedStaticCallFailsWithNonConstant() { compilationHelper .addSourceLines( "test/CompileTimeConstantTestCase.java", @@ -179,7 +179,7 @@ public void testMatches_qualifiedStaticCallFailsWithNonConstant() { } @Test - public void testMatches_qualifiedStaticCallSucceedsWithLiteral() { + public void matches_qualifiedStaticCallSucceedsWithLiteral() { compilationHelper .addSourceLines( "test/CompileTimeConstantTestCase.java", @@ -195,7 +195,7 @@ public void testMatches_qualifiedStaticCallSucceedsWithLiteral() { } @Test - public void testMatches_ctorSucceedsWithLiteral() { + public void matches_ctorSucceedsWithLiteral() { compilationHelper .addSourceLines( "test/CompileTimeConstantTestCase.java", @@ -212,7 +212,7 @@ public void testMatches_ctorSucceedsWithLiteral() { } @Test - public void testMatches_ctorFailsWithNonConstant() { + public void matches_ctorFailsWithNonConstant() { compilationHelper .addSourceLines( "test/CompileTimeConstantTestCase.java", @@ -230,7 +230,7 @@ public void testMatches_ctorFailsWithNonConstant() { } @Test - public void testMatches_identCallSucceedsWithinCtorWithLiteral() { + public void matches_identCallSucceedsWithinCtorWithLiteral() { compilationHelper .addSourceLines( "test/CompileTimeConstantTestCase.java", @@ -255,7 +255,7 @@ private Holder() {} } @Test - public void testMatches_varargsInDifferentCompilationUnit() { + public void matches_varargsInDifferentCompilationUnit() { compilationHelper .addSourceLines( "test/CompileTimeConstantTestCase.java", @@ -272,7 +272,7 @@ public void testMatches_varargsInDifferentCompilationUnit() { } @Test - public void testMatches_varargsSuccess() { + public void matches_varargsSuccess() { compilationHelper .addSourceLines( "test/CompileTimeConstantTestCase.java", @@ -291,7 +291,7 @@ public void testMatches_varargsSuccess() { } @Test - public void testMatches_effectivelyFinalCompileTimeConstantParam() { + public void matches_effectivelyFinalCompileTimeConstantParam() { compilationHelper .addSourceLines( "test/CompileTimeConstantTestCase.java", @@ -307,7 +307,7 @@ public void testMatches_effectivelyFinalCompileTimeConstantParam() { } @Test - public void testMatches_nonFinalCompileTimeConstantParam() { + public void matches_nonFinalCompileTimeConstantParam() { compilationHelper .addSourceLines( "test/CompileTimeConstantTestCase.java", @@ -325,7 +325,7 @@ public void testMatches_nonFinalCompileTimeConstantParam() { } @Test - public void testMatches_override() { + public void matches_override() { compilationHelper .addSourceLines( "test/CompileTimeConstantTestCase.java", @@ -342,7 +342,7 @@ public void testMatches_override() { } @Test - public void testMatches_methodReference() { + public void matches_methodReference() { compilationHelper .addSourceLines( "test/CompileTimeConstantTestCase.java", @@ -360,7 +360,7 @@ public void testMatches_methodReference() { } @Test - public void testMatches_constructorReference() { + public void matches_constructorReference() { compilationHelper .addSourceLines( "test/CompileTimeConstantTestCase.java", @@ -378,7 +378,7 @@ public void testMatches_constructorReference() { } @Test - public void testMatches_methodReferenceCorrectOverrideMethod() { + public void matches_methodReferenceCorrectOverrideMethod() { compilationHelper .addSourceLines( "test/CompileTimeConstantTestCase.java", @@ -398,7 +398,7 @@ public void testMatches_methodReferenceCorrectOverrideMethod() { } @Test - public void testMatches_methodReferenceCorrectOverrideConstructor() { + public void matches_methodReferenceCorrectOverrideConstructor() { compilationHelper .addSourceLines( "test/CompileTimeConstantTestCase.java", @@ -418,7 +418,7 @@ public void testMatches_methodReferenceCorrectOverrideConstructor() { } @Test - public void testMatches_lambdaExpression() { + public void matches_lambdaExpression() { compilationHelper .addSourceLines( "test/CompileTimeConstantTestCase.java", @@ -433,7 +433,7 @@ public void testMatches_lambdaExpression() { } @Test - public void testDoesNotMatch_lambdaExpression_correctOverride() { + public void doesNotMatch_lambdaExpression_correctOverride() { compilationHelper .addSourceLines( "test/CompileTimeConstantTestCase.java", @@ -451,7 +451,7 @@ public void testDoesNotMatch_lambdaExpression_correctOverride() { } @Test - public void testMatches_lambdaExpressionWithoutAnnotatedParameters() { + public void matches_lambdaExpressionWithoutAnnotatedParameters() { compilationHelper .addSourceLines( "test/CompileTimeConstantTestCase.java", @@ -470,7 +470,7 @@ public void testMatches_lambdaExpressionWithoutAnnotatedParameters() { } @Test - public void testMatches_lambdaExpressionWithoutExplicitFormalParameters() { + public void matches_lambdaExpressionWithoutExplicitFormalParameters() { compilationHelper .addSourceLines( "test/CompileTimeConstantTestCase.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/ComputeIfAbsentAmbiguousReferenceTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/ComputeIfAbsentAmbiguousReferenceTest.java index 3433770eb8e..129a9a12ee1 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/ComputeIfAbsentAmbiguousReferenceTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/ComputeIfAbsentAmbiguousReferenceTest.java @@ -32,7 +32,7 @@ public class ComputeIfAbsentAmbiguousReferenceTest { CompilationTestHelper.newInstance(ComputeIfAbsentAmbiguousReference.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper .addSourceLines( "in/Test.java", @@ -52,7 +52,7 @@ public void testPositiveCase() { } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper .addSourceLines( "in/Test.java", @@ -91,7 +91,7 @@ public void testNegativeCase() { } @Test - public void testNegativeCase_parameterNameMatch() { + public void negativeCase_parameterNameMatch() { compilationHelper .addSourceLines( "in/Test.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/ConstantPatternCompileTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/ConstantPatternCompileTest.java index f18c3e3979e..1e06c2f173a 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/ConstantPatternCompileTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/ConstantPatternCompileTest.java @@ -35,7 +35,7 @@ public class ConstantPatternCompileTest { BugCheckerRefactoringTestHelper.newInstance(ConstantPatternCompile.class, getClass()); @Test - public void testInlineExpressions() { + public void inlineExpressions() { testHelper .addInputLines( "in/Test.java", @@ -60,7 +60,7 @@ public void testInlineExpressions() { } @Test - public void testVariableNameFromField() { + public void variableNameFromField() { testHelper .addInputLines( "in/Test.java", @@ -87,7 +87,7 @@ public void testVariableNameFromField() { } @Test - public void testInlineExpression_argumentIsMethodCall() { + public void inlineExpression_argumentIsMethodCall() { testHelper .addInputLines( "in/Test.java", @@ -114,7 +114,7 @@ public void testInlineExpression_argumentIsMethodCall() { } @Test - public void testInlineExpression_nameDefaultsToPattern() { + public void inlineExpression_nameDefaultsToPattern() { testHelper .addInputLines( "in/Test.java", @@ -139,7 +139,7 @@ public void testInlineExpression_nameDefaultsToPattern() { } @Test - public void testMultipleInlineExpressions() { + public void multipleInlineExpressions() { testHelper .addInputLines( "in/Test.java", @@ -167,7 +167,7 @@ public void testMultipleInlineExpressions() { } @Test - public void testSameNameInDifferentMethods() { + public void sameNameInDifferentMethods() { testHelper .addInputLines( "in/Test.java", @@ -199,7 +199,7 @@ public void testSameNameInDifferentMethods() { } @Test - public void testFixGenerationStatic() { + public void fixGenerationStatic() { testHelper .addInputLines( "in/Test.java", @@ -227,7 +227,7 @@ public void testFixGenerationStatic() { } @Test - public void testFixGeneration_multiplePatterns() { + public void fixGeneration_multiplePatterns() { testHelper .addInputLines( "in/Test.java", @@ -265,7 +265,7 @@ public void testFixGeneration_multiplePatterns() { } @Test - public void testFixGenerationWithJavadoc() { + public void fixGenerationWithJavadoc() { testHelper .addInputLines( "in/Test.java", @@ -293,7 +293,7 @@ public void testFixGenerationWithJavadoc() { } @Test - public void testFixGeneration_nonStaticInnerClass() { + public void fixGeneration_nonStaticInnerClass() { testHelper .addInputLines( "in/Test.java", @@ -325,7 +325,7 @@ public void testFixGeneration_nonStaticInnerClass() { } @Test - public void testNegativeCases() { + public void negativeCases() { compilationHelper .addSourceLines( "in/Test.java", @@ -352,7 +352,7 @@ public void testNegativeCases() { } @Test - public void testNegativeCases_multiArg() { + public void negativeCases_multiArg() { compilationHelper .addSourceLines( "in/Test.java", @@ -374,7 +374,7 @@ public void testNegativeCases_multiArg() { } @Test - public void testNegativeCase_staticBlock() { + public void negativeCase_staticBlock() { compilationHelper .addSourceLines( "in/Test.java", @@ -393,7 +393,7 @@ public void testNegativeCase_staticBlock() { // Pattern.compile call. @Test - public void testOnlyCode_noFinding() { + public void onlyCode_noFinding() { compilationHelper .addSourceLines( "in/Test.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/DeadExceptionTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/DeadExceptionTest.java index 1a9dd1a97e3..4e2c1c5b938 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/DeadExceptionTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/DeadExceptionTest.java @@ -31,12 +31,12 @@ public class DeadExceptionTest { CompilationTestHelper.newInstance(DeadException.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.addSourceFile("DeadExceptionPositiveCases.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("DeadExceptionNegativeCases.java").doTest(); } @@ -45,7 +45,7 @@ public void testNegativeCase() { * asserting that an exception is thrown in the constructor. */ @Test - public void testNegativeCaseWhenExceptionsUnthrownInTests() { + public void negativeCaseWhenExceptionsUnthrownInTests() { compilationHelper.addSourceFile("DeadExceptionTestingNegativeCases.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/DefaultPackageTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/DefaultPackageTest.java index 88cea746dea..37223341c79 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/DefaultPackageTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/DefaultPackageTest.java @@ -32,7 +32,7 @@ public class DefaultPackageTest { CompilationTestHelper.newInstance(DefaultPackage.class, getClass()); @Test - public void testPositiveCases() { + public void positiveCases() { compilationHelper .addSourceLines( "Test.java", // @@ -43,7 +43,7 @@ public void testPositiveCases() { } @Test - public void testNegativeCases_classWithGenerated() { + public void negativeCases_classWithGenerated() { compilationHelper .addSourceLines( "Test.java", // @@ -55,7 +55,7 @@ public void testNegativeCases_classWithGenerated() { } @Test - public void testNegativeCases_classWithWarningSuppressed() { + public void negativeCases_classWithWarningSuppressed() { compilationHelper .addSourceLines( "in/Test.java", // @@ -66,7 +66,7 @@ public void testNegativeCases_classWithWarningSuppressed() { } @Test - public void testNegativeCases_classWithPackage() { + public void negativeCases_classWithPackage() { compilationHelper .addSourceLines( "in/Test.java", // diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/DepAnnTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/DepAnnTest.java index 6d91308e020..00f1e0b843e 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/DepAnnTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/DepAnnTest.java @@ -31,22 +31,22 @@ public class DepAnnTest { private static final ImmutableList JAVACOPTS = ImmutableList.of("-Xlint:-dep-ann"); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.setArgs(JAVACOPTS).addSourceFile("DepAnnPositiveCases.java").doTest(); } @Test - public void testNegativeCase1() { + public void negativeCase1() { compilationHelper.setArgs(JAVACOPTS).addSourceFile("DepAnnNegativeCase1.java").doTest(); } @Test - public void testNegativeCase2() { + public void negativeCase2() { compilationHelper.setArgs(JAVACOPTS).addSourceFile("DepAnnNegativeCase2.java").doTest(); } @Test - public void testDisableable() { + public void disableable() { compilationHelper .setArgs(ImmutableList.of("-Xlint:-dep-ann", "-Xep:DepAnn:OFF")) .expectNoDiagnostics() diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/DoNotClaimAnnotationsTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/DoNotClaimAnnotationsTest.java index 0d67b3ccd86..c5d6120ce7e 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/DoNotClaimAnnotationsTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/DoNotClaimAnnotationsTest.java @@ -30,7 +30,7 @@ public class DoNotClaimAnnotationsTest { BugCheckerRefactoringTestHelper.newInstance(DoNotClaimAnnotations.class, getClass()); @Test - public void testPositive() { + public void positive() { testHelper .addInputLines( "Test.java", @@ -64,7 +64,7 @@ public void testPositive() { } @Test - public void testNegative() { + public void negative() { testHelper .addInputLines( "Test.java", @@ -85,7 +85,7 @@ public void testNegative() { } @Test - public void testNegative_notAProcessor() { + public void negative_notAProcessor() { testHelper .addInputLines( "Test.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/DuplicateMapKeysTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/DuplicateMapKeysTest.java index d80f0314f8a..25eff8ae220 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/DuplicateMapKeysTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/DuplicateMapKeysTest.java @@ -33,7 +33,7 @@ public class DuplicateMapKeysTest { CompilationTestHelper.newInstance(DuplicateMapKeys.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper .addSourceLines( "a/A.java", @@ -54,7 +54,7 @@ public void testPositiveCase() { } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper .addSourceLines( "a/A.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/EmptyCatchTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/EmptyCatchTest.java index 6b021374c7b..c96de540469 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/EmptyCatchTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/EmptyCatchTest.java @@ -36,12 +36,12 @@ public void setUp() { } @Test - public void testPositiveCase() throws Exception { + public void positiveCase() throws Exception { compilationHelper.addSourceFile("EmptyCatchPositiveCases.java").doTest(); } @Test - public void testNegativeCase() throws Exception { + public void negativeCase() throws Exception { compilationHelper.addSourceFile("EmptyCatchNegativeCases.java").doTest(); } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/EmptyIfStatementTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/EmptyIfStatementTest.java index c1b7006e42a..a8c97348fe5 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/EmptyIfStatementTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/EmptyIfStatementTest.java @@ -31,12 +31,12 @@ public class EmptyIfStatementTest { CompilationTestHelper.newInstance(EmptyIfStatement.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.addSourceFile("EmptyIfStatementPositiveCases.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("EmptyIfStatementNegativeCases.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/EqualsHashCodeTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/EqualsHashCodeTest.java index 202c62f4bc7..b597f9169f3 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/EqualsHashCodeTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/EqualsHashCodeTest.java @@ -29,12 +29,12 @@ public class EqualsHashCodeTest { CompilationTestHelper.newInstance(EqualsHashCode.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.addSourceFile("EqualsHashCodeTestPositiveCases.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("EqualsHashCodeTestNegativeCases.java").doTest(); } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/EqualsIncompatibleTypeTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/EqualsIncompatibleTypeTest.java index aa2aa6ba688..568a03f2d1d 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/EqualsIncompatibleTypeTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/EqualsIncompatibleTypeTest.java @@ -34,22 +34,22 @@ public class EqualsIncompatibleTypeTest { CompilationTestHelper.newInstance(EqualsIncompatibleType.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.addSourceFile("EqualsIncompatibleTypePositiveCases.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("EqualsIncompatibleTypeNegativeCases.java").doTest(); } @Test - public void testNegativeCase_recursive() { + public void negativeCase_recursive() { compilationHelper.addSourceFile("EqualsIncompatibleTypeRecursiveTypes.java").doTest(); } @Test - public void testPrimitiveBoxingIntoObject() { + public void primitiveBoxingIntoObject() { assumeFalse(RuntimeVersion.isAtLeast12()); // https://bugs.openjdk.java.net/browse/JDK-8028563 compilationHelper .addSourceLines( diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/EqualsNaNTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/EqualsNaNTest.java index 4afe8fd3a34..3d5ddc7d5e9 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/EqualsNaNTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/EqualsNaNTest.java @@ -31,12 +31,12 @@ public class EqualsNaNTest { CompilationTestHelper.newInstance(EqualsNaN.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.addSourceFile("EqualsNaNPositiveCases.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("EqualsNaNNegativeCases.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/EqualsReferenceTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/EqualsReferenceTest.java index 55fdd3c8ab6..4f827960f0b 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/EqualsReferenceTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/EqualsReferenceTest.java @@ -30,12 +30,12 @@ public class EqualsReferenceTest { CompilationTestHelper.newInstance(EqualsReference.class, getClass()); @Test - public void testPositiveCases() { + public void positiveCases() { compilationTestHelper.addSourceFile("EqualsReferencePositiveCases.java").doTest(); } @Test - public void testNegativeCases() { + public void negativeCases() { compilationTestHelper.addSourceFile("EqualsReferenceNegativeCases.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/FinallyTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/FinallyTest.java index 93ace02cf74..621ae03f66e 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/FinallyTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/FinallyTest.java @@ -31,22 +31,22 @@ public class FinallyTest { CompilationTestHelper.newInstance(Finally.class, getClass()); @Test - public void testPositiveCase1() { + public void positiveCase1() { compilationHelper.addSourceFile("FinallyPositiveCase1.java").doTest(); } @Test - public void testPositiveCase2() { + public void positiveCase2() { compilationHelper.addSourceFile("FinallyPositiveCase2.java").doTest(); } @Test - public void testNegativeCase1() { + public void negativeCase1() { compilationHelper.addSourceFile("FinallyNegativeCase1.java").doTest(); } @Test - public void testNegativeCase2() { + public void negativeCase2() { compilationHelper.addSourceFile("FinallyNegativeCase2.java").doTest(); } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/FloatingPointAssertionWithinEpsilonTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/FloatingPointAssertionWithinEpsilonTest.java index 5417c5bdb25..5f20fc35e24 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/FloatingPointAssertionWithinEpsilonTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/FloatingPointAssertionWithinEpsilonTest.java @@ -34,21 +34,21 @@ public final class FloatingPointAssertionWithinEpsilonTest { CompilationTestHelper.newInstance(FloatingPointAssertionWithinEpsilon.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper .addSourceFile("FloatingPointAssertionWithinEpsilonPositiveCases.java") .doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper .addSourceFile("FloatingPointAssertionWithinEpsilonNegativeCases.java") .doTest(); } @Test - public void testFixes() { + public void fixes() { BugCheckerRefactoringTestHelper.newInstance( FloatingPointAssertionWithinEpsilon.class, getClass()) .addInput("FloatingPointAssertionWithinEpsilonPositiveCases.java") diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/ForOverrideCheckerTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/ForOverrideCheckerTest.java index f0effa450fd..310779463d2 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/ForOverrideCheckerTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/ForOverrideCheckerTest.java @@ -43,7 +43,7 @@ public class ForOverrideCheckerTest { "}"); @Test - public void testCanApplyForOverrideToProtectedMethod() { + public void canApplyForOverrideToProtectedMethod() { compilationHelper .addSourceLines( "test/Test.java", @@ -56,7 +56,7 @@ public void testCanApplyForOverrideToProtectedMethod() { } @Test - public void testCanApplyForOverrideToPackagePrivateMethod() { + public void canApplyForOverrideToPackagePrivateMethod() { compilationHelper .addSourceLines( "test/Test.java", @@ -69,7 +69,7 @@ public void testCanApplyForOverrideToPackagePrivateMethod() { } @Test - public void testCannotApplyForOverrideToPublicMethod() { + public void cannotApplyForOverrideToPublicMethod() { compilationHelper .addSourceLines( "test/Test.java", @@ -84,7 +84,7 @@ public void testCannotApplyForOverrideToPublicMethod() { } @Test - public void testCannotApplyForOverrideToPrivateMethod() { + public void cannotApplyForOverrideToPrivateMethod() { compilationHelper .addSourceLines( "test/Test.java", @@ -99,7 +99,7 @@ public void testCannotApplyForOverrideToPrivateMethod() { } @Test - public void testCannotApplyForOverrideToInterfaceMethod() { + public void cannotApplyForOverrideToInterfaceMethod() { compilationHelper .addSourceLines( "test/Test.java", @@ -114,7 +114,7 @@ public void testCannotApplyForOverrideToInterfaceMethod() { } @Test - public void testUserCanCallAppropriateMethod() { + public void userCanCallAppropriateMethod() { compilationHelper .addSourceLines( "test/Test.java", @@ -128,7 +128,7 @@ public void testUserCanCallAppropriateMethod() { } @Test - public void testUserInSamePackageCannotCallMethod() { + public void userInSamePackageCannotCallMethod() { compilationHelper .addSourceLines( "test/Test.java", @@ -144,7 +144,7 @@ public void testUserInSamePackageCannotCallMethod() { } @Test - public void testUserCannotCallDefault() { + public void userCannotCallDefault() { compilationHelper .addSourceLines( "test/Test.java", @@ -159,7 +159,7 @@ public void testUserCannotCallDefault() { } @Test - public void testUserCannotCallOverridden() { + public void userCannotCallOverridden() { compilationHelper .addSourceLines( "test/Test.java", @@ -179,7 +179,7 @@ public void testUserCannotCallOverridden() { } @Test - public void testUserCanCallSuperFromOverridden() { + public void userCanCallSuperFromOverridden() { compilationHelper .addSourceLines( "test/Test.java", @@ -194,7 +194,7 @@ public void testUserCanCallSuperFromOverridden() { } @Test - public void testUserCanCallSuperFromOverridden_explicitQualification() { + public void userCanCallSuperFromOverridden_explicitQualification() { compilationHelper .addSourceLines( "test/Test.java", @@ -210,7 +210,7 @@ public void testUserCanCallSuperFromOverridden_explicitQualification() { } @Test - public void testUserCannotCallSuperFromNonOverriddenMethod() { + public void userCannotCallSuperFromNonOverriddenMethod() { compilationHelper .addSourceLines( "test/Test.java", @@ -225,7 +225,7 @@ public void testUserCannotCallSuperFromNonOverriddenMethod() { } @Test - public void testUserCannotCallSuperFromFieldInitializer() { + public void userCannotCallSuperFromFieldInitializer() { compilationHelper .addSourceLines( "test/Test.java", @@ -238,7 +238,7 @@ public void testUserCannotCallSuperFromFieldInitializer() { } @Test - public void testUserCannotCallSuperFromAnonymousInnerClassInOverride() { + public void userCannotCallSuperFromAnonymousInnerClassInOverride() { compilationHelper .addSourceLines( "test/Test.java", @@ -261,7 +261,7 @@ public void testUserCannotCallSuperFromAnonymousInnerClassInOverride() { } @Test - public void testUserCannotMakeMethodPublic() { + public void userCannotMakeMethodPublic() { compilationHelper .addSourceLines( "test/Test.java", @@ -280,7 +280,7 @@ public void testUserCannotMakeMethodPublic() { } @Test - public void testDefinerCanCallFromInnerClass() { + public void definerCanCallFromInnerClass() { compilationHelper .addSourceLines( "test/OuterClass.java", @@ -299,7 +299,7 @@ public void testDefinerCanCallFromInnerClass() { } @Test - public void testDefinerCanCallFromAnonymousInnerClass() { + public void definerCanCallFromAnonymousInnerClass() { compilationHelper .addSourceLines( "test/OuterClass.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/FunctionalInterfaceMethodChangedTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/FunctionalInterfaceMethodChangedTest.java index f1fdf866879..1045ca987a4 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/FunctionalInterfaceMethodChangedTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/FunctionalInterfaceMethodChangedTest.java @@ -31,12 +31,12 @@ public class FunctionalInterfaceMethodChangedTest { CompilationTestHelper.newInstance(FunctionalInterfaceMethodChanged.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.addSourceFile("FunctionalInterfaceMethodChangedPositiveCases.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("FunctionalInterfaceMethodChangedNegativeCases.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/FutureReturnValueIgnoredTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/FutureReturnValueIgnoredTest.java index cfb98d8191a..9f01e071a51 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/FutureReturnValueIgnoredTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/FutureReturnValueIgnoredTest.java @@ -31,17 +31,17 @@ public class FutureReturnValueIgnoredTest { CompilationTestHelper.newInstance(FutureReturnValueIgnored.class, getClass()); @Test - public void testPositiveCases() { + public void positiveCases() { compilationHelper.addSourceFile("FutureReturnValueIgnoredPositiveCases.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("FutureReturnValueIgnoredNegativeCases.java").doTest(); } @Test - public void testClassAnnotationButCanIgnoreReturnValue() { + public void classAnnotationButCanIgnoreReturnValue() { compilationHelper .addSourceLines( "lib/Lib.java", @@ -61,7 +61,7 @@ public void testClassAnnotationButCanIgnoreReturnValue() { } @Test - public void testCompletableFutureReturnValue() { + public void completableFutureReturnValue() { compilationHelper .addSourceLines( "test.java", @@ -75,7 +75,7 @@ public void testCompletableFutureReturnValue() { } @Test - public void testCompletableFutureReturnValueJdk9() { + public void completableFutureReturnValueJdk9() { compilationHelper .addSourceLines( "test.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/FuturesGetCheckedIllegalExceptionTypeTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/FuturesGetCheckedIllegalExceptionTypeTest.java index 997e1b5c2d7..ab2155c0079 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/FuturesGetCheckedIllegalExceptionTypeTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/FuturesGetCheckedIllegalExceptionTypeTest.java @@ -26,14 +26,14 @@ public class FuturesGetCheckedIllegalExceptionTypeTest { CompilationTestHelper.newInstance(FuturesGetCheckedIllegalExceptionType.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper .addSourceFile("FuturesGetCheckedIllegalExceptionTypePositiveCases.java") .doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper .addSourceFile("FuturesGetCheckedIllegalExceptionTypeNegativeCases.java") .doTest(); diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/FuzzyEqualsShouldNotBeUsedInEqualsMethodTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/FuzzyEqualsShouldNotBeUsedInEqualsMethodTest.java index 927d64ba7b5..4fdc08329fe 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/FuzzyEqualsShouldNotBeUsedInEqualsMethodTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/FuzzyEqualsShouldNotBeUsedInEqualsMethodTest.java @@ -30,14 +30,14 @@ public class FuzzyEqualsShouldNotBeUsedInEqualsMethodTest { CompilationTestHelper.newInstance(FuzzyEqualsShouldNotBeUsedInEqualsMethod.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper .addSourceFile("FuzzyEqualsShouldNotBeUsedInEqualsMethodPositiveCases.java") .doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper .addSourceFile("FuzzyEqualsShouldNotBeUsedInEqualsMethodNegativeCases.java") .doTest(); diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/GetClassOnClassTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/GetClassOnClassTest.java index 7955cbd1e92..eba74eef3a6 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/GetClassOnClassTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/GetClassOnClassTest.java @@ -31,12 +31,12 @@ public class GetClassOnClassTest { CompilationTestHelper.newInstance(GetClassOnClass.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.addSourceFile("GetClassOnClassPositiveCases.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("GetClassOnClassNegativeCases.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/HidingFieldTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/HidingFieldTest.java index 6ff69286d9b..a1dd643a048 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/HidingFieldTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/HidingFieldTest.java @@ -35,7 +35,7 @@ public void setUp() { } @Test - public void testHidingFieldPositiveCases() { + public void hidingFieldPositiveCases() { compilationHelper .addSourceFile("HidingFieldPositiveCases1.java") .addSourceFile("HidingFieldPositiveCases2.java") @@ -43,7 +43,7 @@ public void testHidingFieldPositiveCases() { } @Test - public void testHidingFieldNegativeCases() { + public void hidingFieldNegativeCases() { compilationHelper.addSourceFile("HidingFieldNegativeCases.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/IdentityHashMapBoxingTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/IdentityHashMapBoxingTest.java index f637302b15a..121a4fcf8ba 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/IdentityHashMapBoxingTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/IdentityHashMapBoxingTest.java @@ -28,7 +28,7 @@ public class IdentityHashMapBoxingTest { CompilationTestHelper.newInstance(IdentityHashMapBoxing.class, getClass()); @Test - public void testConstructorPositiveCases() { + public void constructorPositiveCases() { compilationHelper .addSourceLines( "Test.java", @@ -50,7 +50,7 @@ public void testConstructorPositiveCases() { } @Test - public void testConstructorNegativeCases() { + public void constructorNegativeCases() { compilationHelper .addSourceLines( "Test.java", @@ -70,7 +70,7 @@ public void testConstructorNegativeCases() { } @Test - public void testMapsPositiveCases() { + public void mapsPositiveCases() { compilationHelper .addSourceLines( "Test.java", @@ -93,7 +93,7 @@ public void testMapsPositiveCases() { } @Test - public void testMapsNegativeCases() { + public void mapsNegativeCases() { compilationHelper .addSourceLines( "Test.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/ImplementAssertionWithChainingTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/ImplementAssertionWithChainingTest.java index 089e30fc70d..6770dd647d0 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/ImplementAssertionWithChainingTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/ImplementAssertionWithChainingTest.java @@ -30,12 +30,12 @@ public class ImplementAssertionWithChainingTest { CompilationTestHelper.newInstance(ImplementAssertionWithChaining.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.addSourceFile("ImplementAssertionWithChainingPositiveCases.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("ImplementAssertionWithChainingNegativeCases.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/ImpossibleNullComparisonTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/ImpossibleNullComparisonTest.java index be80d121c5c..682bf8f7acb 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/ImpossibleNullComparisonTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/ImpossibleNullComparisonTest.java @@ -120,7 +120,7 @@ public void negativeCases() { } @Test - public void testProto3() { + public void proto3() { compilationHelper .addSourceLines( "TestProto3.java", @@ -136,7 +136,7 @@ public void testProto3() { } @Test - public void testMessageOrBuilderGetField() { + public void messageOrBuilderGetField() { compilationHelper .addSourceLines( "Test.java", @@ -152,7 +152,7 @@ public void testMessageOrBuilderGetField() { } @Test - public void testMessageOrBuilderGetFieldCast() { + public void messageOrBuilderGetFieldCast() { compilationHelper .addSourceLines( "Test.java", @@ -169,7 +169,7 @@ public void testMessageOrBuilderGetFieldCast() { } @Test - public void testExtendableMessageGetExtension1param() { + public void extendableMessageGetExtension1param() { compilationHelper .addSourceLines( "Test.java", @@ -185,7 +185,7 @@ public void testExtendableMessageGetExtension1param() { } @Test - public void testMessageOrBuilderGetRepeatedField() { + public void messageOrBuilderGetRepeatedField() { compilationHelper .addSourceLines( "Test.java", @@ -201,7 +201,7 @@ public void testMessageOrBuilderGetRepeatedField() { } @Test - public void testExtendableMessageGetExtension2param() { + public void extendableMessageGetExtension2param() { compilationHelper .addSourceLines( "Test.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/IncompatibleModifiersCheckerTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/IncompatibleModifiersCheckerTest.java index 46e2049f4cf..1052540d915 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/IncompatibleModifiersCheckerTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/IncompatibleModifiersCheckerTest.java @@ -60,7 +60,7 @@ public class IncompatibleModifiersCheckerTest { "}"); @Test - public void testAnnotationWithIncompatibleModifierOnClassFails() { + public void annotationWithIncompatibleModifierOnClassFails() { compilationHelper .addSourceLines( "test/IncompatibleModifiersTestCase.java", @@ -74,7 +74,7 @@ public void testAnnotationWithIncompatibleModifierOnClassFails() { } @Test - public void testAnnotationWithIncompatibleModifierOnFieldFails() { + public void annotationWithIncompatibleModifierOnFieldFails() { compilationHelper .addSourceLines( "test/IncompatibleModifiersTestCase.java", @@ -89,7 +89,7 @@ public void testAnnotationWithIncompatibleModifierOnFieldFails() { } @Test - public void testAnnotationWithIncompatibleModifierOnMethodFails() { + public void annotationWithIncompatibleModifierOnMethodFails() { compilationHelper .addSourceLines( "test/IncompatibleModifiersTestCase.java", @@ -104,7 +104,7 @@ public void testAnnotationWithIncompatibleModifierOnMethodFails() { } @Test - public void testAnnotationWithTwoIncompatibleModifiersFails() { + public void annotationWithTwoIncompatibleModifiersFails() { compilationHelper .addSourceLines( "test/IncompatibleModifiersTestCase.java", @@ -119,7 +119,7 @@ public void testAnnotationWithTwoIncompatibleModifiersFails() { } @Test - public void testAnnotationWithCompatibleModifiersSucceeds() { + public void annotationWithCompatibleModifiersSucceeds() { compilationHelper .addSourceLines( "test/IncompatibleModifiersTestCase.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/InconsistentCapitalizationTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/InconsistentCapitalizationTest.java index b58849e4afe..34e27e8420a 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/InconsistentCapitalizationTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/InconsistentCapitalizationTest.java @@ -32,7 +32,7 @@ public class InconsistentCapitalizationTest { BugCheckerRefactoringTestHelper.newInstance(InconsistentCapitalization.class, getClass()); @Test - public void testNegativeCases() { + public void negativeCases() { compilationHelper.addSourceFile("InconsistentCapitalizationNegativeCases.java").doTest(); } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/InsecureCipherModeTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/InsecureCipherModeTest.java index 8868af41eae..cedbb572e31 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/InsecureCipherModeTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/InsecureCipherModeTest.java @@ -30,12 +30,12 @@ public class InsecureCipherModeTest { CompilationTestHelper.newInstance(InsecureCipherMode.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.addSourceFile("InsecureCipherModePositiveCases.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("InsecureCipherModeNegativeCases.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/InstanceOfAndCastMatchWrongTypeTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/InstanceOfAndCastMatchWrongTypeTest.java index 2306701cf1b..00d87b097c6 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/InstanceOfAndCastMatchWrongTypeTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/InstanceOfAndCastMatchWrongTypeTest.java @@ -30,12 +30,12 @@ public class InstanceOfAndCastMatchWrongTypeTest { CompilationTestHelper.newInstance(InstanceOfAndCastMatchWrongType.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.addSourceFile("InstanceOfAndCastMatchWrongTypePositiveCases.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("InstanceOfAndCastMatchWrongTypeNegativeCases.java").doTest(); } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/InvalidPatternSyntaxTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/InvalidPatternSyntaxTest.java index 20fd1f901d4..cc7dd8744d4 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/InvalidPatternSyntaxTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/InvalidPatternSyntaxTest.java @@ -31,12 +31,12 @@ public class InvalidPatternSyntaxTest { CompilationTestHelper.newInstance(InvalidPatternSyntax.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.addSourceFile("InvalidPatternSyntaxPositiveCases.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("InvalidPatternSyntaxNegativeCases.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/InvalidTimeZoneIDTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/InvalidTimeZoneIDTest.java index e5ba47c7572..e2fbd9e8f3d 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/InvalidTimeZoneIDTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/InvalidTimeZoneIDTest.java @@ -31,7 +31,7 @@ public class InvalidTimeZoneIDTest { CompilationTestHelper.newInstance(InvalidTimeZoneID.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper .addSourceLines( "a/A.java", @@ -70,7 +70,7 @@ public void testPositiveCase() { } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper .addSourceLines( "a/A.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/InvalidZoneIdTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/InvalidZoneIdTest.java index a0f902ef34f..a61a1b9201f 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/InvalidZoneIdTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/InvalidZoneIdTest.java @@ -31,7 +31,7 @@ public class InvalidZoneIdTest { CompilationTestHelper.newInstance(InvalidZoneId.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper .addSourceLines( "a/A.java", @@ -66,7 +66,7 @@ public void testPositiveCase() { } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper .addSourceLines( "a/A.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/IterableAndIteratorTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/IterableAndIteratorTest.java index 0d76eac8c04..c48534a9d91 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/IterableAndIteratorTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/IterableAndIteratorTest.java @@ -29,12 +29,12 @@ public class IterableAndIteratorTest { CompilationTestHelper.newInstance(IterableAndIterator.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.addSourceFile("IterableAndIteratorPositiveCases.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("IterableAndIteratorNegativeCases.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/JUnit3TestNotRunTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/JUnit3TestNotRunTest.java index 9b20e9f80ff..611342233e3 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/JUnit3TestNotRunTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/JUnit3TestNotRunTest.java @@ -34,7 +34,7 @@ public class JUnit3TestNotRunTest { BugCheckerRefactoringTestHelper.newInstance(JUnit3TestNotRun.class, getClass()); @Test - public void testPositiveCases() { + public void positiveCases() { compilationHelper.addSourceFile("JUnit3TestNotRunPositiveCases.java").doTest(); } @@ -238,27 +238,27 @@ public void noModifiers() { } @Test - public void testNegativeCase1() { + public void negativeCase1() { compilationHelper.addSourceFile("JUnit3TestNotRunNegativeCase1.java").doTest(); } @Test - public void testNegativeCase2() { + public void negativeCase2() { compilationHelper.addSourceFile("JUnit3TestNotRunNegativeCase2.java").doTest(); } @Test - public void testNegativeCase3() { + public void negativeCase3() { compilationHelper.addSourceFile("JUnit3TestNotRunNegativeCase3.java").doTest(); } @Test - public void testNegativeCase4() { + public void negativeCase4() { compilationHelper.addSourceFile("JUnit3TestNotRunNegativeCase4.java").doTest(); } @Test - public void testNegativeCase5() { + public void negativeCase5() { compilationHelper .addSourceFile("JUnit3TestNotRunNegativeCase3.java") // needed as a dependency .addSourceFile("JUnit3TestNotRunNegativeCase5.java") diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/JUnit4SetUpNotRunTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/JUnit4SetUpNotRunTest.java index a377350a734..b47262d86c2 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/JUnit4SetUpNotRunTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/JUnit4SetUpNotRunTest.java @@ -37,12 +37,12 @@ public class JUnit4SetUpNotRunTest { BugCheckerRefactoringTestHelper.newInstance(JUnit4SetUpNotRun.class, getClass()); @Test - public void testPositiveCases() { + public void positiveCases() { compilationHelper.addSourceFile("JUnit4SetUpNotRunPositiveCases.java").doTest(); } @Test - public void testPositiveCase_customBefore() { + public void positiveCase_customBefore() { compilationHelper.addSourceFile("JUnit4SetUpNotRunPositiveCaseCustomBefore.java").doTest(); } @@ -78,12 +78,12 @@ public void customBefore_refactoring() { } @Test - public void testPositiveCase_customBeforeDifferentName() { + public void positiveCase_customBeforeDifferentName() { compilationHelper.addSourceFile("JUnit4SetUpNotRunPositiveCaseCustomBefore2.java").doTest(); } @Test - public void testNegativeCases() { + public void negativeCases() { compilationHelper.addSourceFile("JUnit4SetUpNotRunNegativeCases.java").doTest(); } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/JUnit4TearDownNotRunTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/JUnit4TearDownNotRunTest.java index c4327fd824e..e8bec5f0f36 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/JUnit4TearDownNotRunTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/JUnit4TearDownNotRunTest.java @@ -31,22 +31,22 @@ public class JUnit4TearDownNotRunTest { CompilationTestHelper.newInstance(JUnit4TearDownNotRun.class, getClass()); @Test - public void testPositiveCases() { + public void positiveCases() { compilationHelper.addSourceFile("JUnit4TearDownNotRunPositiveCases.java").doTest(); } @Test - public void testPositiveCase_customAnnotation() { + public void positiveCase_customAnnotation() { compilationHelper.addSourceFile("JUnit4TearDownNotRunPositiveCaseCustomAfter.java").doTest(); } @Test - public void testPositiveCase_customAnnotationDifferentName() { + public void positiveCase_customAnnotationDifferentName() { compilationHelper.addSourceFile("JUnit4TearDownNotRunPositiveCaseCustomAfter2.java").doTest(); } @Test - public void testNegativeCases() { + public void negativeCases() { compilationHelper.addSourceFile("JUnit4TearDownNotRunNegativeCases.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/JUnit4TestNotRunTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/JUnit4TestNotRunTest.java index 75aca20c9af..e5c2b9b0292 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/JUnit4TestNotRunTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/JUnit4TestNotRunTest.java @@ -36,12 +36,12 @@ public class JUnit4TestNotRunTest { BugCheckerRefactoringTestHelper.newInstance(JUnit4TestNotRun.class, getClass()); @Test - public void testPositiveCase1() { + public void positiveCase1() { compilationHelper.addSourceFile("JUnit4TestNotRunPositiveCase1.java").doTest(); } @Test - public void testPositiveCase2() { + public void positiveCase2() { compilationHelper.addSourceFile("JUnit4TestNotRunPositiveCase2.java").doTest(); } @@ -319,7 +319,7 @@ public void shouldNotDetectMethodsOnAbstractClass() { } @Test - public void testFix() { + public void fix() { refactoringHelper .addInputLines( "in/TestStuff.java", @@ -499,27 +499,27 @@ public void suppression() { } @Test - public void testNegativeCase1() { + public void negativeCase1() { compilationHelper.addSourceFile("JUnit4TestNotRunNegativeCase1.java").doTest(); } @Test - public void testNegativeCase2() { + public void negativeCase2() { compilationHelper.addSourceFile("JUnit4TestNotRunNegativeCase2.java").doTest(); } @Test - public void testNegativeCase3() { + public void negativeCase3() { compilationHelper.addSourceFile("JUnit4TestNotRunNegativeCase3.java").doTest(); } @Test - public void testNegativeCase4() { + public void negativeCase4() { compilationHelper.addSourceFile("JUnit4TestNotRunNegativeCase4.java").doTest(); } @Test - public void testNegativeCase5() { + public void negativeCase5() { compilationHelper .addSourceFile("JUnit4TestNotRunBaseClass.java") .addSourceFile("JUnit4TestNotRunNegativeCase5.java") diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/JUnitAssertSameCheckTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/JUnitAssertSameCheckTest.java index 290f1c820a0..e094a2f57e3 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/JUnitAssertSameCheckTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/JUnitAssertSameCheckTest.java @@ -37,12 +37,12 @@ public void setUp() { } @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.addSourceFile("JUnitAssertSameCheckPositiveCase.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("JUnitAssertSameCheckNegativeCases.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/LambdaFunctionalInterfaceTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/LambdaFunctionalInterfaceTest.java index ccc8087c3cf..fe2b92faad4 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/LambdaFunctionalInterfaceTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/LambdaFunctionalInterfaceTest.java @@ -33,17 +33,17 @@ public class LambdaFunctionalInterfaceTest { BugCheckerRefactoringTestHelper.newInstance(LambdaFunctionalInterface.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.addSourceFile("LambdaFunctionalInterfacePositiveCases.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("LambdaFunctionalInterfaceNegativeCases.java").doTest(); } @Test - public void testRefactoringTwo() { + public void refactoringTwo() { refactoringHelper .addInputLines( "in/TwoLambdaFunctions.java", @@ -84,7 +84,7 @@ public void testRefactoringTwo() { } @Test - public void testRefactoringInteger() { + public void refactoringInteger() { refactoringHelper .addInputLines( "in/TwoLambdaFunctions.java", @@ -125,7 +125,7 @@ public void testRefactoringInteger() { } @Test - public void testRefactoringPrimitiveToGeneric() { + public void refactoringPrimitiveToGeneric() { refactoringHelper .addInputLines( "in/NumbertoT.java", @@ -181,7 +181,7 @@ public void testRefactoringPrimitiveToGeneric() { } @Test - public void testRefactoringGenericToPrimitive() { + public void refactoringGenericToPrimitive() { refactoringHelper .addInputLines( "in/NumbertoT.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/LiteEnumValueOfTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/LiteEnumValueOfTest.java index 90f2d49588a..98026c33b2b 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/LiteEnumValueOfTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/LiteEnumValueOfTest.java @@ -43,7 +43,7 @@ public final class LiteEnumValueOfTest { "}"); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper .addSourceLines( "Test.java", @@ -59,7 +59,7 @@ public void testPositiveCase() { } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper .addSourceLines( "Usage.java", @@ -73,7 +73,7 @@ public void testNegativeCase() { } @Test - public void testNegativeCaseJDK9OrAbove() { + public void negativeCaseJDK9OrAbove() { compilationHelper .addSourceLines( "ProtoLiteEnum.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/LongLiteralLowerCaseSuffixTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/LongLiteralLowerCaseSuffixTest.java index 9578236c168..7c5c833cfc7 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/LongLiteralLowerCaseSuffixTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/LongLiteralLowerCaseSuffixTest.java @@ -34,23 +34,23 @@ public class LongLiteralLowerCaseSuffixTest { CompilationTestHelper.newInstance(LongLiteralLowerCaseSuffix.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.addSourceFile("LongLiteralLowerCaseSuffixPositiveCase1.java").doTest(); } /** Test for Java 7 integer literals that include underscores. */ @Test - public void testJava7PositiveCase() { + public void java7PositiveCase() { compilationHelper.addSourceFile("LongLiteralLowerCaseSuffixPositiveCase2.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("LongLiteralLowerCaseSuffixNegativeCases.java").doTest(); } @Test - public void testDisableable() { + public void disableable() { compilationHelper .setArgs(ImmutableList.of("-Xep:LongLiteralLowerCaseSuffix:OFF")) .expectNoDiagnostics() diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/MissingCasesInEnumSwitchTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/MissingCasesInEnumSwitchTest.java index 12c29278e95..1dbee697e67 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/MissingCasesInEnumSwitchTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/MissingCasesInEnumSwitchTest.java @@ -31,7 +31,7 @@ public class MissingCasesInEnumSwitchTest { CompilationTestHelper.newInstance(MissingCasesInEnumSwitch.class, getClass()); @Test - public void testExhaustive() { + public void exhaustive() { compilationHelper .addSourceLines( "Test.java", @@ -51,7 +51,7 @@ public void testExhaustive() { } @Test - public void testExhaustive_multipleCaseExpressions() { + public void exhaustive_multipleCaseExpressions() { assumeTrue(RuntimeVersion.isAtLeast14()); compilationHelper .addSourceLines( @@ -68,7 +68,7 @@ public void testExhaustive_multipleCaseExpressions() { } @Test - public void testNonExhaustive_withDefault() { + public void nonExhaustive_withDefault() { compilationHelper .addSourceLines( "Test.java", @@ -89,7 +89,7 @@ public void testNonExhaustive_withDefault() { } @Test - public void testNonExhaustive() { + public void nonExhaustive() { compilationHelper .addSourceLines( "Test.java", @@ -109,7 +109,7 @@ public void testNonExhaustive() { } @Test - public void testNonExhaustive_manyCases() { + public void nonExhaustive_manyCases() { compilationHelper .addSourceLines( "Test.java", @@ -128,7 +128,7 @@ public void testNonExhaustive_manyCases() { } @Test - public void testNonExhaustive_nonEnum() { + public void nonExhaustive_nonEnum() { compilationHelper .addSourceLines( "Test.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/MissingFailTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/MissingFailTest.java index e7a5062d592..a956ef34e30 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/MissingFailTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/MissingFailTest.java @@ -34,32 +34,32 @@ public class MissingFailTest { BugCheckerRefactoringTestHelper.newInstance(MissingFail.class, getClass()); @Test - public void testPositiveCases() { + public void positiveCases() { compilationHelper.addSourceFile("MissingFailPositiveCases.java").doTest(); } @Test - public void testPositiveCases2() { + public void positiveCases2() { compilationHelper.addSourceFile("MissingFailPositiveCases2.java").doTest(); } @Test - public void testPositiveCases3() { + public void positiveCases3() { compilationHelper.addSourceFile("MissingFailPositiveCases3.java").doTest(); } @Test - public void testNegativeCases() { + public void negativeCases() { compilationHelper.addSourceFile("MissingFailNegativeCases.java").doTest(); } @Test - public void testNegativeCases2() { + public void negativeCases2() { compilationHelper.addSourceFile("MissingFailNegativeCases2.java").doTest(); } @Test - public void testFailImport() { + public void failImport() { BugCheckerRefactoringTestHelper.newInstance(MissingFail.class, getClass()) .addInputLines( "test/A.java", @@ -90,7 +90,7 @@ public void testFailImport() { } @Test - public void testFailMessageMultiCatch() { + public void failMessageMultiCatch() { BugCheckerRefactoringTestHelper.newInstance(MissingFail.class, getClass()) .addInputLines( "test/A.java", @@ -122,7 +122,7 @@ public void testFailMessageMultiCatch() { // verify that exceptions not named 'expected' are ignored @Test - public void testToleratedException() { + public void toleratedException() { compilationHelper .addSourceLines( "test/A.java", @@ -140,7 +140,7 @@ public void testToleratedException() { // verify that exceptions not named 'expected' are ignored @Test - public void testToleratedExceptionWithAssert() { + public void toleratedExceptionWithAssert() { compilationHelper .addSourceLines( "test/A.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/MisusedWeekYearTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/MisusedWeekYearTest.java index c3e33316f0d..c9b2fe267f9 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/MisusedWeekYearTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/MisusedWeekYearTest.java @@ -30,22 +30,22 @@ public class MisusedWeekYearTest { CompilationTestHelper.newInstance(MisusedWeekYear.class, getClass()); @Test - public void testPositiveCases() { + public void positiveCases() { compilationHelper.addSourceFile("MisusedWeekYearPositiveCases.java").doTest(); } @Test - public void testPositiveCases2() { + public void positiveCases2() { compilationHelper.addSourceFile("MisusedWeekYearPositiveCases2.java").doTest(); } @Test - public void testNegativeCases() { + public void negativeCases() { compilationHelper.addSourceFile("MisusedWeekYearNegativeCases.java").doTest(); } @Test - public void testRefactoring() { + public void refactoring() { BugCheckerRefactoringTestHelper.newInstance(MisusedWeekYear.class, getClass()) .addInputLines( "Test.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/ModifyCollectionInEnhancedForLoopTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/ModifyCollectionInEnhancedForLoopTest.java index e38ed8fe994..c5c6e3c4e28 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/ModifyCollectionInEnhancedForLoopTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/ModifyCollectionInEnhancedForLoopTest.java @@ -29,12 +29,12 @@ public class ModifyCollectionInEnhancedForLoopTest { CompilationTestHelper.newInstance(ModifyCollectionInEnhancedForLoop.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.addSourceFile("ModifyCollectionInEnhancedForLoopPositiveCases.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("ModifyCollectionInEnhancedForLoopNegativeCases.java").doTest(); } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/ModifySourceCollectionInStreamTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/ModifySourceCollectionInStreamTest.java index 80085b664be..907546db2ee 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/ModifySourceCollectionInStreamTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/ModifySourceCollectionInStreamTest.java @@ -31,12 +31,12 @@ public class ModifySourceCollectionInStreamTest { CompilationTestHelper.newInstance(ModifySourceCollectionInStream.class, getClass()); @Test - public void testPositiveCases() { + public void positiveCases() { compilationHelper.addSourceFile("ModifySourceCollectionInStreamPositiveCases.java").doTest(); } @Test - public void testNegativeCasse() { + public void negativeCasse() { compilationHelper.addSourceFile("ModifySourceCollectionInStreamNegativeCases.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/ModifyingCollectionWithItselfTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/ModifyingCollectionWithItselfTest.java index 1339c9445b3..0d4257c5956 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/ModifyingCollectionWithItselfTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/ModifyingCollectionWithItselfTest.java @@ -31,12 +31,12 @@ public class ModifyingCollectionWithItselfTest { CompilationTestHelper.newInstance(ModifyingCollectionWithItself.class, getClass()); @Test - public void testPositiveCases1() { + public void positiveCases1() { compilationHelper.addSourceFile("ModifyingCollectionWithItselfPositiveCases.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("ModifyingCollectionWithItselfNegativeCases.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/MultipleParallelOrSequentialCallsTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/MultipleParallelOrSequentialCallsTest.java index 73361e349d5..110faea4252 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/MultipleParallelOrSequentialCallsTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/MultipleParallelOrSequentialCallsTest.java @@ -54,7 +54,7 @@ public void negativeCases() { } @Test - public void testFixes() { + public void fixes() { BugCheckerRefactoringTestHelper.newInstance(MultipleParallelOrSequentialCalls.class, getClass()) .addInput("MultipleParallelOrSequentialCallsPositiveCases.java") .addOutput("MultipleParallelOrSequentialCallsPositiveCases_expected.java") diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/MultipleUnaryOperatorsInMethodCallTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/MultipleUnaryOperatorsInMethodCallTest.java index 3731444b434..9495df9e652 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/MultipleUnaryOperatorsInMethodCallTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/MultipleUnaryOperatorsInMethodCallTest.java @@ -29,14 +29,14 @@ public class MultipleUnaryOperatorsInMethodCallTest { CompilationTestHelper.newInstance(MultipleUnaryOperatorsInMethodCall.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper .addSourceFile("MultipleUnaryOperatorsInMethodCallPositiveCases.java") .doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper .addSourceFile("MultipleUnaryOperatorsInMethodCallNegativeCases.java") .doTest(); diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/NarrowingCompoundAssignmentTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/NarrowingCompoundAssignmentTest.java index 7d2f5fc8039..1d6360a7f9d 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/NarrowingCompoundAssignmentTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/NarrowingCompoundAssignmentTest.java @@ -30,7 +30,7 @@ public class NarrowingCompoundAssignmentTest { CompilationTestHelper.newInstance(NarrowingCompoundAssignment.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper .addSourceLines( "Test.java", @@ -58,7 +58,7 @@ public void testPositiveCase() { } @Test - public void testAllOps() { + public void allOps() { compilationHelper .addSourceLines( "Test.java", @@ -87,7 +87,7 @@ public void testAllOps() { } @Test - public void testDeficientRightShift() { + public void deficientRightShift() { compilationHelper .addSourceLines( "Test.java", @@ -101,7 +101,7 @@ public void testDeficientRightShift() { } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper .addSourceLines( "Test.java", @@ -119,7 +119,7 @@ public void testNegativeCase() { } @Test - public void testFloatFloat() { + public void floatFloat() { compilationHelper .addSourceLines( "Test.java", @@ -137,7 +137,7 @@ public void testFloatFloat() { // bit twiddling deficient types with masks of the same width is fine @Test - public void testBitTwiddle() { + public void bitTwiddle() { compilationHelper .addSourceLines( "Test.java", @@ -167,7 +167,7 @@ public void testBitTwiddle() { // bit twiddling deficient types with constant masks of the same width is fine @Test - public void testBitTwiddleConstant() { + public void bitTwiddleConstant() { compilationHelper .addSourceLines( "Test.java", @@ -232,7 +232,7 @@ public void allowsBinopsOfDeficientTypes() { } @Test - public void testPreservePrecedence() { + public void preservePrecedence() { compilationHelper .addSourceLines( "Test.java", @@ -247,7 +247,7 @@ public void testPreservePrecedence() { } @Test - public void testPreservePrecedence2() { + public void preservePrecedence2() { compilationHelper .addSourceLines( "Test.java", @@ -262,7 +262,7 @@ public void testPreservePrecedence2() { } @Test - public void testPreservePrecedence3() { + public void preservePrecedence3() { compilationHelper .addSourceLines( "Test.java", @@ -277,128 +277,128 @@ public void testPreservePrecedence3() { } @Test - public void testPreservePrecedenceExhaustive_multMult() throws Exception { + public void preservePrecedenceExhaustive_multMult() throws Exception { testPrecedence("*", "*", /* parens= */ true); } @Test - public void testPreservePrecedenceExhaustive_multPlus() throws Exception { + public void preservePrecedenceExhaustive_multPlus() throws Exception { testPrecedence("*", "+", /* parens= */ true); } @Test - public void testPreservePrecedenceExhaustive_multLShift() throws Exception { + public void preservePrecedenceExhaustive_multLShift() throws Exception { testPrecedence("*", "<<", /* parens= */ true); } @Test - public void testPreservePrecedenceExhaustive_multAnd() throws Exception { + public void preservePrecedenceExhaustive_multAnd() throws Exception { testPrecedence("*", "&", /* parens= */ true); } @Test - public void testPreservePrecedenceExhaustive_multOr() throws Exception { + public void preservePrecedenceExhaustive_multOr() throws Exception { testPrecedence("*", "|", /* parens= */ true); } @Test - public void testPreservePrecedenceExhaustive_plusMult() throws Exception { + public void preservePrecedenceExhaustive_plusMult() throws Exception { testPrecedence("+", "*", /* parens= */ false); } @Test - public void testPreservePrecedenceExhaustive_plusPlus() throws Exception { + public void preservePrecedenceExhaustive_plusPlus() throws Exception { testPrecedence("+", "+", /* parens= */ true); } @Test - public void testPreservePrecedenceExhaustive_plusLShift() throws Exception { + public void preservePrecedenceExhaustive_plusLShift() throws Exception { testPrecedence("+", "<<", /* parens= */ true); } @Test - public void testPreservePrecedenceExhaustive_plusAnd() throws Exception { + public void preservePrecedenceExhaustive_plusAnd() throws Exception { testPrecedence("+", "&", /* parens= */ true); } @Test - public void testPreservePrecedenceExhaustive_plusOr() throws Exception { + public void preservePrecedenceExhaustive_plusOr() throws Exception { testPrecedence("+", "|", /* parens= */ true); } @Test - public void testPreservePrecedenceExhaustive_lShiftMult() throws Exception { + public void preservePrecedenceExhaustive_lShiftMult() throws Exception { testPrecedence("<<", "*", /* parens= */ false); } @Test - public void testPreservePrecedenceExhaustive_lShiftPlus() throws Exception { + public void preservePrecedenceExhaustive_lShiftPlus() throws Exception { testPrecedence("<<", "+", /* parens= */ false); } @Test - public void testPreservePrecedenceExhaustive_lShiftLShift() throws Exception { + public void preservePrecedenceExhaustive_lShiftLShift() throws Exception { testPrecedence("<<", "<<", /* parens= */ true); } @Test - public void testPreservePrecedenceExhaustive_lShiftAnd() throws Exception { + public void preservePrecedenceExhaustive_lShiftAnd() throws Exception { testPrecedence("<<", "&", /* parens= */ true); } @Test - public void testPreservePrecedenceExhaustive_lShiftOr() throws Exception { + public void preservePrecedenceExhaustive_lShiftOr() throws Exception { testPrecedence("<<", "|", /* parens= */ true); } @Test - public void testPreservePrecedenceExhaustive_andMult() throws Exception { + public void preservePrecedenceExhaustive_andMult() throws Exception { testPrecedence("&", "*", /* parens= */ false); } @Test - public void testPreservePrecedenceExhaustive_andPlus() throws Exception { + public void preservePrecedenceExhaustive_andPlus() throws Exception { testPrecedence("&", "+", /* parens= */ false); } @Test - public void testPreservePrecedenceExhaustive_andLShift() throws Exception { + public void preservePrecedenceExhaustive_andLShift() throws Exception { testPrecedence("&", "<<", /* parens= */ false); } @Test - public void testPreservePrecedenceExhaustive_andAnd() throws Exception { + public void preservePrecedenceExhaustive_andAnd() throws Exception { testPrecedence("&", "&", /* parens= */ true); } @Test - public void testPreservePrecedenceExhaustive_andOr() throws Exception { + public void preservePrecedenceExhaustive_andOr() throws Exception { testPrecedence("&", "|", /* parens= */ true); } @Test - public void testPreservePrecedenceExhaustive_orMult() throws Exception { + public void preservePrecedenceExhaustive_orMult() throws Exception { testPrecedence("|", "*", /* parens= */ false); } @Test - public void testPreservePrecedenceExhaustive_orPlus() throws Exception { + public void preservePrecedenceExhaustive_orPlus() throws Exception { testPrecedence("|", "+", /* parens= */ false); } @Test - public void testPreservePrecedenceExhaustive_orLShift() throws Exception { + public void preservePrecedenceExhaustive_orLShift() throws Exception { testPrecedence("|", "<<", /* parens= */ false); } @Test - public void testPreservePrecedenceExhaustive_orAnd() throws Exception { + public void preservePrecedenceExhaustive_orAnd() throws Exception { testPrecedence("|", "&", /* parens= */ false); } @Test - public void testPreservePrecedenceExhaustive_orOr() throws Exception { + public void preservePrecedenceExhaustive_orOr() throws Exception { testPrecedence("|", "|", /* parens= */ true); } @@ -425,7 +425,7 @@ private void testPrecedence(String opA, String opB, boolean parens) { } @Test - public void testDoubleLong() { + public void doubleLong() { compilationHelper .addSourceLines( "Test.java", @@ -441,7 +441,7 @@ public void testDoubleLong() { } @Test - public void testDoubleInt() { + public void doubleInt() { compilationHelper .addSourceLines( "Test.java", @@ -457,7 +457,7 @@ public void testDoubleInt() { } @Test - public void testFloatLong() { + public void floatLong() { compilationHelper .addSourceLines( "Test.java", @@ -473,7 +473,7 @@ public void testFloatLong() { } @Test - public void testFloatInt() { + public void floatInt() { compilationHelper .addSourceLines( "Test.java", @@ -573,7 +573,7 @@ public void exhaustiveTypes() { } @Test - public void testBoxing() { + public void boxing() { compilationHelper .addSourceLines( "Test.java", @@ -588,7 +588,7 @@ public void testBoxing() { } @Test - public void testStringConcat() { + public void stringConcat() { compilationHelper .addSourceLines( "Test.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/NestedInstanceOfConditionsTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/NestedInstanceOfConditionsTest.java index ca2136b1fef..817782e711b 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/NestedInstanceOfConditionsTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/NestedInstanceOfConditionsTest.java @@ -32,12 +32,12 @@ public class NestedInstanceOfConditionsTest { CompilationTestHelper.newInstance(NestedInstanceOfConditions.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.addSourceFile("NestedInstanceOfConditionsPositiveCases.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("NestedInstanceOfConditionsNegativeCases.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/NoAllocationCheckerTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/NoAllocationCheckerTest.java index b26b04fab73..8b81e2541c2 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/NoAllocationCheckerTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/NoAllocationCheckerTest.java @@ -31,12 +31,12 @@ public class NoAllocationCheckerTest { CompilationTestHelper.newInstance(NoAllocationChecker.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.addSourceFile("NoAllocationCheckerPositiveCases.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("NoAllocationCheckerNegativeCases.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/NonAtomicVolatileUpdateTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/NonAtomicVolatileUpdateTest.java index 6e9c1555c1f..444f0d2e5af 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/NonAtomicVolatileUpdateTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/NonAtomicVolatileUpdateTest.java @@ -29,12 +29,12 @@ public class NonAtomicVolatileUpdateTest { CompilationTestHelper.newInstance(NonAtomicVolatileUpdate.class, getClass()); @Test - public void testPositiveCases() { + public void positiveCases() { compilationHelper.addSourceFile("NonAtomicVolatileUpdatePositiveCases.java").doTest(); } @Test - public void testNegativeCases() { + public void negativeCases() { compilationHelper.addSourceFile("NonAtomicVolatileUpdateNegativeCases.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/NonOverridingEqualsTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/NonOverridingEqualsTest.java index 3566b00835f..004c85f3e22 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/NonOverridingEqualsTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/NonOverridingEqualsTest.java @@ -31,7 +31,7 @@ public class NonOverridingEqualsTest { // Positive cases @Test - public void testFlagsSimpleCovariantEqualsMethod() { + public void flagsSimpleCovariantEqualsMethod() { compilationHelper .addSourceLines( "Test.java", @@ -47,7 +47,7 @@ public void testFlagsSimpleCovariantEqualsMethod() { // The following two tests are really to help debug the construction of the suggested fixes. @Test - public void testFlagsComplicatedCovariantEqualsMethod() { + public void flagsComplicatedCovariantEqualsMethod() { compilationHelper .addSourceLines( "Test.java", @@ -65,7 +65,7 @@ public void testFlagsComplicatedCovariantEqualsMethod() { } @Test - public void testFlagsAnotherComplicatedCovariantEqualsMethod() { + public void flagsAnotherComplicatedCovariantEqualsMethod() { compilationHelper .addSourceLines( "Test.java", @@ -82,7 +82,7 @@ public void testFlagsAnotherComplicatedCovariantEqualsMethod() { } @Test - public void testFlagsAbstractCovariantEqualsMethod() { + public void flagsAbstractCovariantEqualsMethod() { compilationHelper .addSourceLines( "Test.java", @@ -94,7 +94,7 @@ public void testFlagsAbstractCovariantEqualsMethod() { } @Test - public void testFlagsNativeCovariantEqualsMethod() { + public void flagsNativeCovariantEqualsMethod() { compilationHelper .addSourceLines( "Test.java", @@ -106,7 +106,7 @@ public void testFlagsNativeCovariantEqualsMethod() { } @Test - public void testFlagsIfMethodTakesUnrelatedType() { + public void flagsIfMethodTakesUnrelatedType() { compilationHelper .addSourceLines( "Test.java", @@ -120,7 +120,7 @@ public void testFlagsIfMethodTakesUnrelatedType() { } @Test - public void testFlagsBoxedBooleanReturnType() { + public void flagsBoxedBooleanReturnType() { compilationHelper .addSourceLines( "Test.java", @@ -134,7 +134,7 @@ public void testFlagsBoxedBooleanReturnType() { } @Test - public void testFlagsCovariantEqualsMethodInEnum() { + public void flagsCovariantEqualsMethodInEnum() { compilationHelper .addSourceLines( "Planet.java", @@ -158,7 +158,7 @@ public void testFlagsCovariantEqualsMethodInEnum() { } @Test - public void testFlagsPrivateEqualsMethod() { + public void flagsPrivateEqualsMethod() { compilationHelper .addSourceLines( "Test.java", @@ -172,7 +172,7 @@ public void testFlagsPrivateEqualsMethod() { } @Test - public void testFlagsEvenIfAnotherMethodOverridesEquals() { + public void flagsEvenIfAnotherMethodOverridesEquals() { compilationHelper .addSourceLines( "Test.java", @@ -194,7 +194,7 @@ public void testFlagsEvenIfAnotherMethodOverridesEquals() { * single-argument static equals method... */ @Test - public void testFlagsStaticEqualsMethod() { + public void flagsStaticEqualsMethod() { compilationHelper .addSourceLines( "Test.java", @@ -210,7 +210,7 @@ public void testFlagsStaticEqualsMethod() { // Negative cases @Test - public void testDontFlagMethodThatOverridesEquals() { + public void dontFlagMethodThatOverridesEquals() { compilationHelper .addSourceLines( "Test.java", @@ -223,7 +223,7 @@ public void testDontFlagMethodThatOverridesEquals() { } @Test - public void testDontFlagEqualsMethodWithMoreThanOneParameter() { + public void dontFlagEqualsMethodWithMoreThanOneParameter() { compilationHelper .addSourceLines( "Test.java", @@ -236,7 +236,7 @@ public void testDontFlagEqualsMethodWithMoreThanOneParameter() { } @Test - public void testDontFlagIfWrongReturnType() { + public void dontFlagIfWrongReturnType() { compilationHelper .addSourceLines( "Test.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/NonRuntimeAnnotationTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/NonRuntimeAnnotationTest.java index 121ea8bfad9..80759f41ba8 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/NonRuntimeAnnotationTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/NonRuntimeAnnotationTest.java @@ -31,12 +31,12 @@ public class NonRuntimeAnnotationTest { CompilationTestHelper.newInstance(NonRuntimeAnnotation.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.addSourceFile("NonRuntimeAnnotationPositiveCases.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("NonRuntimeAnnotationNegativeCases.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/NullablePrimitiveTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/NullablePrimitiveTest.java index aad15744e49..8a55c0479de 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/NullablePrimitiveTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/NullablePrimitiveTest.java @@ -30,12 +30,12 @@ public class NullablePrimitiveTest { CompilationTestHelper.newInstance(NullablePrimitive.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.addSourceFile("NullablePrimitivePositiveCases.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("NullablePrimitiveNegativeCases.java").doTest(); } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/ObjectEqualsForPrimitivesTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/ObjectEqualsForPrimitivesTest.java index 31120307d9c..14340cf6647 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/ObjectEqualsForPrimitivesTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/ObjectEqualsForPrimitivesTest.java @@ -31,7 +31,7 @@ public class ObjectEqualsForPrimitivesTest { BugCheckerRefactoringTestHelper.newInstance(ObjectEqualsForPrimitives.class, getClass()); @Test - public void testBoxedIntegers() { + public void boxedIntegers() { refactoringHelper .addInputLines( "Test.java", @@ -46,7 +46,7 @@ public void testBoxedIntegers() { } @Test - public void testBoxedAndPrimitive() { + public void boxedAndPrimitive() { refactoringHelper .addInputLines( "Test.java", @@ -61,7 +61,7 @@ public void testBoxedAndPrimitive() { } @Test - public void testPrimitiveAndBoxed() { + public void primitiveAndBoxed() { refactoringHelper .addInputLines( "Test.java", @@ -76,7 +76,7 @@ public void testPrimitiveAndBoxed() { } @Test - public void testObjects() { + public void objects() { refactoringHelper .addInputLines( "Test.java", @@ -91,7 +91,7 @@ public void testObjects() { } @Test - public void testPrimitives() { + public void primitives() { refactoringHelper .addInputLines( "Test.java", @@ -125,7 +125,7 @@ public void testPrimitives() { } @Test - public void testPrimitivesNegated() { + public void primitivesNegated() { refactoringHelper .addInputLines( "Test.java", @@ -159,7 +159,7 @@ public void testPrimitivesNegated() { } @Test - public void testIntAndLong() { + public void intAndLong() { refactoringHelper .addInputLines( "Test.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/ObjectToStringTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/ObjectToStringTest.java index 0b9c805d44b..b645543531e 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/ObjectToStringTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/ObjectToStringTest.java @@ -39,12 +39,12 @@ public class ObjectToStringTest { CompilationTestHelper.newInstance(ObjectToString.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.addSourceFile("ObjectToStringPositiveCases.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("ObjectToStringNegativeCases.java").doTest(); } @@ -79,7 +79,7 @@ public Description matchClass(ClassTree tree, VisitorState state) { // don't complain if we can't load the type hierarchy of a class that is toString()'d @Test - public void testIncompleteClasspath() { + public void incompleteClasspath() { CompilationTestHelper.newInstance( ScannerSupplier.fromBugCheckerClasses(ObjectToString.class, CompletionChecker.class), getClass()) diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/OptionalEqualityTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/OptionalEqualityTest.java index e027c0e287b..69a2d361b59 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/OptionalEqualityTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/OptionalEqualityTest.java @@ -31,7 +31,7 @@ public class OptionalEqualityTest { CompilationTestHelper.newInstance(OptionalEquality.class, getClass()); @Test - public void testPositiveCase_equal() { + public void positiveCase_equal() { compilationHelper .addSourceLines( "Test.java", @@ -46,7 +46,7 @@ public void testPositiveCase_equal() { } @Test - public void testPositiveCase_notEqual() { + public void positiveCase_notEqual() { compilationHelper .addSourceLines( "Test.java", @@ -61,7 +61,7 @@ public void testPositiveCase_notEqual() { } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper .addSourceLines( "Test.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/OptionalNotPresentTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/OptionalNotPresentTest.java index e257db469b5..2412925d02d 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/OptionalNotPresentTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/OptionalNotPresentTest.java @@ -30,12 +30,12 @@ public class OptionalNotPresentTest { CompilationTestHelper.newInstance(OptionalNotPresent.class, getClass()); @Test - public void testNegativeCases() { + public void negativeCases() { compilationTestHelper.addSourceFile("OptionalNotPresentNegativeCases.java").doTest(); } @Test - public void testPositiveCases() { + public void positiveCases() { compilationTestHelper.addSourceFile("OptionalNotPresentPositiveCases.java").doTest(); } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/OverrideThrowableToStringTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/OverrideThrowableToStringTest.java index a2a50b3ec48..2da0d0b461f 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/OverrideThrowableToStringTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/OverrideThrowableToStringTest.java @@ -41,7 +41,7 @@ public void negativeCases() { } @Test - public void testFixes() { + public void fixes() { BugCheckerRefactoringTestHelper.newInstance(OverrideThrowableToString.class, getClass()) .addInput("OverrideThrowableToStringPositiveCases.java") .addOutput("OverrideThrowableToStringPositiveCases_expected.java") diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/OverridesTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/OverridesTest.java index dbb9519e1b7..3b60a8501e8 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/OverridesTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/OverridesTest.java @@ -30,42 +30,42 @@ public class OverridesTest { CompilationTestHelper.newInstance(Overrides.class, getClass()); @Test - public void testPositiveCase1() { + public void positiveCase1() { compilationHelper.addSourceFile("OverridesPositiveCase1.java").doTest(); } @Test - public void testPositiveCase2() { + public void positiveCase2() { compilationHelper.addSourceFile("OverridesPositiveCase2.java").doTest(); } @Test - public void testPositiveCase3() { + public void positiveCase3() { compilationHelper.addSourceFile("OverridesPositiveCase3.java").doTest(); } @Test - public void testPositiveCase4() { + public void positiveCase4() { compilationHelper.addSourceFile("OverridesPositiveCase4.java").doTest(); } @Test - public void testPositiveCase5() { + public void positiveCase5() { compilationHelper.addSourceFile("OverridesPositiveCase5.java").doTest(); } @Test - public void testNegativeCase1() { + public void negativeCase1() { compilationHelper.addSourceFile("OverridesNegativeCase1.java").doTest(); } @Test - public void testNegativeCase2() { + public void negativeCase2() { compilationHelper.addSourceFile("OverridesNegativeCase2.java").doTest(); } @Test - public void testNegativeCase3() { + public void negativeCase3() { compilationHelper.addSourceFile("OverridesNegativeCase3.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/PreconditionsCheckNotNullRepeatedTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/PreconditionsCheckNotNullRepeatedTest.java index 3001c0b07d3..21b1e0dd55a 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/PreconditionsCheckNotNullRepeatedTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/PreconditionsCheckNotNullRepeatedTest.java @@ -37,7 +37,7 @@ public class PreconditionsCheckNotNullRepeatedTest { CompilationTestHelper.newInstance(PreconditionsCheckNotNullRepeated.class, getClass()); @Test - public void testPositiveMatchesWithReplacement() { + public void positiveMatchesWithReplacement() { testHelper .addInputLines( "in/Test.java", @@ -87,7 +87,7 @@ public void flagArgInVarargs() { } @Test - public void testNegativeCases() { + public void negativeCases() { compilationHelper .addSourceLines( "out/Test.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/PreconditionsInvalidPlaceholderTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/PreconditionsInvalidPlaceholderTest.java index 195c97dd69f..b0005b3e53f 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/PreconditionsInvalidPlaceholderTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/PreconditionsInvalidPlaceholderTest.java @@ -30,12 +30,12 @@ public class PreconditionsInvalidPlaceholderTest { CompilationTestHelper.newInstance(PreconditionsInvalidPlaceholder.class, getClass()); @Test - public void testPositiveCase1() { + public void positiveCase1() { compilationHelper.addSourceFile("PreconditionsInvalidPlaceholderPositiveCase1.java").doTest(); } @Test - public void testNegativeCase1() { + public void negativeCase1() { compilationHelper.addSourceFile("PreconditionsInvalidPlaceholderNegativeCase1.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/PrimitiveArrayPassedToVarargsMethodTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/PrimitiveArrayPassedToVarargsMethodTest.java index 520c0d7a1ba..60eb4280217 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/PrimitiveArrayPassedToVarargsMethodTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/PrimitiveArrayPassedToVarargsMethodTest.java @@ -31,14 +31,14 @@ public class PrimitiveArrayPassedToVarargsMethodTest { CompilationTestHelper.newInstance(PrimitiveArrayPassedToVarargsMethod.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper .addSourceFile("PrimitiveArrayPassedToVarargsMethodPositiveCases.java") .doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper .addSourceFile("PrimitiveArrayPassedToVarargsMethodNegativeCases.java") .doTest(); diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/PrivateSecurityContractProtoAccessTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/PrivateSecurityContractProtoAccessTest.java index d262c20bdc6..1329aa8d098 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/PrivateSecurityContractProtoAccessTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/PrivateSecurityContractProtoAccessTest.java @@ -27,21 +27,21 @@ public class PrivateSecurityContractProtoAccessTest { CompilationTestHelper.newInstance(PrivateSecurityContractProtoAccess.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper .addSourceFile("PrivateSecurityContractProtoAccessPositiveCases.java") .doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper .addSourceFile("PrivateSecurityContractProtoAccessNegativeCases.java") .doTest(); } @Test - public void testSafeHtmlAccessWithinPackage() { + public void safeHtmlAccessWithinPackage() { compilationHelper .addSourceLines( "Test.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/ProtectedMembersInFinalClassTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/ProtectedMembersInFinalClassTest.java index 3afbb8de349..b20b1349676 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/ProtectedMembersInFinalClassTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/ProtectedMembersInFinalClassTest.java @@ -35,7 +35,7 @@ public class ProtectedMembersInFinalClassTest { CompilationTestHelper.newInstance(ProtectedMembersInFinalClass.class, getClass()); @Test - public void testPositiveCases() { + public void positiveCases() { testHelper .addInputLines( "in/Test.java", @@ -57,7 +57,7 @@ public void testPositiveCases() { } @Test - public void testNegativeCases() { + public void negativeCases() { compilationHelper .addSourceLines( "in/Base.java", // @@ -79,7 +79,7 @@ public void testNegativeCases() { } @Test - public void testDiagnosticStringWithMultipleMemberMatches() { + public void diagnosticStringWithMultipleMemberMatches() { compilationHelper .addSourceLines( "in/Test.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/ProtoRedundantSetTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/ProtoRedundantSetTest.java index 24d9a3bfb00..16ad2354545 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/ProtoRedundantSetTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/ProtoRedundantSetTest.java @@ -36,7 +36,7 @@ public final class ProtoRedundantSetTest { CompilationTestHelper.newInstance(ProtoRedundantSet.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper .addSourceLines( "ProtoRedundantSetPositiveCases.java", @@ -140,7 +140,7 @@ public void complexChaining() { } @Test - public void testFixes() { + public void fixes() { BugCheckerRefactoringTestHelper.newInstance(ProtoRedundantSet.class, getClass()) .addInputLines( "ProtoRedundantSetPositiveCases.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/ProtocolBufferOrdinalTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/ProtocolBufferOrdinalTest.java index d2fe4a01f27..f31c7befdeb 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/ProtocolBufferOrdinalTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/ProtocolBufferOrdinalTest.java @@ -33,12 +33,12 @@ public class ProtocolBufferOrdinalTest { CompilationTestHelper.newInstance(ProtocolBufferOrdinal.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.addSourceFile("ProtocolBufferOrdinalPositiveCases.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("ProtocolBufferOrdinalNegativeCases.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/ReferenceEqualityTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/ReferenceEqualityTest.java index 57e5ab53315..259d72235b3 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/ReferenceEqualityTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/ReferenceEqualityTest.java @@ -250,7 +250,7 @@ public void negative_enum() { } @Test - public void test_customEnum() { + public void customEnum() { compilationHelper .addSourceLines( "Kind.java", @@ -348,7 +348,7 @@ public void g(Missing m) {} } @Test - public void testErroneous() { + public void erroneous() { compilationHelper .addSourceLines( "Test.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/RequiredModifiersCheckerTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/RequiredModifiersCheckerTest.java index 3cb68cbb1ff..39804d7b68d 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/RequiredModifiersCheckerTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/RequiredModifiersCheckerTest.java @@ -55,7 +55,7 @@ public class RequiredModifiersCheckerTest { JavaFileObject publicAndFinalRequired; @Test - public void testAnnotationWithRequiredModifiersMissingOnClassFails() { + public void annotationWithRequiredModifiersMissingOnClassFails() { compilationHelper .addSourceLines( "test/RequiredModifiersTestCase.java", @@ -69,7 +69,7 @@ public void testAnnotationWithRequiredModifiersMissingOnClassFails() { } @Test - public void testAnnotationWithRequiredModifiersMissingOnFieldFails1() { + public void annotationWithRequiredModifiersMissingOnFieldFails1() { compilationHelper .addSourceLines( "test/RequiredModifiersTestCase.java", @@ -84,7 +84,7 @@ public void testAnnotationWithRequiredModifiersMissingOnFieldFails1() { } @Test - public void testAnnotationWithRequiredModifiersMissingOnFieldFails2() { + public void annotationWithRequiredModifiersMissingOnFieldFails2() { compilationHelper .addSourceLines( "test/RequiredModifiersTestCase.java", @@ -99,7 +99,7 @@ public void testAnnotationWithRequiredModifiersMissingOnFieldFails2() { } @Test - public void testAnnotationWithRequiredModifiersMissingOnFieldFails3() { + public void annotationWithRequiredModifiersMissingOnFieldFails3() { compilationHelper .addSourceLines( "test/RequiredModifiersTestCase.java", @@ -114,7 +114,7 @@ public void testAnnotationWithRequiredModifiersMissingOnFieldFails3() { } @Test - public void testAnnotationWithRequiredModifiersMissingOnMethodFails1() { + public void annotationWithRequiredModifiersMissingOnMethodFails1() { compilationHelper .addSourceLines( "test/RequiredModifiersTestCase.java", @@ -129,7 +129,7 @@ public void testAnnotationWithRequiredModifiersMissingOnMethodFails1() { } @Test - public void testAnnotationWithRequiredModifiersMissingOnMethodFails2() { + public void annotationWithRequiredModifiersMissingOnMethodFails2() { compilationHelper .addSourceLines( "test/RequiredModifiersTestCase.java", @@ -144,7 +144,7 @@ public void testAnnotationWithRequiredModifiersMissingOnMethodFails2() { } @Test - public void testAnnotationWithRequiredModifiersMissingOnMethodFails3() { + public void annotationWithRequiredModifiersMissingOnMethodFails3() { compilationHelper .addSourceLines( "test/RequiredModifiersTestCase.java", @@ -159,7 +159,7 @@ public void testAnnotationWithRequiredModifiersMissingOnMethodFails3() { } @Test - public void testHasRequiredModifiersSucceeds() { + public void hasRequiredModifiersSucceeds() { compilationHelper .addSourceLines( "test/RequiredModifiersTestCase.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/RestrictedApiCheckerTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/RestrictedApiCheckerTest.java index 2ee3354d096..832950e4cca 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/RestrictedApiCheckerTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/RestrictedApiCheckerTest.java @@ -45,7 +45,7 @@ protected RestrictedApiCheckerTest(Class checker) { } @Test - public void testNormalCallAllowed() { + public void normalCallAllowed() { helper .addSourceLines( "Testcase.java", @@ -60,7 +60,7 @@ public void testNormalCallAllowed() { } @Test - public void testRestrictedCallProhibited() { + public void restrictedCallProhibited() { helper .addSourceLines( "Testcase.java", @@ -78,7 +78,7 @@ public void testRestrictedCallProhibited() { } @Test - public void testRestrictedCallProhibited_inherited() { + public void restrictedCallProhibited_inherited() { helper .addSourceLines( "Testcase.java", @@ -100,7 +100,7 @@ public void testRestrictedCallProhibited_inherited() { } @Test - public void testRestrictedCallAllowedOnAllowlistedPath() { + public void restrictedCallAllowedOnAllowlistedPath() { helper .addSourceLines( "testsuite/Testcase.java", @@ -116,7 +116,7 @@ public void testRestrictedCallAllowedOnAllowlistedPath() { } @Test - public void testRestrictedStaticCallProhibited() { + public void restrictedStaticCallProhibited() { helper .addSourceLines( "Testcase.java", @@ -134,7 +134,7 @@ public void testRestrictedStaticCallProhibited() { } @Test - public void testRestrictedConstructorProhibited() { + public void restrictedConstructorProhibited() { helper .addSourceLines( "Testcase.java", @@ -152,7 +152,7 @@ public void testRestrictedConstructorProhibited() { } @Test - public void testRestrictedConstructorViaAnonymousClassProhibited() { + public void restrictedConstructorViaAnonymousClassProhibited() { helper .addSourceLines( "Testcase.java", @@ -168,7 +168,7 @@ public void testRestrictedConstructorViaAnonymousClassProhibited() { } @Test - public void testRestrictedConstructorViaAnonymousClassAllowed() { + public void restrictedConstructorViaAnonymousClassAllowed() { helper .addSourceLines( "Testcase.java", @@ -184,7 +184,7 @@ public void testRestrictedConstructorViaAnonymousClassAllowed() { } @Test - public void testRestrictedCallAnonymousClassFromInterface() { + public void restrictedCallAnonymousClassFromInterface() { helper .addSourceLines( "Testcase.java", @@ -204,7 +204,7 @@ public void testRestrictedCallAnonymousClassFromInterface() { } @Test - public void testImplicitRestrictedConstructorProhibited() { + public void implicitRestrictedConstructorProhibited() { helper .addSourceLines( "Testcase.java", @@ -219,7 +219,7 @@ public void testImplicitRestrictedConstructorProhibited() { @Ignore("Doesn't work yet") @Test - public void testImplicitRestrictedConstructorProhibited_implicitConstructor() { + public void implicitRestrictedConstructorProhibited_implicitConstructor() { helper .addSourceLines( "Testcase.java", @@ -231,7 +231,7 @@ public void testImplicitRestrictedConstructorProhibited_implicitConstructor() { } @Test - public void testAllowWithWarning() { + public void allowWithWarning() { helper .addSourceLines( "Testcase.java", @@ -250,7 +250,7 @@ public void testAllowWithWarning() { } @Test - public void testAllowWithoutWarning() { + public void allowWithoutWarning() { helper .addSourceLines( "Testcase.java", @@ -268,7 +268,7 @@ public void testAllowWithoutWarning() { // Regression test for b/36160747 @Test - public void testAllowAllDefinitionsInFile() { + public void allowAllDefinitionsInFile() { helper .addSourceLines( "Testcase.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/ReturnValueIgnoredTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/ReturnValueIgnoredTest.java index 864641c44f4..5441627dd25 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/ReturnValueIgnoredTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/ReturnValueIgnoredTest.java @@ -33,12 +33,12 @@ public class ReturnValueIgnoredTest { BugCheckerRefactoringTestHelper.newInstance(ReturnValueIgnored.class, getClass()); @Test - public void testPositiveCases() { + public void positiveCases() { compilationHelper.addSourceFile("ReturnValueIgnoredPositiveCases.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("ReturnValueIgnoredNegativeCases.java").doTest(); } @@ -442,7 +442,7 @@ public void constructors() { } @Test - public void testProtoMessageNewBuilder() { + public void protoMessageNewBuilder() { compilationHelper .addSourceLines( "test.java", @@ -459,7 +459,7 @@ public void testProtoMessageNewBuilder() { } @Test - public void testProtoMessageBuildBuildPartial() { + public void protoMessageBuildBuildPartial() { compilationHelper .addSourceLines( "Test.java", @@ -553,7 +553,7 @@ public void refactoringDoesNotAssignToOriginalForTypeArgumentMismatch() { } @Test - public void testIterableHasNext() { + public void iterableHasNext() { compilationHelper .addSourceLines( "Test.java", @@ -578,7 +578,7 @@ public void testIterableHasNext() { } @Test - public void testCollectionToArray() { + public void collectionToArray() { compilationHelper .addSourceLines( "Test.java", @@ -598,7 +598,7 @@ public void testCollectionToArray() { } @Test - public void testCollectionToArray_java8() { + public void collectionToArray_java8() { compilationHelper .addSourceLines( "Test.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/SelfAlwaysReturnsThisTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/SelfAlwaysReturnsThisTest.java index 7d99c957cb5..2cf8bb68b3a 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/SelfAlwaysReturnsThisTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/SelfAlwaysReturnsThisTest.java @@ -29,7 +29,7 @@ public class SelfAlwaysReturnsThisTest { BugCheckerRefactoringTestHelper.newInstance(SelfAlwaysReturnsThis.class, getClass()); @Test - public void testSelfReturnsThis() { + public void selfReturnsThis() { helper .addInputLines( "Builder.java", @@ -44,7 +44,7 @@ public void testSelfReturnsThis() { } @Test - public void testSelfReturnsThis_withCast() { + public void selfReturnsThis_withCast() { helper .addInputLines( "Builder.java", @@ -59,7 +59,7 @@ public void testSelfReturnsThis_withCast() { } @Test - public void testSelfReturnsThis_withParenthesizedCast() { + public void selfReturnsThis_withParenthesizedCast() { helper .addInputLines( "Builder.java", @@ -74,7 +74,7 @@ public void testSelfReturnsThis_withParenthesizedCast() { } @Test - public void testSelfReturnsThis_withCastAndTryCatch() { + public void selfReturnsThis_withCastAndTryCatch() { helper .addInputLines( "Builder.java", @@ -94,7 +94,7 @@ public void testSelfReturnsThis_withCastAndTryCatch() { } @Test - public void testSelfReturnsThis_withMultipleReturnStatements() { + public void selfReturnsThis_withMultipleReturnStatements() { helper .addInputLines( "Builder.java", @@ -113,7 +113,7 @@ public void testSelfReturnsThis_withMultipleReturnStatements() { } @Test - public void testSelfReturnsThis_withTwoStatementCast() { + public void selfReturnsThis_withTwoStatementCast() { helper .addInputLines( "Builder.java", @@ -130,7 +130,7 @@ public void testSelfReturnsThis_withTwoStatementCast() { } @Test - public void testSelfReturnsThis_withImplComment() { + public void selfReturnsThis_withImplComment() { helper .addInputLines( "Builder.java", @@ -146,7 +146,7 @@ public void testSelfReturnsThis_withImplComment() { } @Test - public void testSelfReturnsThis_withInlineComment() { + public void selfReturnsThis_withInlineComment() { helper .addInputLines( "Builder.java", @@ -161,7 +161,7 @@ public void testSelfReturnsThis_withInlineComment() { } @Test - public void testSelfReturnsNewBuilder() { + public void selfReturnsNewBuilder() { helper .addInputLines( "Builder.java", @@ -183,7 +183,7 @@ public void testSelfReturnsNewBuilder() { } @Test - public void testGetThisReturnsNewBuilder() { + public void getThisReturnsNewBuilder() { helper .addInputLines( "Builder.java", @@ -205,7 +205,7 @@ public void testGetThisReturnsNewBuilder() { } @Test - public void testSelf_voidReturn() { + public void self_voidReturn() { helper .addInputLines( "Builder.java", @@ -219,7 +219,7 @@ public void testSelf_voidReturn() { } @Test - public void testSelf_differentReturnType() { + public void self_differentReturnType() { helper .addInputLines( "Builder.java", @@ -234,7 +234,7 @@ public void testSelf_differentReturnType() { } @Test - public void testSelf_static() { + public void self_static() { helper .addInputLines( "Builder.java", @@ -249,7 +249,7 @@ public void testSelf_static() { } @Test - public void testSelf_notNamedSelf() { + public void self_notNamedSelf() { helper .addInputLines( "Builder.java", @@ -264,7 +264,7 @@ public void testSelf_notNamedSelf() { } @Test - public void testSelf_hasParams() { + public void self_hasParams() { helper .addInputLines( "Builder.java", @@ -279,7 +279,7 @@ public void testSelf_hasParams() { } @Test - public void testSelf_abstract() { + public void self_abstract() { helper .addInputLines( "Builder.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/SelfAssignmentTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/SelfAssignmentTest.java index babfadaea1b..b7c8fed6292 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/SelfAssignmentTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/SelfAssignmentTest.java @@ -31,17 +31,17 @@ public class SelfAssignmentTest { CompilationTestHelper.newInstance(SelfAssignment.class, getClass()); @Test - public void testPositiveCases1() { + public void positiveCases1() { compilationHelper.addSourceFile("SelfAssignmentPositiveCases1.java").doTest(); } @Test - public void testPositiveCases2() { + public void positiveCases2() { compilationHelper.addSourceFile("SelfAssignmentPositiveCases2.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("SelfAssignmentNegativeCases.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/SelfComparisonTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/SelfComparisonTest.java index 13ea44c6c55..f91746f6f70 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/SelfComparisonTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/SelfComparisonTest.java @@ -37,12 +37,12 @@ public void setUp() { } @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.addSourceFile("SelfComparisonPositiveCase.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("SelfComparisonNegativeCases.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/SelfEqualsTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/SelfEqualsTest.java index 768a8b41a78..2e0d363448e 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/SelfEqualsTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/SelfEqualsTest.java @@ -37,12 +37,12 @@ public void setUp() { } @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.addSourceFile("SelfEqualsPositiveCase.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("SelfEqualsNegativeCases.java").doTest(); } @@ -63,12 +63,12 @@ public void positiveFix() { } @Test - public void testPositiveCase_guava() { + public void positiveCase_guava() { compilationHelper.addSourceFile("SelfEqualsGuavaPositiveCase.java").doTest(); } @Test - public void testNegativeCase_guava() { + public void negativeCase_guava() { compilationHelper.addSourceFile("SelfEqualsGuavaNegativeCases.java").doTest(); } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/ShouldHaveEvenArgsTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/ShouldHaveEvenArgsTest.java index 2992b920ecd..829cd685f54 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/ShouldHaveEvenArgsTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/ShouldHaveEvenArgsTest.java @@ -37,24 +37,24 @@ public void setUp() { } @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.addSourceFile("ShouldHaveEvenArgsPositiveCases.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("ShouldHaveEvenArgsNegativeCases.java").doTest(); } @org.junit.Ignore("Public truth doesn't contain this method") @Test - public void testPositiveCase_multimap() { + public void positiveCase_multimap() { compilationHelper.addSourceFile("ShouldHaveEvenArgsMultimapPositiveCases.java").doTest(); } @org.junit.Ignore("Public truth doesn't contain this method") @Test - public void testNegativeCase_multimap() { + public void negativeCase_multimap() { compilationHelper.addSourceFile("ShouldHaveEvenArgsMultimapNegativeCases.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/SizeGreaterThanOrEqualsZeroTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/SizeGreaterThanOrEqualsZeroTest.java index af598ba75fe..2422b7eac14 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/SizeGreaterThanOrEqualsZeroTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/SizeGreaterThanOrEqualsZeroTest.java @@ -36,12 +36,12 @@ public void setUp() { } @Test - public void testCollectionSizePositiveCases() { + public void collectionSizePositiveCases() { compilationHelper.addSourceFile("SizeGreaterThanOrEqualsZeroPositiveCases.java").doTest(); } @Test - public void testCollectionSizeNegativeCases() { + public void collectionSizeNegativeCases() { compilationHelper.addSourceFile("SizeGreaterThanOrEqualsZeroNegativeCases.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/StaticMockMemberTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/StaticMockMemberTest.java index f5a9a60426a..5dabb9b3009 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/StaticMockMemberTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/StaticMockMemberTest.java @@ -35,7 +35,7 @@ public class StaticMockMemberTest { CompilationTestHelper.newInstance(StaticMockMember.class, getClass()); @Test - public void testPositiveCases() { + public void positiveCases() { testHelper .addInputLines( "in/Test.java", @@ -61,7 +61,7 @@ public void testPositiveCases() { } @Test - public void testNegativeCases() { + public void negativeCases() { compilationHelper .addSourceLines( "in/Test.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/StaticQualifiedUsingExpressionTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/StaticQualifiedUsingExpressionTest.java index 2a03530027d..8f6a291e225 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/StaticQualifiedUsingExpressionTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/StaticQualifiedUsingExpressionTest.java @@ -34,17 +34,17 @@ public class StaticQualifiedUsingExpressionTest { BugCheckerRefactoringTestHelper.newInstance(StaticQualifiedUsingExpression.class, getClass()); @Test - public void testPositiveCase1() { + public void positiveCase1() { compilationHelper.addSourceFile("StaticQualifiedUsingExpressionPositiveCase1.java").doTest(); } @Test - public void testPositiveCase2() { + public void positiveCase2() { compilationHelper.addSourceFile("StaticQualifiedUsingExpressionPositiveCase2.java").doTest(); } @Test - public void testNegativeCases() { + public void negativeCases() { compilationHelper.addSourceFile("StaticQualifiedUsingExpressionNegativeCases.java").doTest(); } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/StringBuilderInitWithCharTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/StringBuilderInitWithCharTest.java index 650715684be..d0f3b1c4bce 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/StringBuilderInitWithCharTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/StringBuilderInitWithCharTest.java @@ -31,12 +31,12 @@ public class StringBuilderInitWithCharTest { CompilationTestHelper.newInstance(StringBuilderInitWithChar.class, getClass()); @Test - public void testPositiveCases() { + public void positiveCases() { compilationHelper.addSourceFile("StringBuilderInitWithCharPositiveCases.java").doTest(); } @Test - public void testNegativeCases() { + public void negativeCases() { compilationHelper.addSourceFile("StringBuilderInitWithCharNegativeCases.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/StringSplitterTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/StringSplitterTest.java index 5fb4d982675..b09df6e51f0 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/StringSplitterTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/StringSplitterTest.java @@ -400,14 +400,14 @@ public void immediateArrayAccess() { } @Test - public void testStringSplitPositive() { + public void stringSplitPositive() { CompilationTestHelper.newInstance(StringSplitter.class, getClass()) .addSourceFile("StringSplitterPositiveCases.java") .doTest(); } @Test - public void testStringSplitNegative() { + public void stringSplitNegative() { CompilationTestHelper.newInstance(StringSplitter.class, getClass()) .addSourceFile("StringSplitterNegativeCases.java") .doTest(); diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/SuppressWarningsDeprecatedTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/SuppressWarningsDeprecatedTest.java index 24bd9595254..ec786cd406a 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/SuppressWarningsDeprecatedTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/SuppressWarningsDeprecatedTest.java @@ -33,12 +33,12 @@ public class SuppressWarningsDeprecatedTest { CompilationTestHelper.newInstance(SuppressWarningsDeprecated.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.addSourceFile("SuppressWarningsDeprecatedPositiveCases.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("SuppressWarningsDeprecatedNegativeCases.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/SwigMemoryLeakTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/SwigMemoryLeakTest.java index adc9b0ac75e..31408e0cbb4 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/SwigMemoryLeakTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/SwigMemoryLeakTest.java @@ -31,12 +31,12 @@ public class SwigMemoryLeakTest { CompilationTestHelper.newInstance(SwigMemoryLeak.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.addSourceFile("SwigMemoryLeakPositiveCases.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("SwigMemoryLeakNegativeCases.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/ThreadJoinLoopTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/ThreadJoinLoopTest.java index 6632d516bde..9cd5c19fa9a 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/ThreadJoinLoopTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/ThreadJoinLoopTest.java @@ -37,17 +37,17 @@ public void setup() { } @Test - public void testPositiveCases() { + public void positiveCases() { compilationTestHelper.addSourceFile("ThreadJoinLoopPositiveCases.java").doTest(); } @Test - public void testNegativeCases() { + public void negativeCases() { compilationTestHelper.addSourceFile("ThreadJoinLoopNegativeCases.java").doTest(); } @Test - public void testFixes() { + public void fixes() { BugCheckerRefactoringTestHelper.newInstance(ThreadJoinLoop.class, getClass()) .addInput("ThreadJoinLoopPositiveCases.java") .addOutput("ThreadJoinLoopPositiveCases_expected.java") diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/ThreeLetterTimeZoneIDTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/ThreeLetterTimeZoneIDTest.java index fb20d94cdca..a6e3e66de9f 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/ThreeLetterTimeZoneIDTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/ThreeLetterTimeZoneIDTest.java @@ -41,7 +41,7 @@ public class ThreeLetterTimeZoneIDTest { CompilationTestHelper.newInstance(ThreeLetterTimeZoneID.class, getClass()); @Test - public void testAllThreeLetterIdsAreCoveredByZoneIdShortIds() { + public void allThreeLetterIdsAreCoveredByZoneIdShortIds() { // The check's logic is predicated on there being an entry in SHORT_IDS for all three-letter // IDs in TimeZone.getAvailableIDs() that aren't in ZoneId.getAvailableZoneIds(). Set availableZoneIds = new HashSet<>(ZoneId.getAvailableZoneIds()); @@ -66,7 +66,7 @@ public void printMappings() { } @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper .addSourceLines( "a/A.java", @@ -90,7 +90,7 @@ public void testPositiveCase() { } @Test - public void testPositiveCaseJodaTime() { + public void positiveCaseJodaTime() { compilationHelper .addSourceLines( "a/A.java", @@ -120,7 +120,7 @@ public void testPositiveCaseJodaTime() { } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper .addSourceLines( "a/A.java", @@ -142,14 +142,14 @@ public void testNegativeCase() { } @Test - public void testReplacements_pST() { + public void replacements_pST() { ImmutableList replacements = replacements("PST", false); // Suggests IANA ID first, then the fixed offset. assertThat(replacements).containsExactly("America/Los_Angeles", "Etc/GMT+8").inOrder(); } @Test - public void testReplacements_eST() { + public void replacements_eST() { ImmutableList replacements = replacements("EST", false); // Suggests fixed offset first, then the IANA ID, because this the former has the same rules as // TimeZone.getTimeZone("EST"). @@ -157,13 +157,13 @@ public void testReplacements_eST() { } @Test - public void testReplacements_iST() { + public void replacements_iST() { ImmutableList replacements = replacements("IST", false); assertThat(replacements).containsExactly("Asia/Kolkata").inOrder(); } @Test - public void testReplacements_cST() { + public void replacements_cST() { // Only rule-equivalent suggestions are made (unless we have explicitly provided suggestions) - // we don't suggest "China Standard Time" for CST, because the existing code is semantically // equivalent to US "Central Standard Time". diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/ThrowIfUncheckedKnownCheckedTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/ThrowIfUncheckedKnownCheckedTest.java index 26738645116..c06f6703d6f 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/ThrowIfUncheckedKnownCheckedTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/ThrowIfUncheckedKnownCheckedTest.java @@ -28,12 +28,12 @@ public class ThrowIfUncheckedKnownCheckedTest { CompilationTestHelper.newInstance(ThrowIfUncheckedKnownChecked.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.addSourceFile("ThrowIfUncheckedKnownCheckedTestPositiveCases.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("ThrowIfUncheckedKnownCheckedTestNegativeCases.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/ThrowsUncheckedExceptionTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/ThrowsUncheckedExceptionTest.java index 886c3b18b12..6023925096d 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/ThrowsUncheckedExceptionTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/ThrowsUncheckedExceptionTest.java @@ -32,12 +32,12 @@ public final class ThrowsUncheckedExceptionTest { CompilationTestHelper.newInstance(ThrowsUncheckedException.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.addSourceFile("ThrowsUncheckedExceptionPositiveCases.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("ThrowsUncheckedExceptionNegativeCases.java").doTest(); } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/TooManyParametersTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/TooManyParametersTest.java index 19ede8f3980..14fe6960c1d 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/TooManyParametersTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/TooManyParametersTest.java @@ -39,7 +39,7 @@ public void setup() { } @Test - public void testZeroLimit() { + public void zeroLimit() { assertThrows( IllegalArgumentException.class, () -> @@ -48,7 +48,7 @@ public void testZeroLimit() { } @Test - public void testNegativeLimit() { + public void negativeLimit() { assertThrows( IllegalArgumentException.class, () -> diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/TreeToStringTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/TreeToStringTest.java index 6d1b947a3fd..b72989393bd 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/TreeToStringTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/TreeToStringTest.java @@ -97,12 +97,12 @@ public void matchInABugChecker() { } @Test - public void testPositiveCases() { + public void positiveCases() { testHelper.addSourceFile("TreeToStringPositiveCases.java").doTest(); } @Test - public void testNegativeCases() { + public void negativeCases() { testHelper .addSourceFile("TreeToStringNegativeCases.java") .addModules( diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/TruthAssertExpectedTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/TruthAssertExpectedTest.java index 144902a9d30..e44e276716a 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/TruthAssertExpectedTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/TruthAssertExpectedTest.java @@ -32,12 +32,12 @@ public final class TruthAssertExpectedTest { CompilationTestHelper.newInstance(TruthAssertExpected.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.addSourceFile("TruthAssertExpectedPositiveCases.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("TruthAssertExpectedNegativeCases.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/TruthConstantAssertsTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/TruthConstantAssertsTest.java index b262e0665fd..1e5eb69fd99 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/TruthConstantAssertsTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/TruthConstantAssertsTest.java @@ -37,12 +37,12 @@ public void setUp() { } @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.addSourceFile("TruthConstantAssertsPositiveCases.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("TruthConstantAssertsNegativeCases.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/TruthGetOrDefaultTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/TruthGetOrDefaultTest.java index 881319732a7..35f648d273c 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/TruthGetOrDefaultTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/TruthGetOrDefaultTest.java @@ -35,7 +35,7 @@ public class TruthGetOrDefaultTest { BugCheckerRefactoringTestHelper.newInstance(TruthGetOrDefault.class, getClass()); @Test - public void testPositiveCases() { + public void positiveCases() { compilationHelper .addSourceLines( "Test.java", @@ -59,7 +59,7 @@ public void testPositiveCases() { } @Test - public void testNegativeCases() { + public void negativeCases() { compilationHelper .addSourceLines( "Test.java", @@ -79,7 +79,7 @@ public void testNegativeCases() { } @Test - public void testFixGeneration() { + public void fixGeneration() { testHelper .addInputLines( "in/Test.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/TruthSelfEqualsTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/TruthSelfEqualsTest.java index 31d2d1a1c46..d8295085bd8 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/TruthSelfEqualsTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/TruthSelfEqualsTest.java @@ -37,12 +37,12 @@ public void setUp() { } @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.addSourceFile("TruthSelfEqualsPositiveCases.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("TruthSelfEqualsNegativeCases.java").doTest(); } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/TryFailThrowableTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/TryFailThrowableTest.java index 59f741db405..46b51a5b82e 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/TryFailThrowableTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/TryFailThrowableTest.java @@ -30,12 +30,12 @@ public class TryFailThrowableTest { CompilationTestHelper.newInstance(TryFailThrowable.class, getClass()); @Test - public void testPositiveCases() { + public void positiveCases() { compilationHelper.addSourceFile("TryFailThrowablePositiveCases.java").doTest(); } @Test - public void testNegativeCases() { + public void negativeCases() { compilationHelper.addSourceFile("TryFailThrowableNegativeCases.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/URLEqualsHashCodeTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/URLEqualsHashCodeTest.java index 0123cc25109..71f2f941e7b 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/URLEqualsHashCodeTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/URLEqualsHashCodeTest.java @@ -37,12 +37,12 @@ public void setUp() { } @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.addSourceFile("URLEqualsHashCodePositiveCases.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("URLEqualsHashCodeNegativeCases.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/UnnecessaryBoxedAssignmentTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/UnnecessaryBoxedAssignmentTest.java index ca78ac2abaf..ea08aafd33b 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/UnnecessaryBoxedAssignmentTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/UnnecessaryBoxedAssignmentTest.java @@ -30,7 +30,7 @@ public class UnnecessaryBoxedAssignmentTest { BugCheckerRefactoringTestHelper.newInstance(UnnecessaryBoxedAssignment.class, getClass()); @Test - public void testCases() { + public void cases() { helper .addInput("testdata/UnnecessaryBoxedAssignmentCases.java") .addOutput("testdata/UnnecessaryBoxedAssignmentCases_expected.java") diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/UnnecessaryBoxedVariableTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/UnnecessaryBoxedVariableTest.java index 0309d9912b7..0657fafe4c0 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/UnnecessaryBoxedVariableTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/UnnecessaryBoxedVariableTest.java @@ -33,7 +33,7 @@ public class UnnecessaryBoxedVariableTest { CompilationTestHelper.newInstance(UnnecessaryBoxedVariable.class, getClass()); @Test - public void testCases() { + public void cases() { helper .addInput("testdata/UnnecessaryBoxedVariableCases.java") .addOutput("testdata/UnnecessaryBoxedVariableCases_expected.java") diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/UnsafeReflectiveConstructionCastTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/UnsafeReflectiveConstructionCastTest.java index eecae55e23a..23da39d02c9 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/UnsafeReflectiveConstructionCastTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/UnsafeReflectiveConstructionCastTest.java @@ -36,7 +36,7 @@ public class UnsafeReflectiveConstructionCastTest { CompilationTestHelper.newInstance(UnsafeReflectiveConstructionCast.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { testHelper .addInputLines( "in/Test.java", @@ -59,7 +59,7 @@ public void testPositiveCase() { } @Test - public void testPositiveCaseWithErasure() { + public void positiveCaseWithErasure() { testHelper .addInputLines( "in/Test.java", @@ -82,7 +82,7 @@ public void testPositiveCaseWithErasure() { } @Test - public void testNegativeCaseWithIntersection() { + public void negativeCaseWithIntersection() { compilationHelper .addSourceLines( "in/Test.java", @@ -98,7 +98,7 @@ public void testNegativeCaseWithIntersection() { } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("UnsafeReflectiveConstructionCastNegativeCases.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/WaitNotInLoopTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/WaitNotInLoopTest.java index 53868676f77..c4d98c00e87 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/WaitNotInLoopTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/WaitNotInLoopTest.java @@ -31,12 +31,12 @@ public class WaitNotInLoopTest { CompilationTestHelper.newInstance(WaitNotInLoop.class, getClass()); @Test - public void testPositiveCase() { + public void positiveCase() { compilationHelper.addSourceFile("WaitNotInLoopPositiveCases.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("WaitNotInLoopNegativeCases.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/android/BundleDeserializationCastTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/android/BundleDeserializationCastTest.java index cc45a3b8035..cfc588950e6 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/android/BundleDeserializationCastTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/android/BundleDeserializationCastTest.java @@ -36,7 +36,7 @@ public class BundleDeserializationCastTest { .setArgs(ImmutableList.of("-XDandroidCompatible=true")); @Test - public void testPositiveCaseGetCustomList() { + public void positiveCaseGetCustomList() { compilationHelper .addSourceLines( "Test.java", @@ -58,7 +58,7 @@ public void testPositiveCaseGetCustomList() { } @Test - public void testPositiveCaseGetCustomMap() { + public void positiveCaseGetCustomMap() { compilationHelper .addSourceLines( "Test.java", @@ -80,7 +80,7 @@ public void testPositiveCaseGetCustomMap() { } @Test - public void testNegativeCaseGetArrayList() { + public void negativeCaseGetArrayList() { compilationHelper .addSourceLines( "Test.java", @@ -96,7 +96,7 @@ public void testNegativeCaseGetArrayList() { } @Test - public void testNegativeCaseGetHashMap() { + public void negativeCaseGetHashMap() { compilationHelper .addSourceLines( "Test.java", @@ -112,7 +112,7 @@ public void testNegativeCaseGetHashMap() { } @Test - public void testNegativeCaseGetParcelableList() { + public void negativeCaseGetParcelableList() { compilationHelper .addSourceFile("CustomParcelableList.java") .addSourceLines( @@ -131,7 +131,7 @@ public void testNegativeCaseGetParcelableList() { } @Test - public void testNegativeCaseNoCast() { + public void negativeCaseNoCast() { compilationHelper .addSourceLines( "Test.java", @@ -146,7 +146,7 @@ public void testNegativeCaseNoCast() { } @Test - public void testNegativeCaseOtherCast() { + public void negativeCaseOtherCast() { compilationHelper .addSourceLines( "Test.java", @@ -162,7 +162,7 @@ public void testNegativeCaseOtherCast() { } @Test - public void testNegativeCaseGetList() { + public void negativeCaseGetList() { compilationHelper .addSourceLines( "Test.java", @@ -178,7 +178,7 @@ public void testNegativeCaseGetList() { } @Test - public void testNegativeCaseGetMap() { + public void negativeCaseGetMap() { compilationHelper .addSourceLines( "Test.java", @@ -194,7 +194,7 @@ public void testNegativeCaseGetMap() { } @Test - public void testNegativeCaseGetPrimitive() { + public void negativeCaseGetPrimitive() { compilationHelper .addSourceLines( "Test.java", @@ -209,7 +209,7 @@ public void testNegativeCaseGetPrimitive() { } @Test - public void testNegativeCaseGetPrimitiveArray() { + public void negativeCaseGetPrimitiveArray() { compilationHelper .addSourceLines( "Test.java", @@ -224,7 +224,7 @@ public void testNegativeCaseGetPrimitiveArray() { } @Test - public void testNegativeCaseGetReferenceArray() { + public void negativeCaseGetReferenceArray() { compilationHelper .addSourceLines( "Test.java", @@ -240,7 +240,7 @@ public void testNegativeCaseGetReferenceArray() { } @Test - public void testPositiveCaseGetCustomCharSequenceArray() { + public void positiveCaseGetCustomCharSequenceArray() { compilationHelper .addSourceLines( "CustomCharSequence.java", @@ -271,7 +271,7 @@ public void testPositiveCaseGetCustomCharSequenceArray() { } @Test - public void testNegativeCaseGetStringArray() { + public void negativeCaseGetStringArray() { compilationHelper .addSourceLines( "Test.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/android/FragmentNotInstantiableTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/android/FragmentNotInstantiableTest.java index ec145309271..0e9fe757d16 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/android/FragmentNotInstantiableTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/android/FragmentNotInstantiableTest.java @@ -44,21 +44,21 @@ public CustomFragmentNotInstantiable() { } @Test - public void testPositiveCases() { + public void positiveCases() { createCompilationTestHelper(FragmentNotInstantiable.class) .addSourceFile("FragmentNotInstantiablePositiveCases.java") .doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { createCompilationTestHelper(FragmentNotInstantiable.class) .addSourceFile("FragmentNotInstantiableNegativeCases.java") .doTest(); } @Test - public void testPositiveCases_custom() { + public void positiveCases_custom() { createCompilationTestHelper(CustomFragmentNotInstantiable.class) .addSourceFile("FragmentNotInstantiablePositiveCases.java") .addSourceFile("CustomFragment.java") @@ -67,7 +67,7 @@ public void testPositiveCases_custom() { } @Test - public void testNegativeCase_custom() { + public void negativeCase_custom() { createCompilationTestHelper(CustomFragmentNotInstantiable.class) .addSourceFile("FragmentNotInstantiableNegativeCases.java") .addSourceFile("CustomFragment.java") diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/android/HardCodedSdCardPathTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/android/HardCodedSdCardPathTest.java index 620310efd25..1aa64fc84ca 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/android/HardCodedSdCardPathTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/android/HardCodedSdCardPathTest.java @@ -51,7 +51,7 @@ public void matchingCode_notOnAndroid() { } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper .setArgs(ImmutableList.of("-XDandroidCompatible=true")) .addSourceFile("HardCodedSdCardPathNegativeCases.java") diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/android/IsLoggableTagLengthTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/android/IsLoggableTagLengthTest.java index 8aa7cd95c42..64110ef1254 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/android/IsLoggableTagLengthTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/android/IsLoggableTagLengthTest.java @@ -34,7 +34,7 @@ public final class IsLoggableTagLengthTest { .setArgs(ImmutableList.of("-XDandroidCompatible=true")); @Test - public void testNegativeCaseLiteral() { + public void negativeCaseLiteral() { compilationHelper .addSourceLines( "Test.java", @@ -46,7 +46,7 @@ public void testNegativeCaseLiteral() { } @Test - public void testPositiveCaseLiteral() { + public void positiveCaseLiteral() { compilationHelper .addSourceLines( "Test.java", @@ -59,7 +59,7 @@ public void testPositiveCaseLiteral() { } @Test - public void testNegativeCaseLiteralUnicode() { + public void negativeCaseLiteralUnicode() { compilationHelper .addSourceLines( "Test.java", @@ -71,7 +71,7 @@ public void testNegativeCaseLiteralUnicode() { } @Test - public void testPositiveCaseLiteralUnicode() { + public void positiveCaseLiteralUnicode() { compilationHelper .addSourceLines( "Test.java", @@ -84,7 +84,7 @@ public void testPositiveCaseLiteralUnicode() { } @Test - public void testNegativeCaseFinalField() { + public void negativeCaseFinalField() { compilationHelper .addSourceLines( "Test.java", @@ -97,7 +97,7 @@ public void testNegativeCaseFinalField() { } @Test - public void testPositiveCaseFinalField() { + public void positiveCaseFinalField() { compilationHelper .addSourceLines( "Test.java", @@ -111,7 +111,7 @@ public void testPositiveCaseFinalField() { } @Test - public void testNegativeCaseClassName() { + public void negativeCaseClassName() { compilationHelper .addSourceLines( "Test.java", @@ -123,7 +123,7 @@ public void testNegativeCaseClassName() { } @Test - public void testPositiveCaseClassName() { + public void positiveCaseClassName() { compilationHelper .addSourceLines( "ThisClassNameIsWayTooLong.java", @@ -138,7 +138,7 @@ public void testPositiveCaseClassName() { } @Test - public void testNegativeCaseFinalFieldClassName() { + public void negativeCaseFinalFieldClassName() { compilationHelper .addSourceLines( "Test.java", @@ -153,7 +153,7 @@ public void testNegativeCaseFinalFieldClassName() { } @Test - public void testPositiveCaseFinalFieldClassName() { + public void positiveCaseFinalFieldClassName() { compilationHelper .addSourceLines( "ThisClassNameIsWayTooLong.java", @@ -169,7 +169,7 @@ public void testPositiveCaseFinalFieldClassName() { } @Test - public void testNegativeCaseNonFinalFieldUninitialized() { + public void negativeCaseNonFinalFieldUninitialized() { compilationHelper .addSourceLines( "Test.java", @@ -182,7 +182,7 @@ public void testNegativeCaseNonFinalFieldUninitialized() { } @Test - public void testNegativeCaseNonFinalFieldClassNameTooLong() { + public void negativeCaseNonFinalFieldClassNameTooLong() { compilationHelper .addSourceLines( "ThisClassNameIsWayTooLong.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/android/MislabeledAndroidStringTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/android/MislabeledAndroidStringTest.java index c8594f11f51..5263aa01387 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/android/MislabeledAndroidStringTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/android/MislabeledAndroidStringTest.java @@ -32,7 +32,7 @@ public class MislabeledAndroidStringTest { @Test - public void testMatchFullyQualified() { + public void matchFullyQualified() { createCompilationTestHelper() .addSourceLines( "com/google/errorprone/bugpatterns/android/MatchFullyQualifiedTest.java", @@ -48,7 +48,7 @@ public void testMatchFullyQualified() { } @Test - public void testMatchWithImport() { + public void matchWithImport() { createCompilationTestHelper() .addSourceLines( "com/google/errorprone/bugpatterns/android/MatchWithImportTest.java", @@ -66,7 +66,7 @@ public void testMatchWithImport() { } @Test - public void testUseInField() { + public void useInField() { createCompilationTestHelper() .addSourceLines( "com/google/errorprone/bugpatterns/android/MatchUseInFieldTest.java", @@ -80,7 +80,7 @@ public void testUseInField() { } @Test - public void testNegativeCase() { + public void negativeCase() { createCompilationTestHelper() .addSourceLines( "com/google/errorprone/bugpatterns/android/FineStringTest.java", @@ -99,7 +99,7 @@ public void testNegativeCase() { * for generating readable diagnostic messages. */ @Test - public void testAssumedMeanings() { + public void assumedMeanings() { for (Map.Entry label : MislabeledAndroidString.MISLEADING.entrySet()) { assertThat(MislabeledAndroidString.ASSUMED_MEANINGS).containsKey(label.getKey()); assertThat(MislabeledAndroidString.ASSUMED_MEANINGS).containsKey(label.getValue()); diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/android/RectIntersectReturnValueIgnoredTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/android/RectIntersectReturnValueIgnoredTest.java index c085cbe8fc9..b6bd79fcaff 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/android/RectIntersectReturnValueIgnoredTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/android/RectIntersectReturnValueIgnoredTest.java @@ -33,12 +33,12 @@ public class RectIntersectReturnValueIgnoredTest { .setArgs(ImmutableList.of("-XDandroidCompatible=true")); @Test - public void testPositiveCases() { + public void positiveCases() { compilationHelper.addSourceFile("RectIntersectReturnValueIgnoredPositiveCases.java").doTest(); } @Test - public void testNegativeCase() { + public void negativeCase() { compilationHelper.addSourceFile("RectIntersectReturnValueIgnoredNegativeCases.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/android/StaticOrDefaultInterfaceMethodTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/android/StaticOrDefaultInterfaceMethodTest.java index 696094cc5ab..564316bc231 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/android/StaticOrDefaultInterfaceMethodTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/android/StaticOrDefaultInterfaceMethodTest.java @@ -33,7 +33,7 @@ public final class StaticOrDefaultInterfaceMethodTest { .setArgs(ImmutableList.of("-XDandroidCompatible=true")); @Test - public void testPositiveCaseDefault() { + public void positiveCaseDefault() { compilationHelper .addSourceLines( "Test.java", @@ -45,7 +45,7 @@ public void testPositiveCaseDefault() { } @Test - public void testPositiveCaseStatic() { + public void positiveCaseStatic() { compilationHelper .addSourceLines( "Test.java", @@ -57,12 +57,12 @@ public void testPositiveCaseStatic() { } @Test - public void testNegativeCaseNoBody() { + public void negativeCaseNoBody() { compilationHelper.addSourceLines("Test.java", "interface Test { void test(); }").doTest(); } @Test - public void testNegativeCaseClass() { + public void negativeCaseClass() { compilationHelper .addSourceLines("Test.java", "class Test { static void test() { System.out.println(); } }") .doTest(); diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/checkreturnvalue/CanIgnoreReturnValueSuggesterTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/checkreturnvalue/CanIgnoreReturnValueSuggesterTest.java index f1f3a86ffa0..ab1c6ea08d2 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/checkreturnvalue/CanIgnoreReturnValueSuggesterTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/checkreturnvalue/CanIgnoreReturnValueSuggesterTest.java @@ -29,7 +29,7 @@ public class CanIgnoreReturnValueSuggesterTest { BugCheckerRefactoringTestHelper.newInstance(CanIgnoreReturnValueSuggester.class, getClass()); @Test - public void testSimpleCase() { + public void simpleCase() { helper .addInputLines( "Client.java", @@ -57,7 +57,7 @@ public void testSimpleCase() { } @Test - public void testParenthesizedCastThis() { + public void parenthesizedCastThis() { helper .addInputLines( "Client.java", @@ -85,7 +85,7 @@ public void testParenthesizedCastThis() { } @Test - public void testReturnsInputParam() { + public void returnsInputParam() { helper .addInputLines( "Client.java", @@ -100,7 +100,7 @@ public void testReturnsInputParam() { } @Test - public void testReturnsInputParamWithMultipleReturns() { + public void returnsInputParamWithMultipleReturns() { helper .addInputLines( "Client.java", @@ -116,7 +116,7 @@ public void testReturnsInputParamWithMultipleReturns() { } @Test - public void testReturnsInputParamWithMultipleReturns_oneReturnIsConstant() { + public void returnsInputParamWithMultipleReturns_oneReturnIsConstant() { helper .addInputLines( "Client.java", @@ -132,7 +132,7 @@ public void testReturnsInputParamWithMultipleReturns_oneReturnIsConstant() { } @Test - public void testReturnsInputParamWithTernary() { + public void returnsInputParamWithTernary() { helper .addInputLines( "Client.java", @@ -147,7 +147,7 @@ public void testReturnsInputParamWithTernary() { } @Test - public void testBuilder_abstractClass() { + public void builder_abstractClass() { helper .addInputLines( "Builder.java", @@ -171,7 +171,7 @@ public void testBuilder_abstractClass() { } @Test - public void testBuilder_interface() { + public void builder_interface() { helper .addInputLines( "Builder.java", @@ -195,7 +195,7 @@ public void testBuilder_interface() { } @Test - public void testAutoValueBuilder() { + public void autoValueBuilder() { helper .addInputLines( "Animal.java", @@ -220,7 +220,7 @@ public void testAutoValueBuilder() { } @Test - public void testReturnSelf_b234875737() { + public void returnSelf_b234875737() { helper .addInputLines( "Client.java", @@ -254,7 +254,7 @@ public void testReturnSelf_b234875737() { } @Test - public void testReturnGetThis() { + public void returnGetThis() { helper .addInputLines( "Client.java", @@ -288,7 +288,7 @@ public void testReturnGetThis() { } @Test - public void testSimpleCaseAlreadyAnnotatedWithCirv() { + public void simpleCaseAlreadyAnnotatedWithCirv() { helper .addInputLines( "Client.java", @@ -307,7 +307,7 @@ public void testSimpleCaseAlreadyAnnotatedWithCirv() { } @Test - public void testSimpleCaseAlreadyAnnotatedWithCrv() { + public void simpleCaseAlreadyAnnotatedWithCrv() { helper .addInputLines( "Client.java", @@ -326,7 +326,7 @@ public void testSimpleCaseAlreadyAnnotatedWithCrv() { } @Test - public void testSimpleCaseWithNestedLambda() { + public void simpleCaseWithNestedLambda() { helper .addInputLines( "Client.java", @@ -366,7 +366,7 @@ public void testSimpleCaseWithNestedLambda() { } @Test - public void testAnotherMethodDoesntReturnThis() { + public void anotherMethodDoesntReturnThis() { helper .addInputLines( "Client.java", @@ -400,7 +400,7 @@ public void testAnotherMethodDoesntReturnThis() { } @Test - public void testNestedCase() { + public void nestedCase() { helper .addInputLines( "Client.java", @@ -420,7 +420,7 @@ public void testNestedCase() { } @Test - public void testNestedCaseBothReturningThis() { + public void nestedCaseBothReturningThis() { helper .addInputLines( "Client.java", @@ -454,7 +454,7 @@ public void testNestedCaseBothReturningThis() { } @Test - public void testCapitalVoidReturnType() { + public void capitalVoidReturnType() { helper .addInputLines( "Client.java", @@ -469,7 +469,7 @@ public void testCapitalVoidReturnType() { } @Test - public void testLowerVoidReturnType() { + public void lowerVoidReturnType() { helper .addInputLines( "Client.java", @@ -484,7 +484,7 @@ public void testLowerVoidReturnType() { } @Test - public void testConstructor() { + public void constructor() { helper .addInputLines( "Client.java", @@ -498,7 +498,7 @@ public void testConstructor() { } @Test - public void testSometimesThrows() { + public void sometimesThrows() { helper .addInputLines( "Client.java", @@ -528,7 +528,7 @@ public void testSometimesThrows() { } @Test - public void testAlwaysThrows() { + public void alwaysThrows() { helper .addInputLines( "Client.java", @@ -544,7 +544,7 @@ public void testAlwaysThrows() { } @Test - public void testSimpleCaseWithSimpleNameConflict() { + public void simpleCaseWithSimpleNameConflict() { helper .addInputLines( "Client.java", @@ -573,7 +573,7 @@ public void testSimpleCaseWithSimpleNameConflict() { } @Test - public void testOnlyReturnsThis_b236423646() { + public void onlyReturnsThis_b236423646() { helper .addInputLines( "Client.java", @@ -588,7 +588,7 @@ public void testOnlyReturnsThis_b236423646() { } @Test - public void testOnlyReturnsSelf_b236423646() { + public void onlyReturnsSelf_b236423646() { helper .addInputLines( "Client.java", @@ -606,7 +606,7 @@ public void testOnlyReturnsSelf_b236423646() { } @Test - public void testDelegateToCirvMethod() { + public void delegateToCirvMethod() { helper .addInputLines( "Client.java", @@ -650,7 +650,7 @@ public void testDelegateToCirvMethod() { } @Test - public void testConverter_b240039465() { + public void converter_b240039465() { helper .addInputLines( "Parent.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/checkreturnvalue/CheckReturnValueWellKnownLibrariesTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/checkreturnvalue/CheckReturnValueWellKnownLibrariesTest.java index a1def259d0f..9b19fdec9da 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/checkreturnvalue/CheckReturnValueWellKnownLibrariesTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/checkreturnvalue/CheckReturnValueWellKnownLibrariesTest.java @@ -44,7 +44,7 @@ public class CheckReturnValueWellKnownLibrariesTest { // Don't match methods invoked through {@link org.mockito.Mockito}. @Test - public void testIgnoreCRVOnMockito() { + public void ignoreCRVOnMockito() { compilationHelper .addSourceLines( "Test.java", @@ -73,7 +73,7 @@ public void testIgnoreCRVOnMockito() { } @Test - public void testMockitoVerifyMistake() { + public void mockitoVerifyMistake() { refactoringHelper .addInputLines( "Test.java", // @@ -415,7 +415,7 @@ public void usingElementInTestExpected() { } @Test - public void testAutoValueBuilderSetterMethods() { + public void autoValueBuilderSetterMethods() { compilationHelper .addSourceLines( "Animal.java", @@ -453,7 +453,7 @@ public void testAutoValueBuilderSetterMethods() { } @Test - public void testAutoValueBuilderSetterMethodsOnInterface() { + public void autoValueBuilderSetterMethodsOnInterface() { compilationHelper .addSourceLines( "Animal.java", @@ -496,7 +496,7 @@ public void testAutoValueBuilderSetterMethodsOnInterface() { } @Test - public void testAutoValueGetterMethods() { + public void autoValueGetterMethods() { compilationHelper .addSourceLines( "Animal.java", @@ -526,7 +526,7 @@ public void testAutoValueGetterMethods() { } @Test - public void testAutoBuilderSetterMethods() { + public void autoBuilderSetterMethods() { compilationHelper .addSourceLines( "Person.java", @@ -571,7 +571,7 @@ public void testAutoBuilderSetterMethods() { } @Test - public void testAutoBuilderSetterMethods_withInterface() { + public void autoBuilderSetterMethods_withInterface() { compilationHelper .addSourceLines( "LogUtil.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/checkreturnvalue/NoCanIgnoreReturnValueOnClassesTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/checkreturnvalue/NoCanIgnoreReturnValueOnClassesTest.java index 4eb3a94b842..e2dfac83c56 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/checkreturnvalue/NoCanIgnoreReturnValueOnClassesTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/checkreturnvalue/NoCanIgnoreReturnValueOnClassesTest.java @@ -34,7 +34,7 @@ public final class NoCanIgnoreReturnValueOnClassesTest { NoCanIgnoreReturnValueOnClasses.class, getClass()); @Test - public void testSimpleCase_returnsThis() { + public void simpleCase_returnsThis() { helper .addInputLines( "Client.java", @@ -60,7 +60,7 @@ public void testSimpleCase_returnsThis() { } @Test - public void testSimpleCase_returnsParenthesizedCastThis() { + public void simpleCase_returnsParenthesizedCastThis() { helper .addInputLines( "Client.java", @@ -86,7 +86,7 @@ public void testSimpleCase_returnsParenthesizedCastThis() { } @Test - public void testSimpleCase_returnsSelf() { + public void simpleCase_returnsSelf() { helper .addInputLines( "Client.java", @@ -119,7 +119,7 @@ public void testSimpleCase_returnsSelf() { } @Test - public void testSimpleCase_returnsGetThis() { + public void simpleCase_returnsGetThis() { helper .addInputLines( "Client.java", @@ -152,7 +152,7 @@ public void testSimpleCase_returnsGetThis() { } @Test - public void testSimpleCase_returnsNewInstance() { + public void simpleCase_returnsNewInstance() { helper .addInputLines( "Client.java", @@ -178,7 +178,7 @@ public void testSimpleCase_returnsNewInstance() { } @Test - public void testSimpleCase_explicitConstructor() { + public void simpleCase_explicitConstructor() { helper .addInputLines( "Client.java", @@ -207,7 +207,7 @@ public void testSimpleCase_explicitConstructor() { } @Test - public void testNestedClasses_cirvAndCrv() { + public void nestedClasses_cirvAndCrv() { helper .addInputLines( "Client.java", @@ -247,7 +247,7 @@ public void testNestedClasses_cirvAndCrv() { } @Test - public void testNestedClasses_bothCirv() { + public void nestedClasses_bothCirv() { helper .addInputLines( "User.java", @@ -284,7 +284,7 @@ public void testNestedClasses_bothCirv() { } @Test - public void testAutoValue() { + public void autoValue() { helper .addInputLines( "Animal.java", @@ -319,7 +319,7 @@ public void testAutoValue() { } @Test - public void testAutoValueBuilder() { + public void autoValueBuilder() { helper .addInputLines( "Animal.java", @@ -354,7 +354,7 @@ public void testAutoValueBuilder() { } @Test - public void testNestedAutoValue() { + public void nestedAutoValue() { helper .addInputLines( "Outer.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/checkreturnvalue/UnnecessarilyUsedValueTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/checkreturnvalue/UnnecessarilyUsedValueTest.java index 1cf1cd26e7d..1d85401ed5a 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/checkreturnvalue/UnnecessarilyUsedValueTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/checkreturnvalue/UnnecessarilyUsedValueTest.java @@ -28,7 +28,7 @@ public final class UnnecessarilyUsedValueTest { BugCheckerRefactoringTestHelper.newInstance(UnnecessarilyUsedValue.class, getClass()); @Test - public void testMethods() { + public void methods() { helper .addInputLines( "Client.java", @@ -106,7 +106,7 @@ public void testMethods() { } @Test - public void testConstructors() { + public void constructors() { helper .addInputLines( "Client.java", @@ -164,7 +164,7 @@ public void testConstructors() { } @Test - public void testTryWithResources() { + public void tryWithResources() { helper .addInputLines( "Client.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/checkreturnvalue/UsingJsr305CheckReturnValueTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/checkreturnvalue/UsingJsr305CheckReturnValueTest.java index 1fdd580fb28..f4c9bfb85c4 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/checkreturnvalue/UsingJsr305CheckReturnValueTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/checkreturnvalue/UsingJsr305CheckReturnValueTest.java @@ -27,7 +27,7 @@ public class UsingJsr305CheckReturnValueTest { @Test - public void testJsr305Imported() { + public void jsr305Imported() { BugCheckerRefactoringTestHelper.newInstance(UsingJsr305CheckReturnValue.class, getClass()) .addInputLines( "Client.java", @@ -53,7 +53,7 @@ public void testJsr305Imported() { } @Test - public void testJsr305FullyQualified() { + public void jsr305FullyQualified() { CompilationTestHelper.newInstance(UsingJsr305CheckReturnValue.class, getClass()) .addSourceLines( "Client.java", @@ -69,7 +69,7 @@ public void testJsr305FullyQualified() { } @Test - public void testJsr305ImportStar() { + public void jsr305ImportStar() { CompilationTestHelper.newInstance(UsingJsr305CheckReturnValue.class, getClass()) .addSourceLines( "Client.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/collectionincompatibletype/CollectionIncompatibleTypeTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/collectionincompatibletype/CollectionIncompatibleTypeTest.java index ac76395c340..7207c7067e3 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/collectionincompatibletype/CollectionIncompatibleTypeTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/collectionincompatibletype/CollectionIncompatibleTypeTest.java @@ -37,27 +37,27 @@ public class CollectionIncompatibleTypeTest { BugCheckerRefactoringTestHelper.newInstance(CollectionIncompatibleType.class, getClass()); @Test - public void testPositiveCases() { + public void positiveCases() { compilationHelper.addSourceFile("CollectionIncompatibleTypePositiveCases.java").doTest(); } @Test - public void testNegativeCases() { + public void negativeCases() { compilationHelper.addSourceFile("CollectionIncompatibleTypeNegativeCases.java").doTest(); } @Test - public void testOutOfBounds() { + public void outOfBounds() { compilationHelper.addSourceFile("CollectionIncompatibleTypeOutOfBounds.java").doTest(); } @Test - public void testClassCast() { + public void classCast() { compilationHelper.addSourceFile("CollectionIncompatibleTypeClassCast.java").doTest(); } @Test - public void testCastFixes() { + public void castFixes() { compilationHelper .addSourceLines( "Test.java", @@ -75,7 +75,7 @@ public void testCastFixes() { } @Test - public void testSuppressWarningsFix() { + public void suppressWarningsFix() { refactorTestHelper .addInputLines( "in/Test.java", @@ -104,7 +104,7 @@ public void testSuppressWarningsFix() { // This test is disabled because calling Types#asSuper in the check removes the upper bound on K. @Test @Ignore - public void testBoundedTypeParameters() { + public void boundedTypeParameters() { compilationHelper .addSourceLines( "Test.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/collectionincompatibletype/CompatibleWithMisuseTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/collectionincompatibletype/CompatibleWithMisuseTest.java index b01a5a1329e..8c47ae4077e 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/collectionincompatibletype/CompatibleWithMisuseTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/collectionincompatibletype/CompatibleWithMisuseTest.java @@ -29,7 +29,7 @@ public class CompatibleWithMisuseTest { CompilationTestHelper.newInstance(CompatibleWithMisuse.class, getClass()); @Test - public void testOK() { + public void oK() { compilationHelper .addSourceLines( "Test.java", @@ -45,7 +45,7 @@ public void testOK() { } @Test - public void testBad() { + public void bad() { compilationHelper .addSourceLines( "Test.java", @@ -81,7 +81,7 @@ public void overridesAlreadyAnnotated() { } @Test - public void testNoTypeArgs() { + public void noTypeArgs() { compilationHelper .addSourceLines( "Test.java", @@ -106,7 +106,7 @@ public void allowedOnVarargs() { } @Test - public void testInnerTypes() { + public void innerTypes() { compilationHelper .addSourceLines( "Test.java", @@ -125,7 +125,7 @@ public void testInnerTypes() { } @Test - public void testNestedTypes() { + public void nestedTypes() { compilationHelper .addSourceLines( "Test.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/collectionincompatibletype/IncompatibleArgumentTypeTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/collectionincompatibletype/IncompatibleArgumentTypeTest.java index bc9685f691f..de3895aed68 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/collectionincompatibletype/IncompatibleArgumentTypeTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/collectionincompatibletype/IncompatibleArgumentTypeTest.java @@ -29,22 +29,22 @@ public class IncompatibleArgumentTypeTest { CompilationTestHelper.newInstance(IncompatibleArgumentType.class, getClass()); @Test - public void testGenericMethod() { + public void genericMethod() { compilationHelper.addSourceFile("IncompatibleArgumentTypeGenericMethod.java").doTest(); } @Test - public void testOwningTypes() { + public void owningTypes() { compilationHelper.addSourceFile("IncompatibleArgumentTypeEnclosingTypes.java").doTest(); } @Test - public void testMultimapIntegration() { + public void multimapIntegration() { compilationHelper.addSourceFile("IncompatibleArgumentTypeMultimapIntegration.java").doTest(); } @Test - public void testIntersectionTypes() { + public void intersectionTypes() { compilationHelper.addSourceFile("IncompatibleArgumentTypeIntersectionTypes.java").doTest(); } } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/flogger/FloggerRedundantIsEnabledTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/flogger/FloggerRedundantIsEnabledTest.java index 0dd62b95b5d..8edefb0a7e7 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/flogger/FloggerRedundantIsEnabledTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/flogger/FloggerRedundantIsEnabledTest.java @@ -43,7 +43,7 @@ public void doNegativeCases() { } @Test - public void testFixes() { + public void fixes() { BugCheckerRefactoringTestHelper.newInstance(FloggerRedundantIsEnabled.class, getClass()) .addInput("FloggerRedundantIsEnabledPositiveCases.java") .addOutput("FloggerRedundantIsEnabledPositiveCases_expected.java") diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/formatstring/FormatStringAnnotationCheckerTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/formatstring/FormatStringAnnotationCheckerTest.java index bd760492c6a..895a8db7e31 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/formatstring/FormatStringAnnotationCheckerTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/formatstring/FormatStringAnnotationCheckerTest.java @@ -30,7 +30,7 @@ public class FormatStringAnnotationCheckerTest { CompilationTestHelper.newInstance(FormatStringAnnotationChecker.class, getClass()); @Test - public void testMatches_failsWithNonMatchingFormatArgs() { + public void matches_failsWithNonMatchingFormatArgs() { compilationHelper .addSourceLines( "test/FormatStringTestCase.java", @@ -51,7 +51,7 @@ public void testMatches_failsWithNonMatchingFormatArgs() { } @Test - public void testMatches_succeedsWithMatchingFormatStringAndArgs() { + public void matches_succeedsWithMatchingFormatStringAndArgs() { compilationHelper .addSourceLines( "test/FormatStringTestCase.java", @@ -68,7 +68,7 @@ public void testMatches_succeedsWithMatchingFormatStringAndArgs() { } @Test - public void testMatches_succeedsForMatchingFormatMethodWithImplicitFormatString() { + public void matches_succeedsForMatchingFormatMethodWithImplicitFormatString() { compilationHelper .addSourceLines( "test/FormatStringTestCase.java", @@ -85,7 +85,7 @@ public void testMatches_succeedsForMatchingFormatMethodWithImplicitFormatString( } @Test - public void testMatches_failsWithMismatchedFormatString() { + public void matches_failsWithMismatchedFormatString() { compilationHelper .addSourceLines( "test/FormatStringTestCase.java", @@ -103,7 +103,7 @@ public void testMatches_failsWithMismatchedFormatString() { } @Test - public void testMatches_succeedsForCompileTimeConstantFormatString() { + public void matches_succeedsForCompileTimeConstantFormatString() { compilationHelper .addSourceLines( "test/FormatStringTestCase.java", @@ -121,7 +121,7 @@ public void testMatches_succeedsForCompileTimeConstantFormatString() { } @Test - public void testMatches_failsWhenExpressionGivenForFormatString() { + public void matches_failsWhenExpressionGivenForFormatString() { compilationHelper .addSourceLines( "test/FormatStringTestCase.java", @@ -142,7 +142,7 @@ public void testMatches_failsWhenExpressionGivenForFormatString() { } @Test - public void testMatches_failsForInvalidMethodHeaders() { + public void matches_failsForInvalidMethodHeaders() { compilationHelper .addSourceLines( "test/FormatStringTestCase.java", @@ -163,7 +163,7 @@ public void testMatches_failsForInvalidMethodHeaders() { } @Test - public void testMatches_failsForIncorrectStringParameterUsedWithImplicitFormatString() { + public void matches_failsForIncorrectStringParameterUsedWithImplicitFormatString() { compilationHelper .addSourceLines( "test/FormatStringTestCase.java", @@ -186,7 +186,7 @@ public void testMatches_failsForIncorrectStringParameterUsedWithImplicitFormatSt } @Test - public void testMatches_succeedsForNonParameterFinalOrEffectivelyFinalFormatStrings() { + public void matches_succeedsForNonParameterFinalOrEffectivelyFinalFormatStrings() { compilationHelper .addSourceLines( "test/FormatStringTestCase.java", @@ -209,7 +209,7 @@ public void testMatches_succeedsForNonParameterFinalOrEffectivelyFinalFormatStri } @Test - public void testMatches_failsForNonFinalParametersOrNonMatchingFinalParameters() { + public void matches_failsForNonFinalParametersOrNonMatchingFinalParameters() { compilationHelper .addSourceLines( "test/FormatStringTestCase.java", @@ -260,7 +260,7 @@ public void testMatches_failsForNonFinalParametersOrNonMatchingFinalParameters() } @Test - public void testMatches_failsForBadCallToConstructor() { + public void matches_failsForBadCallToConstructor() { compilationHelper .addSourceLines( "test/FormatStringTestCase.java", @@ -278,7 +278,7 @@ public void testMatches_failsForBadCallToConstructor() { } @Test - public void testMatches_succeedsForMockitoMatchers() { + public void matches_succeedsForMockitoMatchers() { compilationHelper .addSourceLines( "test/FormatStringTestCase.java", @@ -298,7 +298,7 @@ public void testMatches_succeedsForMockitoMatchers() { } @Test - public void testMatches_succeedsForMockitoArgumentMatchers() { + public void matches_succeedsForMockitoArgumentMatchers() { compilationHelper .addSourceLines( "test/FormatStringTestCase.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/formatstring/FormatStringTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/formatstring/FormatStringTest.java index 4e0305b8839..3d0587ee40c 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/formatstring/FormatStringTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/formatstring/FormatStringTest.java @@ -49,112 +49,112 @@ private void testFormat(String expected, String formatString) { } @Test - public void testDuplicateFormatFlags() throws Exception { + public void duplicateFormatFlags() throws Exception { testFormat("duplicate format flags: +", "String.format(\"e = %++10.4f\", Math.E);"); } @Test - public void testFormatFlagsConversionMismatch() throws Exception { + public void formatFlagsConversionMismatch() throws Exception { testFormat( "format specifier '%b' is not compatible with the given flag(s): #", "String.format(\"%#b\", Math.E);"); } @Test - public void testIllegalFormatCodePoint() throws Exception { + public void illegalFormatCodePoint() throws Exception { testFormat("invalid Unicode code point: 110000", "String.format(\"%c\", 0x110000);"); } @Test - public void testIllegalFormatConversion() throws Exception { + public void illegalFormatConversion() throws Exception { testFormat( "illegal format conversion: 'java.lang.String' cannot be formatted using '%f'", "String.format(\"%f\", \"abcd\");"); } @Test - public void testIllegalFormatFlags() throws Exception { + public void illegalFormatFlags() throws Exception { testFormat("illegal format flags: -0", "String.format(\"%-010d\", 5);"); } @Test - public void testIllegalFormatPrecision() throws Exception { + public void illegalFormatPrecision() throws Exception { testFormat("illegal format precision: 1", "String.format(\"%.1c\", 'c');"); } @Test - public void testIllegalFormatWidth() throws Exception { + public void illegalFormatWidth() throws Exception { testFormat("illegal format width: 1", "String.format(\"%1n\");"); } @Test - public void testMissingFormatArgument() throws Exception { + public void missingFormatArgument() throws Exception { testFormat("missing argument for format specifier '% Duration.from(Period.ZERO)); assertThrows(UnsupportedTemporalTypeException.class, () -> Duration.from(Period.ofDays(1))); assertThrows(UnsupportedTemporalTypeException.class, () -> Duration.from(Period.ofDays(-1))); diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/time/JavaDurationGetSecondsGetNanoTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/time/JavaDurationGetSecondsGetNanoTest.java index 705ef31543c..e8d2bf2ca10 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/time/JavaDurationGetSecondsGetNanoTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/time/JavaDurationGetSecondsGetNanoTest.java @@ -32,7 +32,7 @@ public class JavaDurationGetSecondsGetNanoTest { CompilationTestHelper.newInstance(JavaDurationGetSecondsGetNano.class, getClass()); @Test - public void testGetSecondsWithGetNanos() { + public void getSecondsWithGetNanos() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -48,7 +48,7 @@ public void testGetSecondsWithGetNanos() { } @Test - public void testGetSecondsWithGetNanosInReturnType() { + public void getSecondsWithGetNanosInReturnType() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -65,7 +65,7 @@ public void testGetSecondsWithGetNanosInReturnType() { } @Test - public void testGetSecondsWithGetNanosInReturnType2() { + public void getSecondsWithGetNanosInReturnType2() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -82,7 +82,7 @@ public void testGetSecondsWithGetNanosInReturnType2() { } @Test - public void testGetSecondsWithGetNanosDifferentScope() { + public void getSecondsWithGetNanosDifferentScope() { // Ideally we would also catch cases like this, but it requires scanning "too much" of the class compilationHelper .addSourceLines( @@ -102,7 +102,7 @@ public void testGetSecondsWithGetNanosDifferentScope() { } @Test - public void testGetSecondsWithGetNanosInDifferentMethods() { + public void getSecondsWithGetNanosInDifferentMethods() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -121,7 +121,7 @@ public void testGetSecondsWithGetNanosInDifferentMethods() { } @Test - public void testGetSecondsOnly() { + public void getSecondsOnly() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -136,7 +136,7 @@ public void testGetSecondsOnly() { } @Test - public void testGetNanoOnly() { + public void getNanoOnly() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -152,7 +152,7 @@ public void testGetNanoOnly() { } @Test - public void testGetNanoInMethodGetSecondsInClassVariable() { + public void getNanoInMethodGetSecondsInClassVariable() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -170,7 +170,7 @@ public void testGetNanoInMethodGetSecondsInClassVariable() { } @Test - public void testGetSecondsOnlyInStaticBlock() { + public void getSecondsOnlyInStaticBlock() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -185,7 +185,7 @@ public void testGetSecondsOnlyInStaticBlock() { } @Test - public void testGetNanoOnlyInStaticBlock() { + public void getNanoOnlyInStaticBlock() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -201,7 +201,7 @@ public void testGetNanoOnlyInStaticBlock() { } @Test - public void testGetSecondsOnlyInClassBlock() { + public void getSecondsOnlyInClassBlock() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -215,7 +215,7 @@ public void testGetSecondsOnlyInClassBlock() { } @Test - public void testGetNanoOnlyInClassBlock() { + public void getNanoOnlyInClassBlock() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -229,7 +229,7 @@ public void testGetNanoOnlyInClassBlock() { } @Test - public void testGetNanoInInnerClassGetSecondsInMethod() { + public void getNanoInInnerClassGetSecondsInMethod() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -251,7 +251,7 @@ public void testGetNanoInInnerClassGetSecondsInMethod() { } @Test - public void testGetNanoInInnerClassGetSecondsInClassVariable() { + public void getNanoInInnerClassGetSecondsInClassVariable() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -269,7 +269,7 @@ public void testGetNanoInInnerClassGetSecondsInClassVariable() { } @Test - public void testGetNanoInMethodGetSecondsInLambda() { + public void getNanoInMethodGetSecondsInLambda() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -287,7 +287,7 @@ public void testGetNanoInMethodGetSecondsInLambda() { } @Test - public void testGetSecondsInLambda() { + public void getSecondsInLambda() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -308,7 +308,7 @@ public void testGetSecondsInLambda() { } @Test - public void testGetNanoInLambda() { + public void getNanoInLambda() { compilationHelper .addSourceLines( "test/TestCase.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/time/JavaInstantGetSecondsGetNanoTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/time/JavaInstantGetSecondsGetNanoTest.java index bd1be028dc7..5abce96c1ea 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/time/JavaInstantGetSecondsGetNanoTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/time/JavaInstantGetSecondsGetNanoTest.java @@ -32,7 +32,7 @@ public class JavaInstantGetSecondsGetNanoTest { CompilationTestHelper.newInstance(JavaInstantGetSecondsGetNano.class, getClass()); @Test - public void testGetSecondsWithGetNanos() { + public void getSecondsWithGetNanos() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -48,7 +48,7 @@ public void testGetSecondsWithGetNanos() { } @Test - public void testGetSecondsWithGetNanosInReturnType() { + public void getSecondsWithGetNanosInReturnType() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -65,7 +65,7 @@ public void testGetSecondsWithGetNanosInReturnType() { } @Test - public void testGetSecondsWithGetNanosInReturnType2() { + public void getSecondsWithGetNanosInReturnType2() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -82,7 +82,7 @@ public void testGetSecondsWithGetNanosInReturnType2() { } @Test - public void testGetSecondsWithGetNanosDifferentScope() { + public void getSecondsWithGetNanosDifferentScope() { // Ideally we would also catch cases like this, but it requires scanning "too much" of the class compilationHelper .addSourceLines( @@ -102,7 +102,7 @@ public void testGetSecondsWithGetNanosDifferentScope() { } @Test - public void testGetSecondsWithGetNanosInDifferentMethods() { + public void getSecondsWithGetNanosInDifferentMethods() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -121,7 +121,7 @@ public void testGetSecondsWithGetNanosInDifferentMethods() { } @Test - public void testGetSecondsOnly() { + public void getSecondsOnly() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -136,7 +136,7 @@ public void testGetSecondsOnly() { } @Test - public void testGetNanoOnly() { + public void getNanoOnly() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -152,7 +152,7 @@ public void testGetNanoOnly() { } @Test - public void testGetNanoInMethodGetSecondsInClassVariable() { + public void getNanoInMethodGetSecondsInClassVariable() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -170,7 +170,7 @@ public void testGetNanoInMethodGetSecondsInClassVariable() { } @Test - public void testGetSecondsOnlyInStaticBlock() { + public void getSecondsOnlyInStaticBlock() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -185,7 +185,7 @@ public void testGetSecondsOnlyInStaticBlock() { } @Test - public void testGetNanoOnlyInStaticBlock() { + public void getNanoOnlyInStaticBlock() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -201,7 +201,7 @@ public void testGetNanoOnlyInStaticBlock() { } @Test - public void testGetSecondsOnlyInClassBlock() { + public void getSecondsOnlyInClassBlock() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -215,7 +215,7 @@ public void testGetSecondsOnlyInClassBlock() { } @Test - public void testGetNanoOnlyInClassBlock() { + public void getNanoOnlyInClassBlock() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -229,7 +229,7 @@ public void testGetNanoOnlyInClassBlock() { } @Test - public void testGetNanoInInnerClassGetSecondsInMethod() { + public void getNanoInInnerClassGetSecondsInMethod() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -251,7 +251,7 @@ public void testGetNanoInInnerClassGetSecondsInMethod() { } @Test - public void testGetNanoInInnerClassGetSecondsInClassVariable() { + public void getNanoInInnerClassGetSecondsInClassVariable() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -269,7 +269,7 @@ public void testGetNanoInInnerClassGetSecondsInClassVariable() { } @Test - public void testGetNanoInMethodGetSecondsInLambda() { + public void getNanoInMethodGetSecondsInLambda() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -287,7 +287,7 @@ public void testGetNanoInMethodGetSecondsInLambda() { } @Test - public void testGetSecondsInLambda() { + public void getSecondsInLambda() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -308,7 +308,7 @@ public void testGetSecondsInLambda() { } @Test - public void testGetNanoInLambda() { + public void getNanoInLambda() { compilationHelper .addSourceLines( "test/TestCase.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/time/PeriodFromTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/time/PeriodFromTest.java index 05dd50cec11..8272580a934 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/time/PeriodFromTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/time/PeriodFromTest.java @@ -34,7 +34,7 @@ public class PeriodFromTest { @SuppressWarnings("PeriodFrom") @Test - public void testFailures() { + public void failures() { assertThrows(DateTimeException.class, () -> Period.from(Duration.ZERO)); assertThrows(DateTimeException.class, () -> Period.from(Duration.ofNanos(1))); assertThrows(DateTimeException.class, () -> Period.from(Duration.ofNanos(-1))); diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/time/PeriodTimeMathTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/time/PeriodTimeMathTest.java index 6d9042af2f6..d9abd172d1f 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/time/PeriodTimeMathTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/time/PeriodTimeMathTest.java @@ -34,7 +34,7 @@ public class PeriodTimeMathTest { @SuppressWarnings("PeriodTimeMath") @Test - public void testFailures() { + public void failures() { Period p = Period.ZERO; assertThrows(DateTimeException.class, () -> p.plus(Duration.ZERO)); assertThrows(DateTimeException.class, () -> p.minus(Duration.ZERO)); diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/time/ProtoDurationGetSecondsGetNanoTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/time/ProtoDurationGetSecondsGetNanoTest.java index f879cc8ca45..f476bd76cec 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/time/ProtoDurationGetSecondsGetNanoTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/time/ProtoDurationGetSecondsGetNanoTest.java @@ -34,7 +34,7 @@ public class ProtoDurationGetSecondsGetNanoTest { CompilationTestHelper.newInstance(ProtoDurationGetSecondsGetNano.class, getClass()); @Test - public void testGetSecondsWithGetNanos() { + public void getSecondsWithGetNanos() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -50,7 +50,7 @@ public void testGetSecondsWithGetNanos() { } @Test - public void testGetSecondsWithGetNanosInReturnType() { + public void getSecondsWithGetNanosInReturnType() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -67,7 +67,7 @@ public void testGetSecondsWithGetNanosInReturnType() { } @Test - public void testGetSecondsWithGetNanosInReturnType2() { + public void getSecondsWithGetNanosInReturnType2() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -84,7 +84,7 @@ public void testGetSecondsWithGetNanosInReturnType2() { } @Test - public void testGetSecondsWithGetNanosDifferentScope() { + public void getSecondsWithGetNanosDifferentScope() { // Ideally we would also catch cases like this, but it requires scanning "too much" of the class compilationHelper .addSourceLines( @@ -104,7 +104,7 @@ public void testGetSecondsWithGetNanosDifferentScope() { } @Test - public void testGetSecondsWithGetNanosInDifferentMethods() { + public void getSecondsWithGetNanosInDifferentMethods() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -123,7 +123,7 @@ public void testGetSecondsWithGetNanosInDifferentMethods() { } @Test - public void testGetSecondsOnly() { + public void getSecondsOnly() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -138,7 +138,7 @@ public void testGetSecondsOnly() { } @Test - public void testGetNanoOnly() { + public void getNanoOnly() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -154,7 +154,7 @@ public void testGetNanoOnly() { } @Test - public void testGetNanoInMethodGetSecondsInClassVariable() { + public void getNanoInMethodGetSecondsInClassVariable() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -172,7 +172,7 @@ public void testGetNanoInMethodGetSecondsInClassVariable() { } @Test - public void testGetSecondsOnlyInStaticBlock() { + public void getSecondsOnlyInStaticBlock() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -187,7 +187,7 @@ public void testGetSecondsOnlyInStaticBlock() { } @Test - public void testGetNanoOnlyInStaticBlock() { + public void getNanoOnlyInStaticBlock() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -203,7 +203,7 @@ public void testGetNanoOnlyInStaticBlock() { } @Test - public void testGetSecondsOnlyInClassBlock() { + public void getSecondsOnlyInClassBlock() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -218,7 +218,7 @@ public void testGetSecondsOnlyInClassBlock() { } @Test - public void testGetNanoOnlyInClassBlock() { + public void getNanoOnlyInClassBlock() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -232,7 +232,7 @@ public void testGetNanoOnlyInClassBlock() { } @Test - public void testGetNanoInInnerClassGetSecondsInMethod() { + public void getNanoInInnerClassGetSecondsInMethod() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -254,7 +254,7 @@ public void testGetNanoInInnerClassGetSecondsInMethod() { } @Test - public void testGetNanoInInnerClassGetSecondsInClassVariable() { + public void getNanoInInnerClassGetSecondsInClassVariable() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -272,7 +272,7 @@ public void testGetNanoInInnerClassGetSecondsInClassVariable() { } @Test - public void testGetNanoInMethodGetSecondsInLambda() { + public void getNanoInMethodGetSecondsInLambda() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -290,7 +290,7 @@ public void testGetNanoInMethodGetSecondsInLambda() { } @Test - public void testGetSecondsInLambda() { + public void getSecondsInLambda() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -311,7 +311,7 @@ public void testGetSecondsInLambda() { } @Test - public void testGetNanoInLambda() { + public void getNanoInLambda() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -329,7 +329,7 @@ public void testGetNanoInLambda() { } @Test - public void testGetMessageGetSecondsGetNanos() { + public void getMessageGetSecondsGetNanos() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -345,7 +345,7 @@ public void testGetMessageGetSecondsGetNanos() { } @Test - public void testGetNestedMessageGetSecondsGetNanos() { + public void getNestedMessageGetSecondsGetNanos() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -361,7 +361,7 @@ public void testGetNestedMessageGetSecondsGetNanos() { } @Test - public void testGetNestedMessageGetSecondsGetNanos_onDifferentProtoInstances() { + public void getNestedMessageGetSecondsGetNanos_onDifferentProtoInstances() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -378,7 +378,7 @@ public void testGetNestedMessageGetSecondsGetNanos_onDifferentProtoInstances() { } @Test - public void testGetMessageGetSecondsGetNanosDifferentSubMessage() { + public void getMessageGetSecondsGetNanosDifferentSubMessage() { compilationHelper .addSourceLines( "test/TestCase.java", diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/time/ProtoTimestampGetSecondsGetNanoTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/time/ProtoTimestampGetSecondsGetNanoTest.java index edd4945f95a..5c0eeefad92 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/time/ProtoTimestampGetSecondsGetNanoTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/time/ProtoTimestampGetSecondsGetNanoTest.java @@ -34,7 +34,7 @@ public class ProtoTimestampGetSecondsGetNanoTest { CompilationTestHelper.newInstance(ProtoTimestampGetSecondsGetNano.class, getClass()); @Test - public void testGetSecondsWithGetNanos() { + public void getSecondsWithGetNanos() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -50,7 +50,7 @@ public void testGetSecondsWithGetNanos() { } @Test - public void testGetSecondsWithGetNanosInReturnType() { + public void getSecondsWithGetNanosInReturnType() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -67,7 +67,7 @@ public void testGetSecondsWithGetNanosInReturnType() { } @Test - public void testGetSecondsWithGetNanosInReturnType2() { + public void getSecondsWithGetNanosInReturnType2() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -84,7 +84,7 @@ public void testGetSecondsWithGetNanosInReturnType2() { } @Test - public void testGetSecondsWithGetNanosDifferentScope() { + public void getSecondsWithGetNanosDifferentScope() { // Ideally we would also catch cases like this, but it requires scanning "too much" of the class compilationHelper .addSourceLines( @@ -104,7 +104,7 @@ public void testGetSecondsWithGetNanosDifferentScope() { } @Test - public void testGetSecondsWithGetNanosInDifferentMethods() { + public void getSecondsWithGetNanosInDifferentMethods() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -123,7 +123,7 @@ public void testGetSecondsWithGetNanosInDifferentMethods() { } @Test - public void testGetSecondsOnly() { + public void getSecondsOnly() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -138,7 +138,7 @@ public void testGetSecondsOnly() { } @Test - public void testGetNanoOnly() { + public void getNanoOnly() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -154,7 +154,7 @@ public void testGetNanoOnly() { } @Test - public void testGetNanoInMethodGetSecondsInClassVariable() { + public void getNanoInMethodGetSecondsInClassVariable() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -172,7 +172,7 @@ public void testGetNanoInMethodGetSecondsInClassVariable() { } @Test - public void testGetSecondsOnlyInStaticBlock() { + public void getSecondsOnlyInStaticBlock() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -187,7 +187,7 @@ public void testGetSecondsOnlyInStaticBlock() { } @Test - public void testGetNanoOnlyInStaticBlock() { + public void getNanoOnlyInStaticBlock() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -203,7 +203,7 @@ public void testGetNanoOnlyInStaticBlock() { } @Test - public void testGetSecondsOnlyInClassBlock() { + public void getSecondsOnlyInClassBlock() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -218,7 +218,7 @@ public void testGetSecondsOnlyInClassBlock() { } @Test - public void testGetNanoOnlyInClassBlock() { + public void getNanoOnlyInClassBlock() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -232,7 +232,7 @@ public void testGetNanoOnlyInClassBlock() { } @Test - public void testGetNanoInInnerClassGetSecondsInMethod() { + public void getNanoInInnerClassGetSecondsInMethod() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -254,7 +254,7 @@ public void testGetNanoInInnerClassGetSecondsInMethod() { } @Test - public void testGetNanoInInnerClassGetSecondsInClassVariable() { + public void getNanoInInnerClassGetSecondsInClassVariable() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -272,7 +272,7 @@ public void testGetNanoInInnerClassGetSecondsInClassVariable() { } @Test - public void testGetNanoInMethodGetSecondsInLambda() { + public void getNanoInMethodGetSecondsInLambda() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -290,7 +290,7 @@ public void testGetNanoInMethodGetSecondsInLambda() { } @Test - public void testGetSecondsInLambda() { + public void getSecondsInLambda() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -311,7 +311,7 @@ public void testGetSecondsInLambda() { } @Test - public void testGetNanoInLambda() { + public void getNanoInLambda() { compilationHelper .addSourceLines( "test/TestCase.java", @@ -329,7 +329,7 @@ public void testGetNanoInLambda() { } @Test - public void testGetMessageGetSecondsGetNanos() { + public void getMessageGetSecondsGetNanos() { compilationHelper .addSourceLines( "test/TestCase.java", diff --git a/core/src/test/java/com/google/errorprone/dataflow/nullnesspropagation/NullnessInferenceTest.java b/core/src/test/java/com/google/errorprone/dataflow/nullnesspropagation/NullnessInferenceTest.java index 516e09f249b..ab07382ceec 100644 --- a/core/src/test/java/com/google/errorprone/dataflow/nullnesspropagation/NullnessInferenceTest.java +++ b/core/src/test/java/com/google/errorprone/dataflow/nullnesspropagation/NullnessInferenceTest.java @@ -71,7 +71,7 @@ public static T inspectInferredExpression(T t) { } @Test - public void testIdentity() { + public void identity() { compilationHelper .addSourceLines( "IdentityTest.java", @@ -109,7 +109,7 @@ public void testIdentity() { } @Test - public void testAnnotatedGenericMethod() { + public void annotatedGenericMethod() { compilationHelper .addSourceLines( "AnnotatedGenericMethodTest.java", @@ -148,7 +148,7 @@ public void testAnnotatedGenericMethod() { } @Test - public void testBoundedGenericMethod() { + public void boundedGenericMethod() { compilationHelper .addSourceLines( "AnnotatedGenericMethodTest.java", @@ -180,7 +180,7 @@ public void testBoundedGenericMethod() { // Regression test for b/113123074 @Test - public void testUnparameterizedMethodInvocation() { + public void unparameterizedMethodInvocation() { compilationHelper .addSourceLines( "IdentityTest.java", @@ -206,7 +206,7 @@ public void testUnparameterizedMethodInvocation() { } @Test - public void testLists() { + public void lists() { compilationHelper .addSourceLines( "ListsTest.java", @@ -254,7 +254,7 @@ public void testLists() { } @Test - public void testReturn() { + public void returnCase() { compilationHelper .addSourceLines( "ReturnTest.java", @@ -282,7 +282,7 @@ public void testReturn() { } @Test - public void testAssignments() { + public void assignments() { compilationHelper .addSourceLines( "AssignmentsTest.java", @@ -314,7 +314,7 @@ public void testAssignments() { } @Test - public void testVarArgs() { + public void varArgs() { compilationHelper .addSourceLines( "VarArgsTest.java", @@ -345,7 +345,7 @@ public void testVarArgs() { } @Test - public void testAnnotatedAtGenericTypeUse() { + public void annotatedAtGenericTypeUse() { compilationHelper .addSourceLines( "AnnotatedAtGenericTypeUseTest.java", @@ -397,7 +397,7 @@ public void testAnnotatedAtGenericTypeUse() { } @Test - public void testAnnotatedAtGenericTypeDef() { + public void annotatedAtGenericTypeDef() { compilationHelper .addSourceLines( "AnnotatedAtGenericTypeDefTest.java", @@ -441,7 +441,7 @@ public void testAnnotatedAtGenericTypeDef() { } @Test - public void testBoundedAtGenericTypeUse() { + public void boundedAtGenericTypeUse() { compilationHelper .addSourceLines( "BoundedAtGenericTypeUseTest.java", @@ -466,7 +466,7 @@ public void testBoundedAtGenericTypeUse() { } @Test - public void testBoundedAtGenericTypeDef() { + public void boundedAtGenericTypeDef() { compilationHelper .addSourceLines( "BoundedAtGenericTypeDefTest.java", @@ -495,7 +495,7 @@ public void testBoundedAtGenericTypeDef() { } @Test - public void testDefaultAnnotation() { + public void defaultAnnotation() { compilationHelper .addSourceLines( "DefaultAnnotationTest.java", @@ -535,7 +535,7 @@ public void testDefaultAnnotation() { } @Test - public void testIntersectionBounds() { + public void intersectionBounds() { compilationHelper .addSourceLines( "IntersectionBoundsTest.java", @@ -557,7 +557,7 @@ public void testIntersectionBounds() { } @Test - public void testAnnotatedMethodTypeParams() { + public void annotatedMethodTypeParams() { compilationHelper .addSourceLines( "AnnotatedMethodTypeParamsTest.java", diff --git a/core/src/test/java/com/google/errorprone/dataflow/nullnesspropagation/NullnessPropagationTest.java b/core/src/test/java/com/google/errorprone/dataflow/nullnesspropagation/NullnessPropagationTest.java index 74bc8effebc..96467b29b94 100644 --- a/core/src/test/java/com/google/errorprone/dataflow/nullnesspropagation/NullnessPropagationTest.java +++ b/core/src/test/java/com/google/errorprone/dataflow/nullnesspropagation/NullnessPropagationTest.java @@ -121,47 +121,47 @@ public static void triggerNullnessCheckerOnPrimitive(short s) {} public static final Integer NOT_COMPILE_TIME_CONSTANT = 421; @Test - public void testTransferFunctions1() { + public void transferFunctions1() { compilationHelper.addSourceFile("NullnessPropagationTransferCases1.java").doTest(); } @Test - public void testTransferFunctions2() { + public void transferFunctions2() { compilationHelper.addSourceFile("NullnessPropagationTransferCases2.java").doTest(); } @Test - public void testTransferFunctions3() { + public void transferFunctions3() { compilationHelper.addSourceFile("NullnessPropagationTransferCases3.java").doTest(); } @Test - public void testTransferFunctions4() { + public void transferFunctions4() { compilationHelper.addSourceFile("NullnessPropagationTransferCases4.java").doTest(); } @Test - public void testTransferFunctions5() { + public void transferFunctions5() { compilationHelper.addSourceFile("NullnessPropagationTransferCases5.java").doTest(); } @Test - public void testTransferFunctions6() { + public void transferFunctions6() { compilationHelper.addSourceFile("NullnessPropagationTransferCases6.java").doTest(); } @Test - public void testTransferFunctions7() { + public void transferFunctions7() { compilationHelper.addSourceFile("NullnessPropagationTransferCases7.java").doTest(); } @Test - public void testTransferFunctions8() { + public void transferFunctions8() { compilationHelper.addSourceFile("NullnessPropagationTransferCases8.java").doTest(); } @Test - public void testThis() { + public void nonNullThis() { compilationHelper .addSourceLines( "ThisNonNullTest.java", @@ -178,7 +178,7 @@ public void testThis() { } @Test - public void testEquals() { + public void equals() { compilationHelper .addSourceLines( "ThisEqualsTest.java", @@ -204,7 +204,7 @@ public void testEquals() { } @Test - public void testInstanceof() { + public void instanceofNonNull() { compilationHelper .addSourceLines( "InstanceofTest.java", @@ -228,7 +228,7 @@ public void testInstanceof() { } @Test - public void testProtoGetters() { + public void protoGetters() { compilationHelper .addSourceLines( "InstanceofTest.java", @@ -248,7 +248,7 @@ public void testProtoGetters() { } @Test - public void testArrayAccess() { + public void arrayAccess() { compilationHelper .addSourceLines( "ArrayAccessTest.java", @@ -284,7 +284,7 @@ public void testArrayAccess() { } @Test - public void testFieldAccess() { + public void fieldAccess() { compilationHelper .addSourceLines( "FieldAccessTest.java", @@ -309,7 +309,7 @@ public void testFieldAccess() { } @Test - public void testFieldReceivers() { + public void fieldReceivers() { compilationHelper .addSourceLines( "FieldReceiversTest.java", @@ -342,7 +342,7 @@ public void testFieldReceivers() { } @Test - public void testFieldPathSensitivity() { + public void fieldPathSensitivity() { compilationHelper .addSourceLines( "FieldPathSensitivityTest.java", @@ -369,7 +369,7 @@ public void testFieldPathSensitivity() { } @Test - public void testAccessPaths() { + public void accessPaths() { compilationHelper .addSourceLines( "AccessPathsTest.java", @@ -400,7 +400,7 @@ public void testAccessPaths() { } @Test - public void testUntrackableFields() { + public void untrackableFields() { compilationHelper .addSourceLines( "UntrackableFieldsTest.java", @@ -425,7 +425,7 @@ public void testUntrackableFields() { } @Test - public void testAnnotatedAtGenericTypeUse() { + public void annotatedAtGenericTypeUse() { compilationHelper .addSourceLines( "AnnotatedAtGenericTypeUseTest.java", @@ -450,7 +450,7 @@ public void testAnnotatedAtGenericTypeUse() { } @Test - public void testAnnotatedAtGenericTypeDef() { + public void annotatedAtGenericTypeDef() { compilationHelper .addSourceLines( "AnnotatedAtGenericTypeDefTest.java", @@ -492,7 +492,7 @@ public void testAnnotatedAtGenericTypeDef() { } @Test - public void testBoundedAtGenericTypeUse() { + public void boundedAtGenericTypeUse() { compilationHelper .addSourceLines( "BoundedAtGenericTypeUseTest.java", @@ -520,7 +520,7 @@ public void testBoundedAtGenericTypeUse() { } @Test - public void testBoundedAtGenericTypeDef() { + public void boundedAtGenericTypeDef() { compilationHelper .addSourceLines( "BoundedAtGenericTypeDefTest.java", @@ -548,7 +548,7 @@ public void testBoundedAtGenericTypeDef() { } @Test - public void testAnnotatedMethodTypeParams() { + public void annotatedMethodTypeParams() { compilationHelper .addSourceLines( "AnnotatedMethodTypeParamsTest.java", @@ -569,7 +569,7 @@ public void testAnnotatedMethodTypeParams() { } @Test - public void testFieldAnnotations() { + public void fieldAnnotations() { compilationHelper .addSourceLines( "FieldAnnotationsTest.java", @@ -606,7 +606,7 @@ public void testFieldAnnotations() { } @Test - public void testCheckerWorksInsideLambdaBody() { + public void checkerWorksInsideLambdaBody() { compilationHelper .addSourceLines( "LambdaBodyTest.java", @@ -625,7 +625,7 @@ public void testCheckerWorksInsideLambdaBody() { } @Test - public void testCheckerWorksInsideInitializer() { + public void checkerWorksInsideInitializer() { compilationHelper .addSourceLines( "InitializerBlockTest.java", @@ -660,7 +660,7 @@ public void testCheckerWorksInsideInitializer() { * while we do recognize them inside a compilation unit. */ @Test - public void testConstantsDefinedInOtherCompilationUnits() { + public void constantsDefinedInOtherCompilationUnits() { compilationHelper .addSourceLines( "AnotherEnum.java", @@ -708,7 +708,7 @@ public void testConstantsDefinedInOtherCompilationUnits() { // Regression test for b/110756716, verifying that the l-val of an assignment in expr position in // an equality comparison is refined @Test - public void testWhileLoopPartialCorrectness() { + public void whileLoopPartialCorrectness() { compilationHelper .addSourceLines( "PartialCorrectnessTest.java", @@ -727,7 +727,7 @@ public void testWhileLoopPartialCorrectness() { } @Test - public void testCasts() { + public void casts() { compilationHelper .addSourceLines( "CastsTest.java", @@ -748,7 +748,7 @@ public void testCasts() { } @Test - public void testAutoValue() { + public void autoValue() { compilationHelper .addSourceLines( "AutoValueTest.java", @@ -781,7 +781,7 @@ public void testAutoValue() { } @Test - public void testGenericTypeInference() { + public void genericTypeInference() { compilationHelper .addSourceLines( "GenericTypeInferenceTest.java", @@ -808,7 +808,7 @@ public void testGenericTypeInference() { } @Test - public void testAnnotatedFormal() { + public void annotatedFormal() { compilationHelper .addSourceLines( "AnnotatedFormalTest.java", diff --git a/core/src/test/java/com/google/errorprone/fixes/SuggestedFixesTest.java b/core/src/test/java/com/google/errorprone/fixes/SuggestedFixesTest.java index 1a329bc1219..c378abaa09b 100644 --- a/core/src/test/java/com/google/errorprone/fixes/SuggestedFixesTest.java +++ b/core/src/test/java/com/google/errorprone/fixes/SuggestedFixesTest.java @@ -979,7 +979,7 @@ public Description matchVariable(VariableTree tree, VisitorState state) { @Test @org.junit.Ignore("There appears to be an issue parsing lambda comments") - public void testSuppressWarningsFix() { + public void suppressWarningsFix() { BugCheckerRefactoringTestHelper refactorTestHelper = BugCheckerRefactoringTestHelper.newInstance(SuppressMe.class, getClass()); refactorTestHelper @@ -1042,7 +1042,7 @@ public Description matchLiteral(LiteralTree tree, VisitorState state) { } @Test - public void testSuppressWarningsWithCommentFix() { + public void suppressWarningsWithCommentFix() { BugCheckerRefactoringTestHelper refactorTestHelper = BugCheckerRefactoringTestHelper.newInstance( new SuppressMeWithComment("b/XXXX: fix me!"), getClass()); @@ -1065,7 +1065,7 @@ public void testSuppressWarningsWithCommentFix() { } @Test - public void testSuppressWarningsWithCommentFix_existingComment() { + public void suppressWarningsWithCommentFix_existingComment() { BugCheckerRefactoringTestHelper refactorTestHelper = BugCheckerRefactoringTestHelper.newInstance( new SuppressMeWithComment("b/XXXX: fix me!"), getClass()); @@ -1094,7 +1094,7 @@ public void testSuppressWarningsWithCommentFix_existingComment() { } @Test - public void testSuppressWarningsWithCommentFix_commentHasToBeLineWrapped() { + public void suppressWarningsWithCommentFix_commentHasToBeLineWrapped() { BugCheckerRefactoringTestHelper refactorTestHelper = BugCheckerRefactoringTestHelper.newInstance( new SuppressMeWithComment( diff --git a/core/src/test/java/com/google/errorprone/matchers/AnnotationHasArgumentWithValueTest.java b/core/src/test/java/com/google/errorprone/matchers/AnnotationHasArgumentWithValueTest.java index d4cd4c76ab2..8c667aaac6c 100644 --- a/core/src/test/java/com/google/errorprone/matchers/AnnotationHasArgumentWithValueTest.java +++ b/core/src/test/java/com/google/errorprone/matchers/AnnotationHasArgumentWithValueTest.java @@ -38,7 +38,7 @@ public void setUp() { } @Test - public void testMatches() { + public void matches() { writeFile("A.java", "@Thing(stuff=\"y\")", "public class A {}"); assertCompiles( annotationMatches( @@ -47,7 +47,7 @@ public void testMatches() { } @Test - public void testMatchesExtraParentheses() { + public void matchesExtraParentheses() { writeFile("Thing2.java", "public @interface Thing2 {", " String value();", "}"); writeFile("A.java", "@Thing2((\"y\"))", "public class A {}"); assertCompiles( diff --git a/core/src/test/java/com/google/errorprone/matchers/CompileTimeConstantExpressionMatcherTest.java b/core/src/test/java/com/google/errorprone/matchers/CompileTimeConstantExpressionMatcherTest.java index 22fd519e5e6..550414d108d 100644 --- a/core/src/test/java/com/google/errorprone/matchers/CompileTimeConstantExpressionMatcherTest.java +++ b/core/src/test/java/com/google/errorprone/matchers/CompileTimeConstantExpressionMatcherTest.java @@ -175,7 +175,7 @@ public void finalCompileTimeConstantConstructorParameters() { // and assignments to such variables are compile-time-constant. // For now, the annotation's target is restricted to ElementType.PARAMETER. @Test - public void testCompileTimeConstantAnnotationOnlyAllowedOnParameterOrField() { + public void compileTimeConstantAnnotationOnlyAllowedOnParameterOrField() { assertThat(CompileTimeConstant.class.getAnnotation(Target.class).value()) .isEqualTo(new ElementType[] {ElementType.PARAMETER, ElementType.FIELD}); } diff --git a/core/src/test/java/com/google/errorprone/matchers/ConstructorOfClassTest.java b/core/src/test/java/com/google/errorprone/matchers/ConstructorOfClassTest.java index 837a13acf50..5b8a3644b27 100644 --- a/core/src/test/java/com/google/errorprone/matchers/ConstructorOfClassTest.java +++ b/core/src/test/java/com/google/errorprone/matchers/ConstructorOfClassTest.java @@ -94,7 +94,7 @@ public void shouldNotMatchNonmatchingConstructor() { } @Test - public void testMultipleConstructors() { + public void multipleConstructors() { writeFile( "A.java", "package com.google;", diff --git a/core/src/test/java/com/google/errorprone/matchers/JUnitMatchersTest.java b/core/src/test/java/com/google/errorprone/matchers/JUnitMatchersTest.java index 6473635ff80..9e38e1c7ec4 100644 --- a/core/src/test/java/com/google/errorprone/matchers/JUnitMatchersTest.java +++ b/core/src/test/java/com/google/errorprone/matchers/JUnitMatchersTest.java @@ -54,7 +54,7 @@ public void runWithAnnotationOnClass_shouldBeJUnit4() { } @Test - public void testAnnotationOnMethod_shouldBeJUnit4() { + public void annotationOnMethod_shouldBeJUnit4() { compilationHelper .addSourceLines( "TestAnnotationOnMethod.java", @@ -147,7 +147,7 @@ public void ruleAnnotation_notRecognized() { } @Test - public void testCaseDescendant_shouldBeJUnit3() { + public void caseDescendant_shouldBeJUnit3() { compilationHelper .addSourceLines( "TestCaseDescendant.java", diff --git a/core/src/test/java/com/google/errorprone/matchers/MethodHasParametersTest.java b/core/src/test/java/com/google/errorprone/matchers/MethodHasParametersTest.java index 17582252f92..b894ecd1d31 100644 --- a/core/src/test/java/com/google/errorprone/matchers/MethodHasParametersTest.java +++ b/core/src/test/java/com/google/errorprone/matchers/MethodHasParametersTest.java @@ -99,7 +99,7 @@ public void shouldNotMatchNonmatchingParameter() { } @Test - public void testMultipleParameters() { + public void multipleParameters() { writeFile( "A.java", "package com.google;", diff --git a/core/src/test/java/com/google/errorprone/matchers/NextStatementTest.java b/core/src/test/java/com/google/errorprone/matchers/NextStatementTest.java index 7e543bde30d..a157efb23a5 100644 --- a/core/src/test/java/com/google/errorprone/matchers/NextStatementTest.java +++ b/core/src/test/java/com/google/errorprone/matchers/NextStatementTest.java @@ -58,7 +58,7 @@ public Description matchCompoundAssignment(CompoundAssignmentTree cat, VisitorSt // If a statement is inside an if statement with no block braces, the NextStatement should return // false, since there's no other statement inside the block. @Test - public void testSingleStatementBlock() { + public void singleStatementBlock() { CompilationTestHelper.newInstance(CompoundBeforeAnythingChecker.class, getClass()) .addSourceLines( "B.java", @@ -74,7 +74,7 @@ public void testSingleStatementBlock() { } @Test - public void testNextStatementInBlock() { + public void nextStatementInBlock() { CompilationTestHelper.newInstance(CompoundBeforeAnythingChecker.class, getClass()) .addSourceLines( "A.java", diff --git a/core/src/test/java/com/google/errorprone/refaster/BindingsTest.java b/core/src/test/java/com/google/errorprone/refaster/BindingsTest.java index 445b97f7d7a..8664544086f 100644 --- a/core/src/test/java/com/google/errorprone/refaster/BindingsTest.java +++ b/core/src/test/java/com/google/errorprone/refaster/BindingsTest.java @@ -43,12 +43,12 @@ private static class OtherKey extends Bindings.Key { } @Test - public void testPutRestricts() { + public void putRestricts() { assertThrows(ClassCastException.class, () -> Bindings.create().put(new Key("foo"), 3)); } @Test - public void testKeyClassesDistinct() { + public void keyClassesDistinct() { new EqualsTester() .addEqualityGroup(new Key("foo")) .addEqualityGroup(new Key("bar")) diff --git a/core/src/test/java/com/google/errorprone/refaster/ChoiceTest.java b/core/src/test/java/com/google/errorprone/refaster/ChoiceTest.java index 1504d155c58..b10c0305720 100644 --- a/core/src/test/java/com/google/errorprone/refaster/ChoiceTest.java +++ b/core/src/test/java/com/google/errorprone/refaster/ChoiceTest.java @@ -33,7 +33,7 @@ @RunWith(JUnit4.class) public class ChoiceTest { @Test - public void testNone() { + public void none() { assertThat(Choice.none().first()).isAbsent(); assertThat(Choice.none().condition(true)).isSameInstanceAs(Choice.none()); assertThat(Choice.none().condition(Predicates.alwaysTrue())).isSameInstanceAs(Choice.none()); @@ -42,7 +42,7 @@ public void testNone() { } @Test - public void testThenOption() { + public void thenOption() { assertThat( Choice.from(ImmutableList.of(1, 2, 3)) .thenOption( @@ -53,7 +53,7 @@ public void testThenOption() { } @Test - public void testThenChoose() { + public void thenChoose() { assertThat( Choice.from(ImmutableList.of(1, 2, 3)) .thenChoose( @@ -63,7 +63,7 @@ public void testThenChoose() { } @Test - public void testOr() { + public void or() { assertThat(Choice.of(2).or(Choice.from(ImmutableList.of(1, 3))).asIterable()) .containsExactly(2, 1, 3) .inOrder(); diff --git a/core/src/test/java/com/google/errorprone/suppress/SuppressLintTest.java b/core/src/test/java/com/google/errorprone/suppress/SuppressLintTest.java index fc35a9cc192..2ea23626f33 100644 --- a/core/src/test/java/com/google/errorprone/suppress/SuppressLintTest.java +++ b/core/src/test/java/com/google/errorprone/suppress/SuppressLintTest.java @@ -49,7 +49,7 @@ public void setUp() { } @Test - public void testNegativeCase() { + public void negativeCase() { ImmutableList sources = forResources(getClass(), "SuppressLintNegativeCases.java"); JavaFileObject stub = diff --git a/core/src/test/java/com/google/errorprone/suppress/SuppressWarningsTest.java b/core/src/test/java/com/google/errorprone/suppress/SuppressWarningsTest.java index 4750a124d80..046eac27dd6 100644 --- a/core/src/test/java/com/google/errorprone/suppress/SuppressWarningsTest.java +++ b/core/src/test/java/com/google/errorprone/suppress/SuppressWarningsTest.java @@ -51,7 +51,7 @@ public void setUp() { } @Test - public void testNegativeCase() { + public void negativeCase() { ImmutableList sources = forResources(getClass(), "SuppressWarningsNegativeCases.java"); assertThat(compiler.compile(sources), is(Result.OK)); diff --git a/core/src/test/java/com/google/errorprone/suppress/UnsuppressibleTest.java b/core/src/test/java/com/google/errorprone/suppress/UnsuppressibleTest.java index 6c0945676b2..474e4831dbe 100644 --- a/core/src/test/java/com/google/errorprone/suppress/UnsuppressibleTest.java +++ b/core/src/test/java/com/google/errorprone/suppress/UnsuppressibleTest.java @@ -73,7 +73,7 @@ public void setUp() { } @Test - public void testPositiveCase() { + public void positiveCase() { ImmutableList sources = forResources(getClass(), "UnsuppressiblePositiveCases.java"); assertThat(compiler.compile(sources), is(Result.ERROR)); diff --git a/docgen/src/test/java/com/google/errorprone/BugPatternFileGeneratorTest.java b/docgen/src/test/java/com/google/errorprone/BugPatternFileGeneratorTest.java index da002469256..5c7cd310e89 100644 --- a/docgen/src/test/java/com/google/errorprone/BugPatternFileGeneratorTest.java +++ b/docgen/src/test/java/com/google/errorprone/BugPatternFileGeneratorTest.java @@ -132,7 +132,7 @@ public void regressionTest_sidecar() throws Exception { } @Test - public void testEscapeAngleBracketsInSummary() throws Exception { + public void escapeAngleBracketsInSummary() throws Exception { // Create a BugPattern with angle brackets in the summary BugPatternInstance instance = new BugPatternInstance(); instance.className = "com.google.errorprone.bugpatterns.DontDoThis"; diff --git a/test_helpers/src/test/java/com/google/errorprone/BugCheckerRefactoringTestHelperTest.java b/test_helpers/src/test/java/com/google/errorprone/BugCheckerRefactoringTestHelperTest.java index a5767f3f968..2fd76ca090e 100644 --- a/test_helpers/src/test/java/com/google/errorprone/BugCheckerRefactoringTestHelperTest.java +++ b/test_helpers/src/test/java/com/google/errorprone/BugCheckerRefactoringTestHelperTest.java @@ -49,7 +49,7 @@ public void setUp() { } @Test - public void testNoMatch() { + public void noMatch() { helper .addInputLines("in/Test.java", "public class Test {}") .addOutputLines("out/Test.java", "public class Test {}") @@ -57,7 +57,7 @@ public void testNoMatch() { } @Test - public void testReplace() { + public void replace() { helper .addInputLines( "in/Test.java", @@ -79,7 +79,7 @@ public void testReplace() { } @Test - public void testReplaceFail() { + public void replaceFail() { assertThrows( AssertionError.class, () -> @@ -104,7 +104,7 @@ public void testReplaceFail() { } @Test - public void testReplaceTextMatch() { + public void replaceTextMatch() { helper .addInputLines( "in/Test.java", @@ -126,7 +126,7 @@ public void testReplaceTextMatch() { } @Test - public void testIgnoreWhitespace() { + public void ignoreWhitespace() { helper .addInputLines( "in/Test.java", @@ -145,7 +145,7 @@ public void testIgnoreWhitespace() { } @Test - public void testReplaceTextMatchFail() { + public void replaceTextMatchFail() { assertThrows( AssertionError.class, () -> @@ -184,7 +184,7 @@ public void compilationErrorFail() { } @Test - public void testAnnotationFullName() { + public void annotationFullName() { BugCheckerRefactoringTestHelper.newInstance(RemoveAnnotationRefactoring.class, getClass()) .addInputLines("bar/Foo.java", "package bar;", "public @interface Foo {", "};") .expectUnchanged()