diff --git a/core/src/test/resources/com/google/googlejavaformat/java/testdata/SwitchGuardClause.input b/core/src/test/resources/com/google/googlejavaformat/java/testdata/SwitchGuardClause.input index 25df5809..36eb21b1 100644 --- a/core/src/test/resources/com/google/googlejavaformat/java/testdata/SwitchGuardClause.input +++ b/core/src/test/resources/com/google/googlejavaformat/java/testdata/SwitchGuardClause.input @@ -6,4 +6,52 @@ class SwitchGuardClause { default -> true; }; } + + { + switch (o) { + case TypeWithVeryVeryVeryVeryLongName variableWithVeryLongName when variableWithVeryLongName + .methodWithVeryVeryVeryVeryLongNameReturnThis() + .methodWithVeryVeryVeryVeryLongNameReturnBoolean() -> { + System.err.println(); + } + default -> {} + } + switch (o) { + case TypeWithVeryVeryVeryVeryLongName + variableWithVeryVeryVeryVeryVeryVeryVeryVeryVeryLongName when variableWithVeryVeryVeryVeryVeryVeryVeryVeryVeryLongName + .methodWithVeryVeryVeryVeryLongNameReturnThis() + .methodWithVeryVeryVeryVeryLongNameReturnBoolean() -> { + System.err.println(); + } + default -> {} + } + switch (o) { + case TypeWithVeryVeryVeryVeryLongName variableWithVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongName + when variableWithVeryVeryVeryVeryVeryVeryVeryVeryVeryLongName + .methodWithVeryVeryVeryVeryLongNameReturnThis() + .methodWithVeryVeryVeryVeryLongNameReturnBoolean() -> { + System.err.println(); + } + default -> {} + } + switch (o) { + case TypeWithVeryVeryVeryVeryLongName variableWithVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongName, + TypeWithVeryVeryVeryVeryLongName variableWithVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongName + when variableWithVeryVeryVeryVeryVeryVeryVeryVeryVeryLongName + .methodWithVeryVeryVeryVeryLongNameReturnThis() + .methodWithVeryVeryVeryVeryLongNameReturnBoolean() -> { + System.err.println(); + } + default -> {} + } + switch (o) { + case TypeWithVeryVeryVeryVeryLongName variableWithVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongName, + TypeWithVeryVeryVeryVeryLongName variableWithVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongName + when variableWithVeryVeryVeryVeryVeryVeryVeryVeryVeryLongName + .methodWithVeryVeryVeryVeryLongNameReturnThis() + .methodWithVeryVeryVeryVeryLongNameReturnBoolean() -> + System.err.println(); + default -> {} + } + } } diff --git a/core/src/test/resources/com/google/googlejavaformat/java/testdata/SwitchGuardClause.output b/core/src/test/resources/com/google/googlejavaformat/java/testdata/SwitchGuardClause.output index 25df5809..1a81422c 100644 --- a/core/src/test/resources/com/google/googlejavaformat/java/testdata/SwitchGuardClause.output +++ b/core/src/test/resources/com/google/googlejavaformat/java/testdata/SwitchGuardClause.output @@ -6,4 +6,54 @@ class SwitchGuardClause { default -> true; }; } + + { + switch (o) { + case TypeWithVeryVeryVeryVeryLongName variableWithVeryLongName when variableWithVeryLongName + .methodWithVeryVeryVeryVeryLongNameReturnThis() + .methodWithVeryVeryVeryVeryLongNameReturnBoolean() -> { + System.err.println(); + } + default -> {} + } + switch (o) { + case TypeWithVeryVeryVeryVeryLongName + variableWithVeryVeryVeryVeryVeryVeryVeryVeryVeryLongName when variableWithVeryVeryVeryVeryVeryVeryVeryVeryVeryLongName + .methodWithVeryVeryVeryVeryLongNameReturnThis() + .methodWithVeryVeryVeryVeryLongNameReturnBoolean() -> { + System.err.println(); + } + default -> {} + } + switch (o) { + case TypeWithVeryVeryVeryVeryLongName + variableWithVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongName when variableWithVeryVeryVeryVeryVeryVeryVeryVeryVeryLongName + .methodWithVeryVeryVeryVeryLongNameReturnThis() + .methodWithVeryVeryVeryVeryLongNameReturnBoolean() -> { + System.err.println(); + } + default -> {} + } + switch (o) { + case TypeWithVeryVeryVeryVeryLongName + variableWithVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongName, + TypeWithVeryVeryVeryVeryLongName + variableWithVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongName when variableWithVeryVeryVeryVeryVeryVeryVeryVeryVeryLongName + .methodWithVeryVeryVeryVeryLongNameReturnThis() + .methodWithVeryVeryVeryVeryLongNameReturnBoolean() -> { + System.err.println(); + } + default -> {} + } + switch (o) { + case TypeWithVeryVeryVeryVeryLongName + variableWithVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongName, + TypeWithVeryVeryVeryVeryLongName + variableWithVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongName when variableWithVeryVeryVeryVeryVeryVeryVeryVeryVeryLongName + .methodWithVeryVeryVeryVeryLongNameReturnThis() + .methodWithVeryVeryVeryVeryLongNameReturnBoolean() -> + System.err.println(); + default -> {} + } + } }