Skip to content

Commit 970c348

Browse files
committed
Rename test-cases to test-cases-java21
The cases are to live in a folder for each JDK they need, side by side, and these are the ones for any JDK from 21 (ADR-002). Moved as they are; FormatterCasesTest reads the new folder, and the two comments that name it follow.
1 parent d006421 commit 970c348

918 files changed

Lines changed: 7 additions & 7 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎open-java-format/src/main/java/com/palantir/javaformat/doc/Level.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ case BreakOnlyIfInnerLevelsThenFitOnOneLine(boolean keepIndentWhenInlined) -> {
590590
// levels that are meant to look good even if partially inlined, e.g. method
591591
// chains, which will catch things like builders, but not other kinds of levels like
592592
// constant expressions.
593-
// See the palantir-expression-lambdas cases in test-cases/testdata for an example of
593+
// See the palantir-expression-lambdas cases in test-cases-java21/testdata for an example of
594594
// what this is trying to avoid.
595595

596596
// For this, need to actually check the last inner level of `lastLevel` (2 levels down).

‎open-java-format/src/test/java/com/palantir/javaformat/java/FormatterCasesTest.java‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@
2828
import org.junit.jupiter.api.parallel.ExecutionMode;
2929

3030
/**
31-
* One test for each {@link CaseFile} under {@code test-cases} on the test classpath: formatting the before block gives
32-
* the after block, and formatting that again changes nothing. Adding a case is adding a file.
31+
* One test for each {@link CaseFile} under {@code test-cases-java21} on the test classpath: formatting the before block
32+
* gives the after block, and formatting that again changes nothing. Adding a case is adding a file.
3333
*/
3434
@Execution(ExecutionMode.CONCURRENT)
3535
final class FormatterCasesTest {
36-
private static final String CASES = "test-cases";
36+
private static final String CASES = "test-cases-java21";
3737

3838
private static final Formatter FORMATTER = Formatter.createFormatter(
3939
JavaFormatterOptions.builder().style(Style.OJF).build());

‎open-java-format/src/test/java/com/palantir/javaformat/java/RemoveUnusedImportsTest.java‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
import org.junit.jupiter.api.parallel.ExecutionMode;
2424

2525
/**
26-
* {@link RemoveUnusedImports} on its own, where a case under {@code test-cases/imports} cannot show it. A case fixes the
27-
* imports before it formats, and formatting takes a doubled blank line away by itself, while the command line formats
28-
* first. And the cases run on JDK 21, where a module import does not parse.
26+
* {@link RemoveUnusedImports} on its own, where a case under {@code test-cases-java21/imports} cannot show it. A case
27+
* fixes the imports before it formats, and formatting takes a doubled blank line away by itself, while the command line
28+
* formats first. And the cases run on JDK 21, where a module import does not parse.
2929
*/
3030
@Execution(ExecutionMode.CONCURRENT)
3131
final class RemoveUnusedImportsTest {

open-java-format/src/test/resources/test-cases/badConstructor.case renamed to open-java-format/src/test/resources/test-cases-java21/badConstructor.case

File renamed without changes.

open-java-format/src/test/resources/test-cases/blankInClassBody.case renamed to open-java-format/src/test/resources/test-cases-java21/blankInClassBody.case

File renamed without changes.

open-java-format/src/test/resources/test-cases/blockCommentInteriorTrailingBlank.case renamed to open-java-format/src/test/resources/test-cases-java21/blockCommentInteriorTrailingBlank.case

File renamed without changes.

open-java-format/src/test/resources/test-cases/blockCommentTrailingBlank.case renamed to open-java-format/src/test/resources/test-cases-java21/blockCommentTrailingBlank.case

File renamed without changes.

open-java-format/src/test/resources/test-cases/commentAfterOpeningDelimiter-assert.case renamed to open-java-format/src/test/resources/test-cases-java21/commentAfterOpeningDelimiter-assert.case

File renamed without changes.

open-java-format/src/test/resources/test-cases/commentAfterOpeningDelimiter-enumSemicolon.case renamed to open-java-format/src/test/resources/test-cases-java21/commentAfterOpeningDelimiter-enumSemicolon.case

File renamed without changes.

open-java-format/src/test/resources/test-cases/commentAfterOpeningDelimiter-forHeader.case renamed to open-java-format/src/test/resources/test-cases-java21/commentAfterOpeningDelimiter-forHeader.case

File renamed without changes.

0 commit comments

Comments
 (0)