Skip to content

Commit 60845a6

Browse files
committed
Turn back on Jabel processor, now that I’ve discovered it’s gradle vs gradlew causing the discrepancy
1 parent 57a42dc commit 60845a6

File tree

3 files changed

+26
-22
lines changed

3 files changed

+26
-22
lines changed

example/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ test {
3333
}
3434

3535
dependencies {
36-
// annotationProcessor project(":jabel-javac-plugin")
36+
annotationProcessor project(":jabel-javac-plugin")
3737

3838
testCompile 'junit:junit:4.12'
3939
}

example/src/main/java/com/example/JabelExample.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -65,18 +65,18 @@ public String innerPublic() {
6565
}
6666

6767

68-
public void whenSwitchingOnOperationSquareMe_thenWillReturnSquare() {
69-
var me = 4;
70-
var operation = "squareMe";
71-
var result = switch (operation) {
72-
case "doubleMe" -> {
73-
yield me * 2;
74-
}
75-
case "squareMe" -> {
76-
yield me * me;
77-
}
78-
default -> me;
79-
};
80-
81-
}
68+
// public void whenSwitchingOnOperationSquareMe_thenWillReturnSquare() {
69+
// var me = 4;
70+
// var operation = "squareMe";
71+
// var result = switch (operation) {
72+
// case "doubleMe" -> {
73+
// yield me * 2;
74+
// }
75+
// case "squareMe" -> {
76+
// yield me * me;
77+
// }
78+
// default -> me;
79+
// };
80+
//
81+
// }
8282
}

example/src/test/java/com/example/JabelExampleTest.java

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,12 @@ public void testJava13PreviewFeatureTextBlocksJep355(){
3737
""";
3838
}
3939

40+
/**
41+
* JEP 354: Switch Expressions (Second Preview)
42+
* https://openjdk.java.net/jeps/354
43+
*/
4044
@Test
41-
public void whenSwitchingOnOperationSquareMe_thenWillReturnSquare() {
45+
public void testJava13PreviewJep354() {
4246
var me = 4;
4347
var operation = "squareMe";
4448
var result = switch (operation) {
@@ -53,11 +57,11 @@ public void whenSwitchingOnOperationSquareMe_thenWillReturnSquare() {
5357

5458
assertEquals(16, result);
5559
}
56-
57-
@Test
58-
public void tgesd(){
59-
JabelExampleTest jabelExampleTest = new JabelExampleTest();
60-
jabelExampleTest.whenSwitchingOnOperationSquareMe_thenWillReturnSquare();
61-
}
60+
//
61+
// @Test
62+
// public void tgesd(){
63+
// JabelExampleTest jabelExampleTest = new JabelExampleTest();
64+
// jabelExampleTest.whenSwitchingOnOperationSquareMe_thenWillReturnSquare();
65+
// }
6266

6367
}

0 commit comments

Comments
 (0)