Fix multi-word test case names to use lowerCamelCase.
This is to follow the style guide recommendation in:
https://google.github.io/styleguide/javaguide.html#s5.2.3-method-names
and to fix lint warnings that have already gotten in the way of two
of my recent CLs.
This change was automatically generated by collecting the list of all
affected files in a "list" file and doing:
for f in $(cat /tmp/list); do
sed -itmp -e '/void test.*_[A-Z]/s/\(_[A-Z]\)/\L\1/g' "$f"
done
... and then skimming through the diff to undo a few "fixes" that were
incorrect because we have test names encoding literals like "BUILD".
PiperOrigin-RevId: 329363594
diff --git a/src/test/java/com/google/devtools/build/lib/packages/AttributeValueSourceTest.java b/src/test/java/com/google/devtools/build/lib/packages/AttributeValueSourceTest.java
index 2ddfb0e..b5ab6e2 100644
--- a/src/test/java/com/google/devtools/build/lib/packages/AttributeValueSourceTest.java
+++ b/src/test/java/com/google/devtools/build/lib/packages/AttributeValueSourceTest.java
@@ -41,14 +41,14 @@
}
@Test
- public void testValidateStarlarkName_EmptyName() throws Exception {
+ public void testValidateStarlarkName_emptyName() throws Exception {
for (AttributeValueSource source : AttributeValueSource.values()) {
assertNameIsNotValid(source, "", "Attribute name must not be empty.");
}
}
@Test
- public void testValidateStarlarkName_MissingPrefix() throws Exception {
+ public void testValidateStarlarkName_missingPrefix() throws Exception {
String msg =
"When an attribute value is a function, the attribute must be private "
+ "(i.e. start with '_'). Found 'my_name'";
@@ -77,7 +77,7 @@
}
@Test
- public void testConvertToNativeName_InvalidName() throws Exception {
+ public void testConvertToNativeName_invalidName() throws Exception {
assertTranslationFails(AttributeValueSource.COMPUTED_DEFAULT, "name");
assertTranslationFails(AttributeValueSource.LATE_BOUND, "name");
}
diff --git a/src/test/java/com/google/devtools/build/lib/packages/ConfigurationFragmentPolicyTest.java b/src/test/java/com/google/devtools/build/lib/packages/ConfigurationFragmentPolicyTest.java
index 272c5c3..ad89e6f 100644
--- a/src/test/java/com/google/devtools/build/lib/packages/ConfigurationFragmentPolicyTest.java
+++ b/src/test/java/com/google/devtools/build/lib/packages/ConfigurationFragmentPolicyTest.java
@@ -63,7 +63,7 @@
}
@Test
- public void testRequiresConfigurationFragments_AddsToRequiredSet() throws Exception {
+ public void testRequiresConfigurationFragments_addsToRequiredSet() throws Exception {
// Although these aren't configuration fragments, there are no requirements as to what the class
// has to be, so...
ConfigurationFragmentPolicy policy =
@@ -96,7 +96,7 @@
};
@Test
- public void testRequiresConfigurationFragments_RequiredAndLegalForSpecifiedConfiguration()
+ public void testRequiresConfigurationFragments_requiredAndLegalForSpecifiedConfiguration()
throws Exception {
ConfigurationFragmentPolicy policy =
new ConfigurationFragmentPolicy.Builder()
@@ -131,7 +131,7 @@
}
@Test
- public void testRequiresConfigurationFragments_MapSetsLegalityByStarlarkModuleName_NoRequires()
+ public void testRequiresConfigurationFragments_mapSetsLegalityByStarlarkModuleName_noRequires()
throws Exception {
ConfigurationFragmentPolicy policy =
new ConfigurationFragmentPolicy.Builder()
@@ -169,7 +169,7 @@
}
@Test
- public void testIncludeConfigurationFragmentsFrom_MergesWithExistingFragmentSet()
+ public void testIncludeConfigurationFragmentsFrom_mergesWithExistingFragmentSet()
throws Exception {
ConfigurationFragmentPolicy basePolicy =
new ConfigurationFragmentPolicy.Builder()
diff --git a/src/test/java/com/google/devtools/build/lib/packages/GlobCacheTest.java b/src/test/java/com/google/devtools/build/lib/packages/GlobCacheTest.java
index e2263af..944ae45 100644
--- a/src/test/java/com/google/devtools/build/lib/packages/GlobCacheTest.java
+++ b/src/test/java/com/google/devtools/build/lib/packages/GlobCacheTest.java
@@ -205,13 +205,13 @@
}
@Test
- public void testSingleFileExclude_Star() throws Exception {
+ public void testSingleFileExclude_star() throws Exception {
assertThat(cache.globUnsorted(list("*"), list("first.txt"), false, true))
.containsExactly("BUILD", "bar", "first.js", "foo", "second.js", "second.txt");
}
@Test
- public void testSingleFileExclude_StarStar() throws Exception {
+ public void testSingleFileExclude_starStar() throws Exception {
assertThat(cache.globUnsorted(list("**"), list("first.txt"), false, true))
.containsExactly(
"BUILD",
@@ -227,22 +227,22 @@
}
@Test
- public void testExcludeAll_Star() throws Exception {
+ public void testExcludeAll_star() throws Exception {
assertThat(cache.globUnsorted(list("*"), list("*"), false, true)).isEmpty();
}
@Test
- public void testExcludeAll_Star_NoMatchesAnyway() throws Exception {
+ public void testExcludeAll_star_noMatchesAnyway() throws Exception {
assertThat(cache.globUnsorted(list("nope"), list("*"), false, true)).isEmpty();
}
@Test
- public void testExcludeAll_StarStar() throws Exception {
+ public void testExcludeAll_starStar() throws Exception {
assertThat(cache.globUnsorted(list("**"), list("**"), false, true)).isEmpty();
}
@Test
- public void testExcludeAll_Manual() throws Exception {
+ public void testExcludeAll_manual() throws Exception {
assertThat(cache.globUnsorted(list("**"), list("*", "*/*", "*/*/*"), false, true)).isEmpty();
}