Skip to content

Commit

Permalink
Excavator: Upgrades Baseline to the latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
svc-excavator-bot committed Jan 9, 2020
1 parent c006e2d commit 1af0cfe
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 28 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ buildscript {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
classpath 'com.netflix.nebula:nebula-publishing-plugin:14.1.1'
classpath 'com.netflix.nebula:gradle-info-plugin:5.2.0'
classpath 'com.palantir.baseline:gradle-baseline-java:2.42.0'
classpath 'com.palantir.baseline:gradle-baseline-java:2.48.0'
classpath 'gradle.plugin.org.inferred:gradle-processors:3.2.0'
classpath 'com.palantir.gradle.gitversion:gradle-git-version:0.12.2'
classpath 'com.palantir.gradle.consistentversions:gradle-consistent-versions:1.14.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,12 +330,13 @@ public void stringEscapeLength() throws Exception {

@Test
public void wrapLineComment() throws Exception {
assertThat(Formatter.create().formatSource("class T {\n"
+ " public static void main(String[] args) { // one long incredibly"
+ " unbroken sentence moving from topic to topic so that no-one had a"
+ " chance to interrupt;\n"
+ " }\n"
+ "}\n"))
assertThat(Formatter.create()
.formatSource("class T {\n"
+ " public static void main(String[] args) { // one long incredibly"
+ " unbroken sentence moving from topic to topic so that no-one had a"
+ " chance to interrupt;\n"
+ " }\n"
+ "}\n"))
.isEqualTo("class T {\n"
+ " public static void main(\n"
+ " String[]\n"
Expand All @@ -348,12 +349,13 @@ public void wrapLineComment() throws Exception {

@Test
public void onlyWrapLineCommentOnWhitespace() throws Exception {
assertThat(Formatter.create().formatSource("class T {\n"
+ " public static void main(String[] args) { // one_long_incredibly"
+ "_unbroken_sentence_moving_from_topic_to_topic_so_that_no-one_had_a"
+ "_chance_to_interrupt;\n"
+ " }\n"
+ "}\n"))
assertThat(Formatter.create()
.formatSource("class T {\n"
+ " public static void main(String[] args) { // one_long_incredibly"
+ "_unbroken_sentence_moving_from_topic_to_topic_so_that_no-one_had_a"
+ "_chance_to_interrupt;\n"
+ " }\n"
+ "}\n"))
.isEqualTo("class T {\n"
+ " public static void main(\n"
+ " String[]\n"
Expand All @@ -366,12 +368,13 @@ public void onlyWrapLineCommentOnWhitespace() throws Exception {

@Test
public void onlyWrapLineCommentOnWhitespace_noLeadingWhitespace() throws Exception {
assertThat(Formatter.create().formatSource("class T {\n"
+ " public static void main(String[] args) { //one_long_incredibly"
+ "_unbroken_sentence_moving_from_topic_to_topic_so_that_no-one_had_a"
+ "_chance_to_interrupt;\n"
+ " }\n"
+ "}\n"))
assertThat(Formatter.create()
.formatSource("class T {\n"
+ " public static void main(String[] args) { //one_long_incredibly"
+ "_unbroken_sentence_moving_from_topic_to_topic_so_that_no-one_had_a"
+ "_chance_to_interrupt;\n"
+ " }\n"
+ "}\n"))
.isEqualTo("class T {\n"
+ " public static void main(\n"
+ " String[]\n"
Expand Down Expand Up @@ -420,11 +423,12 @@ public void blankLinesImportComment() throws FormatterException {

@Test
public void dontWrapMoeLineComments() throws Exception {
assertThat(Formatter.create().formatSource("class T {\n"
+ " // MOE: one long incredibly"
+ " unbroken sentence moving from topic to topic so that no-one had a"
+ " chance to interrupt;\n"
+ "}\n"))
assertThat(Formatter.create()
.formatSource("class T {\n"
+ " // MOE: one long incredibly"
+ " unbroken sentence moving from topic to topic so that no-one had a"
+ " chance to interrupt;\n"
+ "}\n"))
.isEqualTo("class T {\n"
+ " // MOE: one long incredibly"
+ " unbroken sentence moving from topic to topic so that no-one had a"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,10 +363,11 @@ public void dryRunFiles() throws Exception {

assertThat(exitCode).isEqualTo(0);

assertThat(out.toString()).isEqualTo(b.toAbsolutePath().toString()
+ System.lineSeparator()
+ c.toAbsolutePath().toString()
+ System.lineSeparator());
assertThat(out.toString())
.isEqualTo(b.toAbsolutePath().toString()
+ System.lineSeparator()
+ c.toAbsolutePath().toString()
+ System.lineSeparator());
assertThat(err.toString()).isEmpty();
}

Expand Down

0 comments on commit 1af0cfe

Please sign in to comment.