diff --git a/test/fixtures/java/classLiteral.java b/test/fixtures/java/corpus/ClassLiteral.A.java similarity index 100% rename from test/fixtures/java/classLiteral.java rename to test/fixtures/java/corpus/ClassLiteral.A.java diff --git a/test/fixtures/java/corpus/ClassLiteral.B.java b/test/fixtures/java/corpus/ClassLiteral.B.java new file mode 100644 index 000000000..9e1d9da2f --- /dev/null +++ b/test/fixtures/java/corpus/ClassLiteral.B.java @@ -0,0 +1,5 @@ +class Dino { + public static void normalError() { + Class c = String.class; + } +} diff --git a/test/fixtures/java/corpus/ClassLiteral.diffA-B.txt b/test/fixtures/java/corpus/ClassLiteral.diffA-B.txt new file mode 100644 index 000000000..fa40a1241 --- /dev/null +++ b/test/fixtures/java/corpus/ClassLiteral.diffA-B.txt @@ -0,0 +1,24 @@ +(Statements + (Class + (Identifier) + (Statements + (Method + (Void) + {+(AccessibilityModifier)+} + {+(AccessibilityModifier)+} + (Empty) + (Identifier) + (Statements + {+(GreaterThan + {+(LessThan + {+(Identifier)+} + {+(Identifier)+})+} + {+(Assignment + {+(Identifier)+} + {+(ClassLiteral + {+(Identifier)+})+})+})+} + {-(Call + {-(Identifier)-} + {-(ClassLiteral + {-(Identifier)-})-} + {-(Empty)-})-}))))) diff --git a/test/fixtures/java/corpus/ClassLiteral.diffB-A.txt b/test/fixtures/java/corpus/ClassLiteral.diffB-A.txt new file mode 100644 index 000000000..f273862de --- /dev/null +++ b/test/fixtures/java/corpus/ClassLiteral.diffB-A.txt @@ -0,0 +1,24 @@ +(Statements + (Class + (Identifier) + (Statements + (Method + (Void) + {-(AccessibilityModifier)-} + {-(AccessibilityModifier)-} + (Empty) + (Identifier) + (Statements + {+(Call + {+(Identifier)+} + {+(ClassLiteral + {+(Identifier)+})+} + {+(Empty)+})+} + {-(GreaterThan + {-(LessThan + {-(Identifier)-} + {-(Identifier)-})-} + {-(Assignment + {-(Identifier)-} + {-(ClassLiteral + {-(Identifier)-})-})-})-}))))) diff --git a/test/fixtures/java/corpus/ClassLiteral.parseA.txt b/test/fixtures/java/corpus/ClassLiteral.parseA.txt new file mode 100644 index 000000000..2aa747ada --- /dev/null +++ b/test/fixtures/java/corpus/ClassLiteral.parseA.txt @@ -0,0 +1,14 @@ +(Statements + (Class + (Identifier) + (Statements + (Method + (Void) + (Empty) + (Identifier) + (Statements + (Call + (Identifier) + (ClassLiteral + (Identifier)) + (Empty))))))) diff --git a/test/fixtures/java/corpus/ClassLiteral.parseB.txt b/test/fixtures/java/corpus/ClassLiteral.parseB.txt new file mode 100644 index 000000000..eb4d754a3 --- /dev/null +++ b/test/fixtures/java/corpus/ClassLiteral.parseB.txt @@ -0,0 +1,19 @@ +(Statements + (Class + (Identifier) + (Statements + (Method + (Void) + (AccessibilityModifier) + (AccessibilityModifier) + (Empty) + (Identifier) + (Statements + (GreaterThan + (LessThan + (Identifier) + (Identifier)) + (Assignment + (Identifier) + (ClassLiteral + (Identifier))))))))) diff --git a/test/fixtures/java/corpus/continue.java b/test/fixtures/java/corpus/Continue.A.java similarity index 100% rename from test/fixtures/java/corpus/continue.java rename to test/fixtures/java/corpus/Continue.A.java diff --git a/test/fixtures/java/corpus/Continue.B.java b/test/fixtures/java/corpus/Continue.B.java new file mode 100644 index 000000000..8c2d781d5 --- /dev/null +++ b/test/fixtures/java/corpus/Continue.B.java @@ -0,0 +1,7 @@ +class Test { + public static void main(String[] args) { + if (i > 4 && i < 9) { + continue; + } + } +} diff --git a/test/fixtures/java/corpus/Continue.diffA-B.txt b/test/fixtures/java/corpus/Continue.diffA-B.txt new file mode 100644 index 000000000..1fa9993c2 --- /dev/null +++ b/test/fixtures/java/corpus/Continue.diffA-B.txt @@ -0,0 +1,30 @@ +(Statements + (Class + {-(AccessibilityModifier)-} + (Identifier) + (Statements + {+(Method + {+(Void)+} + {+(AccessibilityModifier)+} + {+(AccessibilityModifier)+} + {+(Empty)+} + {+(Identifier)+} + {+(Annotation + {+(Identifier)+} + {+(Array + {+(Empty)+} + {+(Identifier)+})+})+} + {+(Statements + {+(If + {+(And + {+(GreaterThan + {+(Identifier)+} + {+(Integer)+})+} + {+(LessThan + {+(Identifier)+} + {+(Integer)+})+})+} + {+(Statements + {+(Continue + {+(Empty)+})+})+} + {+(Empty)+})+})+})+} + {-(Error)-}))) diff --git a/test/fixtures/java/corpus/Continue.diffB-A.txt b/test/fixtures/java/corpus/Continue.diffB-A.txt new file mode 100644 index 000000000..b7b0fdd7e --- /dev/null +++ b/test/fixtures/java/corpus/Continue.diffB-A.txt @@ -0,0 +1,30 @@ +(Statements + (Class + {+(AccessibilityModifier)+} + (Identifier) + (Statements + {+(Error)+} + {-(Method + {-(Void)-} + {-(AccessibilityModifier)-} + {-(AccessibilityModifier)-} + {-(Empty)-} + {-(Identifier)-} + {-(Annotation + {-(Identifier)-} + {-(Array + {-(Empty)-} + {-(Identifier)-})-})-} + {-(Statements + {-(If + {-(And + {-(GreaterThan + {-(Identifier)-} + {-(Integer)-})-} + {-(LessThan + {-(Identifier)-} + {-(Integer)-})-})-} + {-(Statements + {-(Continue + {-(Empty)-})-})-} + {-(Empty)-})-})-})-}))) diff --git a/test/fixtures/java/corpus/Continue.parseA.txt b/test/fixtures/java/corpus/Continue.parseA.txt new file mode 100644 index 000000000..1b41fbdb4 --- /dev/null +++ b/test/fixtures/java/corpus/Continue.parseA.txt @@ -0,0 +1,6 @@ +(Statements + (Class + (AccessibilityModifier) + (Identifier) + (Statements + (Error)))) diff --git a/test/fixtures/java/corpus/Continue.parseB.txt b/test/fixtures/java/corpus/Continue.parseB.txt new file mode 100644 index 000000000..101d92c26 --- /dev/null +++ b/test/fixtures/java/corpus/Continue.parseB.txt @@ -0,0 +1,28 @@ +(Statements + (Class + (Identifier) + (Statements + (Method + (Void) + (AccessibilityModifier) + (AccessibilityModifier) + (Empty) + (Identifier) + (Annotation + (Identifier) + (Array + (Empty) + (Identifier))) + (Statements + (If + (And + (GreaterThan + (Identifier) + (Integer)) + (LessThan + (Identifier) + (Integer))) + (Statements + (Continue + (Empty))) + (Empty))))))) diff --git a/test/fixtures/java/corpus/Continue0.A.java b/test/fixtures/java/corpus/Continue0.A.java new file mode 100644 index 000000000..7703f1651 --- /dev/null +++ b/test/fixtures/java/corpus/Continue0.A.java @@ -0,0 +1,14 @@ +public class Test { + + public static void main(String args[]) { + int [] numbers = {10, 20, 30, 40, 50}; + + for(int x : numbers ) { + if( x == 30 ) { + continue; + } + System.out.print( x ); + System.out.print("\n"); + } + } +} diff --git a/test/fixtures/java/corpus/Continue1.A.java b/test/fixtures/java/corpus/Continue1.A.java new file mode 100644 index 000000000..7703f1651 --- /dev/null +++ b/test/fixtures/java/corpus/Continue1.A.java @@ -0,0 +1,14 @@ +public class Test { + + public static void main(String args[]) { + int [] numbers = {10, 20, 30, 40, 50}; + + for(int x : numbers ) { + if( x == 30 ) { + continue; + } + System.out.print( x ); + System.out.print("\n"); + } + } +} diff --git a/test/fixtures/java/corpus/Dims.A.java b/test/fixtures/java/corpus/Dims.A.java new file mode 100644 index 000000000..dbb5e6705 --- /dev/null +++ b/test/fixtures/java/corpus/Dims.A.java @@ -0,0 +1 @@ +class ForDemo { int[] metrics; } diff --git a/test/fixtures/java/corpus/dims.java b/test/fixtures/java/corpus/Dims.B.java similarity index 100% rename from test/fixtures/java/corpus/dims.java rename to test/fixtures/java/corpus/Dims.B.java diff --git a/test/fixtures/java/corpus/Dims.diffA-B.txt b/test/fixtures/java/corpus/Dims.diffA-B.txt new file mode 100644 index 000000000..e50db66b2 --- /dev/null +++ b/test/fixtures/java/corpus/Dims.diffA-B.txt @@ -0,0 +1,20 @@ +(Statements + (Class + (Identifier) + (Statements + {+(Method + {+(Void)+} + {+(Empty)+} + {+(Identifier)+} + {+(Annotation + {+(Identifier)+} + {+(Array + {+(Empty)+} + {+(Identifier)+})+})+} + {+(Statements)+})+} + {-(Statements + {-(Variable + {-(Array + {-(Empty)-} + {-(Int)-})-} + {-(Identifier)-})-})-}))) diff --git a/test/fixtures/java/corpus/Dims.diffB-A.txt b/test/fixtures/java/corpus/Dims.diffB-A.txt new file mode 100644 index 000000000..c729dffc7 --- /dev/null +++ b/test/fixtures/java/corpus/Dims.diffB-A.txt @@ -0,0 +1,20 @@ +(Statements + (Class + (Identifier) + (Statements + {+(Statements + {+(Variable + {+(Array + {+(Empty)+} + {+(Int)+})+} + {+(Identifier)+})+})+} + {-(Method + {-(Void)-} + {-(Empty)-} + {-(Identifier)-} + {-(Annotation + {-(Identifier)-} + {-(Array + {-(Empty)-} + {-(Identifier)-})-})-} + {-(Statements)-})-}))) diff --git a/test/fixtures/java/corpus/Dims.parseA.txt b/test/fixtures/java/corpus/Dims.parseA.txt new file mode 100644 index 000000000..be774b376 --- /dev/null +++ b/test/fixtures/java/corpus/Dims.parseA.txt @@ -0,0 +1,10 @@ +(Statements + (Class + (Identifier) + (Statements + (Statements + (Variable + (Array + (Empty) + (Int)) + (Identifier)))))) diff --git a/test/fixtures/java/corpus/Dims.parseB.txt b/test/fixtures/java/corpus/Dims.parseB.txt new file mode 100644 index 000000000..a58384496 --- /dev/null +++ b/test/fixtures/java/corpus/Dims.parseB.txt @@ -0,0 +1,14 @@ +(Statements + (Class + (Identifier) + (Statements + (Method + (Void) + (Empty) + (Identifier) + (Annotation + (Identifier) + (Array + (Empty) + (Identifier))) + (Statements))))) diff --git a/test/fixtures/java/corpus/do-while.java b/test/fixtures/java/corpus/DoWhile.A.java similarity index 100% rename from test/fixtures/java/corpus/do-while.java rename to test/fixtures/java/corpus/DoWhile.A.java diff --git a/test/fixtures/java/corpus/DoWhile.B.java b/test/fixtures/java/corpus/DoWhile.B.java new file mode 100644 index 000000000..c04924298 --- /dev/null +++ b/test/fixtures/java/corpus/DoWhile.B.java @@ -0,0 +1,9 @@ +class WhileDemo { + public static void main(String[] args) { + int i = 5; + do { + System.out.println(i); + i++; + } while (i <= 10); + } +} diff --git a/test/fixtures/java/corpus/DoWhile.diffA-B.txt b/test/fixtures/java/corpus/DoWhile.diffA-B.txt new file mode 100644 index 000000000..89fe65687 --- /dev/null +++ b/test/fixtures/java/corpus/DoWhile.diffA-B.txt @@ -0,0 +1,51 @@ +(Statements + (Class + (Identifier) + (Statements + (Method + (Void) + (AccessibilityModifier) + (AccessibilityModifier) + (Empty) + (Identifier) + (Annotation + (Identifier) + (Array + (Empty) + (Identifier))) + (Statements + {+(Statements + {+(Assignment + {+(Variable + {+(Int)+} + {+(Identifier)+})+} + {+(Integer)+})+})+} + (DoWhile + { (Not + {-(Call + {-(MemberAccess + {-(TextElement)-})-} + {-(Identifier)-} + {-(Empty)-})-}) + ->(LessThanEqual + {+(Identifier)+} + {+(Integer)+}) } + (Statements + (Call + { (MemberAccess + {-(MemberAccess + {-(Identifier)-})-}) + ->(MemberAccess + {+(MemberAccess + {+(Identifier)+})+}) } + {+(Identifier)+} + {-(TextElement)-} + (Empty)) + {+(PostIncrement + {+(Identifier)+})+} + {-(Assignment + {-(Identifier)-} + {-(Call + {-(MemberAccess + {-(Identifier)-})-} + {-(Empty)-})-})-}))))))) diff --git a/test/fixtures/java/corpus/DoWhile.diffB-A.txt b/test/fixtures/java/corpus/DoWhile.diffB-A.txt new file mode 100644 index 000000000..11aac56f6 --- /dev/null +++ b/test/fixtures/java/corpus/DoWhile.diffB-A.txt @@ -0,0 +1,55 @@ +(Statements + (Class + (Identifier) + (Statements + (Method + (Void) + (AccessibilityModifier) + (AccessibilityModifier) + (Empty) + (Identifier) + (Annotation + (Identifier) + (Array + (Empty) + (Identifier))) + (Statements + {+(DoWhile + {+(Not + {+(Call + {+(MemberAccess + {+(TextElement)+})+} + {+(Identifier)+} + {+(Empty)+})+})+} + {+(Statements + {+(Call + {+(MemberAccess + {+(MemberAccess + {+(Identifier)+})+})+} + {+(TextElement)+} + {+(Empty)+})+} + {+(Assignment + {+(Identifier)+} + {+(Call + {+(MemberAccess + {+(Identifier)+})+} + {+(Empty)+})+})+})+})+} + {-(Statements + {-(Assignment + {-(Variable + {-(Int)-} + {-(Identifier)-})-} + {-(Integer)-})-})-} + {-(DoWhile + {-(LessThanEqual + {-(Identifier)-} + {-(Integer)-})-} + {-(Statements + {-(Call + {-(MemberAccess + {-(MemberAccess + {-(Identifier)-})-})-} + {-(Identifier)-} + {-(Empty)-})-} + {-(PostIncrement + {-(Identifier)-})-})-})-}))))) diff --git a/test/fixtures/java/corpus/DoWhile.parseA.txt b/test/fixtures/java/corpus/DoWhile.parseA.txt new file mode 100644 index 000000000..2fd57f9a7 --- /dev/null +++ b/test/fixtures/java/corpus/DoWhile.parseA.txt @@ -0,0 +1,36 @@ +(Statements + (Class + (Identifier) + (Statements + (Method + (Void) + (AccessibilityModifier) + (AccessibilityModifier) + (Empty) + (Identifier) + (Annotation + (Identifier) + (Array + (Empty) + (Identifier))) + (Statements + (DoWhile + (Not + (Call + (MemberAccess + (TextElement)) + (Identifier) + (Empty))) + (Statements + (Call + (MemberAccess + (MemberAccess + (Identifier))) + (TextElement) + (Empty)) + (Assignment + (Identifier) + (Call + (MemberAccess + (Identifier)) + (Empty)))))))))) diff --git a/test/fixtures/java/corpus/DoWhile.parseB.txt b/test/fixtures/java/corpus/DoWhile.parseB.txt new file mode 100644 index 000000000..cda011423 --- /dev/null +++ b/test/fixtures/java/corpus/DoWhile.parseB.txt @@ -0,0 +1,35 @@ +(Statements + (Class + (Identifier) + (Statements + (Method + (Void) + (AccessibilityModifier) + (AccessibilityModifier) + (Empty) + (Identifier) + (Annotation + (Identifier) + (Array + (Empty) + (Identifier))) + (Statements + (Statements + (Assignment + (Variable + (Int) + (Identifier)) + (Integer))) + (DoWhile + (LessThanEqual + (Identifier) + (Integer)) + (Statements + (Call + (MemberAccess + (MemberAccess + (Identifier))) + (Identifier) + (Empty)) + (PostIncrement + (Identifier))))))))) diff --git a/test/fixtures/java/corpus/EnumDeclaration.A.java b/test/fixtures/java/corpus/EnumDeclaration.A.java new file mode 100644 index 000000000..73891422d --- /dev/null +++ b/test/fixtures/java/corpus/EnumDeclaration.A.java @@ -0,0 +1,3 @@ +public enum Colour { + +} diff --git a/test/fixtures/java/corpus/EnumDeclaration.B.java b/test/fixtures/java/corpus/EnumDeclaration.B.java new file mode 100644 index 000000000..5a14813e7 --- /dev/null +++ b/test/fixtures/java/corpus/EnumDeclaration.B.java @@ -0,0 +1,4 @@ +enum Colour +{ + RED, GREEN, BLUE; +} diff --git a/test/fixtures/java/corpus/EnumDeclaration.diffA-B.txt b/test/fixtures/java/corpus/EnumDeclaration.diffA-B.txt new file mode 100644 index 000000000..0526ed812 --- /dev/null +++ b/test/fixtures/java/corpus/EnumDeclaration.diffA-B.txt @@ -0,0 +1,7 @@ +(Statements + (EnumDeclaration + {-(AccessibilityModifier)-} + (Identifier) + {+(Identifier)+} + {+(Identifier)+} + {+(Identifier)+})) diff --git a/test/fixtures/java/corpus/EnumDeclaration.diffB-A.txt b/test/fixtures/java/corpus/EnumDeclaration.diffB-A.txt new file mode 100644 index 000000000..30eab392d --- /dev/null +++ b/test/fixtures/java/corpus/EnumDeclaration.diffB-A.txt @@ -0,0 +1,7 @@ +(Statements + (EnumDeclaration + {+(AccessibilityModifier)+} + (Identifier) + {-(Identifier)-} + {-(Identifier)-} + {-(Identifier)-})) diff --git a/test/fixtures/java/corpus/EnumDeclaration.parseA.txt b/test/fixtures/java/corpus/EnumDeclaration.parseA.txt new file mode 100644 index 000000000..7e840a448 --- /dev/null +++ b/test/fixtures/java/corpus/EnumDeclaration.parseA.txt @@ -0,0 +1,4 @@ +(Statements + (EnumDeclaration + (AccessibilityModifier) + (Identifier))) diff --git a/test/fixtures/java/corpus/EnumDeclaration.parseB.txt b/test/fixtures/java/corpus/EnumDeclaration.parseB.txt new file mode 100644 index 000000000..cc6df1941 --- /dev/null +++ b/test/fixtures/java/corpus/EnumDeclaration.parseB.txt @@ -0,0 +1,6 @@ +(Statements + (EnumDeclaration + (Identifier) + (Identifier) + (Identifier) + (Identifier))) diff --git a/test/fixtures/java/corpus/field-access.java b/test/fixtures/java/corpus/FieldAccess.A.java similarity index 100% rename from test/fixtures/java/corpus/field-access.java rename to test/fixtures/java/corpus/FieldAccess.A.java diff --git a/test/fixtures/java/corpus/FieldAccess.B.java b/test/fixtures/java/corpus/FieldAccess.B.java new file mode 100644 index 000000000..24ee8a00b --- /dev/null +++ b/test/fixtures/java/corpus/FieldAccess.B.java @@ -0,0 +1,5 @@ +class Grouped { + Flowable(K key) { + System.out.println(favorite().mountain); + } +} diff --git a/test/fixtures/java/corpus/FieldAccess.diffA-B.txt b/test/fixtures/java/corpus/FieldAccess.diffA-B.txt new file mode 100644 index 000000000..2f0e2ed1d --- /dev/null +++ b/test/fixtures/java/corpus/FieldAccess.diffA-B.txt @@ -0,0 +1,23 @@ +(Statements + (Class + (Identifier) + (Statements + (Constructor + (Identifier) + (Annotation + (Identifier) + (Identifier)) + (Statements + {+(Call + {+(MemberAccess + {+(MemberAccess + {+(Identifier)+})+})+} + {+(MemberAccess + {+(Call + {+(Identifier)+} + {+(Empty)+})+})+} + {+(Empty)+})+} + {-(Assignment + {-(MemberAccess + {-(This)-})-} + {-(Identifier)-})-}))))) diff --git a/test/fixtures/java/corpus/FieldAccess.diffB-A.txt b/test/fixtures/java/corpus/FieldAccess.diffB-A.txt new file mode 100644 index 000000000..4718bae4a --- /dev/null +++ b/test/fixtures/java/corpus/FieldAccess.diffB-A.txt @@ -0,0 +1,23 @@ +(Statements + (Class + (Identifier) + (Statements + (Constructor + (Identifier) + (Annotation + (Identifier) + (Identifier)) + (Statements + {+(Assignment + {+(MemberAccess + {+(This)+})+} + {+(Identifier)+})+} + {-(Call + {-(MemberAccess + {-(MemberAccess + {-(Identifier)-})-})-} + {-(MemberAccess + {-(Call + {-(Identifier)-} + {-(Empty)-})-})-} + {-(Empty)-})-}))))) diff --git a/test/fixtures/java/corpus/FieldAccess.parseA.txt b/test/fixtures/java/corpus/FieldAccess.parseA.txt new file mode 100644 index 000000000..873d606ef --- /dev/null +++ b/test/fixtures/java/corpus/FieldAccess.parseA.txt @@ -0,0 +1,14 @@ +(Statements + (Class + (Identifier) + (Statements + (Constructor + (Identifier) + (Annotation + (Identifier) + (Identifier)) + (Statements + (Assignment + (MemberAccess + (This)) + (Identifier))))))) diff --git a/test/fixtures/java/corpus/FieldAccess.parseB.txt b/test/fixtures/java/corpus/FieldAccess.parseB.txt new file mode 100644 index 000000000..940f3a775 --- /dev/null +++ b/test/fixtures/java/corpus/FieldAccess.parseB.txt @@ -0,0 +1,19 @@ +(Statements + (Class + (Identifier) + (Statements + (Constructor + (Identifier) + (Annotation + (Identifier) + (Identifier)) + (Statements + (Call + (MemberAccess + (MemberAccess + (Identifier))) + (MemberAccess + (Call + (Identifier) + (Empty))) + (Empty))))))) diff --git a/test/fixtures/java/corpus/float.java b/test/fixtures/java/corpus/Float.A.java similarity index 100% rename from test/fixtures/java/corpus/float.java rename to test/fixtures/java/corpus/Float.A.java diff --git a/test/fixtures/java/corpus/Float.B.java b/test/fixtures/java/corpus/Float.B.java new file mode 100644 index 000000000..d71cc553f --- /dev/null +++ b/test/fixtures/java/corpus/Float.B.java @@ -0,0 +1,7 @@ +public class Point { + void dinosaur() { + Float x = 10.0; + Float y = 20.0; + System.out.print(x + y); + } +} diff --git a/test/fixtures/java/corpus/Float.diffA-B.txt b/test/fixtures/java/corpus/Float.diffA-B.txt new file mode 100644 index 000000000..605621b28 --- /dev/null +++ b/test/fixtures/java/corpus/Float.diffA-B.txt @@ -0,0 +1,30 @@ +(Statements + (Class + (AccessibilityModifier) + (Identifier) + (Statements + (Method + (Void) + (Empty) + (Identifier) + (Statements + (Statements + (Assignment + (Variable + (Identifier) + (Identifier)) + (Float))) + {+(Statements + {+(Assignment + {+(Variable + {+(Identifier)+} + {+(Identifier)+})+} + {+(Float)+})+})+} + {+(Call + {+(MemberAccess + {+(MemberAccess + {+(Identifier)+})+})+} + {+(Plus + {+(Identifier)+} + {+(Identifier)+})+} + {+(Empty)+})+}))))) diff --git a/test/fixtures/java/corpus/Float.diffB-A.txt b/test/fixtures/java/corpus/Float.diffB-A.txt new file mode 100644 index 000000000..f7aedeafd --- /dev/null +++ b/test/fixtures/java/corpus/Float.diffB-A.txt @@ -0,0 +1,30 @@ +(Statements + (Class + (AccessibilityModifier) + (Identifier) + (Statements + (Method + (Void) + (Empty) + (Identifier) + (Statements + (Statements + (Assignment + (Variable + (Identifier) + (Identifier)) + (Float))) + {-(Statements + {-(Assignment + {-(Variable + {-(Identifier)-} + {-(Identifier)-})-} + {-(Float)-})-})-} + {-(Call + {-(MemberAccess + {-(MemberAccess + {-(Identifier)-})-})-} + {-(Plus + {-(Identifier)-} + {-(Identifier)-})-} + {-(Empty)-})-}))))) diff --git a/test/fixtures/java/corpus/Float.parseA.txt b/test/fixtures/java/corpus/Float.parseA.txt new file mode 100644 index 000000000..b01dd9c51 --- /dev/null +++ b/test/fixtures/java/corpus/Float.parseA.txt @@ -0,0 +1,16 @@ +(Statements + (Class + (AccessibilityModifier) + (Identifier) + (Statements + (Method + (Void) + (Empty) + (Identifier) + (Statements + (Statements + (Assignment + (Variable + (Identifier) + (Identifier)) + (Float)))))))) diff --git a/test/fixtures/java/corpus/Float.parseB.txt b/test/fixtures/java/corpus/Float.parseB.txt new file mode 100644 index 000000000..699bc4b79 --- /dev/null +++ b/test/fixtures/java/corpus/Float.parseB.txt @@ -0,0 +1,30 @@ +(Statements + (Class + (AccessibilityModifier) + (Identifier) + (Statements + (Method + (Void) + (Empty) + (Identifier) + (Statements + (Statements + (Assignment + (Variable + (Identifier) + (Identifier)) + (Float))) + (Statements + (Assignment + (Variable + (Identifier) + (Identifier)) + (Float))) + (Call + (MemberAccess + (MemberAccess + (Identifier))) + (Plus + (Identifier) + (Identifier)) + (Empty))))))) diff --git a/test/fixtures/java/corpus/for.java b/test/fixtures/java/corpus/For.A.java similarity index 100% rename from test/fixtures/java/corpus/for.java rename to test/fixtures/java/corpus/For.A.java diff --git a/test/fixtures/java/corpus/For.B.java b/test/fixtures/java/corpus/For.B.java new file mode 100644 index 000000000..0b27830a9 --- /dev/null +++ b/test/fixtures/java/corpus/For.B.java @@ -0,0 +1,7 @@ +class ForDemo { + public static void main(String[] args){ + for(int i: list){ + System.out.println("Count is: " + i); + } + } +} diff --git a/test/fixtures/java/corpus/For.diffA-B.txt b/test/fixtures/java/corpus/For.diffA-B.txt new file mode 100644 index 000000000..be2ad68a3 --- /dev/null +++ b/test/fixtures/java/corpus/For.diffA-B.txt @@ -0,0 +1,52 @@ +(Statements + (Class + (Identifier) + (Statements + (Method + (Void) + (AccessibilityModifier) + (AccessibilityModifier) + (Empty) + (Identifier) + (Annotation + (Identifier) + (Array + (Empty) + (Identifier))) + (Statements + {+(ForEach + {+(Variable + {+(Int)+} + {+(Identifier)+})+} + {+(Identifier)+} + {+(Statements + {+(Call + {+(MemberAccess + {+(MemberAccess + {+(Identifier)+})+})+} + {+(Plus + {+(TextElement)+} + {+(Identifier)+})+} + {+(Empty)+})+})+})+} + {-(For + {-(Statements + {-(Assignment + {-(Variable + {-(Int)-} + {-(Identifier)-})-} + {-(Integer)-})-})-} + {-(LessThan + {-(Identifier)-} + {-(Integer)-})-} + {-(Statements + {-(PostIncrement + {-(Identifier)-})-})-} + {-(Statements + {-(Call + {-(MemberAccess + {-(MemberAccess + {-(Identifier)-})-})-} + {-(Plus + {-(TextElement)-} + {-(Identifier)-})-} + {-(Empty)-})-})-})-}))))) diff --git a/test/fixtures/java/corpus/For.diffB-A.txt b/test/fixtures/java/corpus/For.diffB-A.txt new file mode 100644 index 000000000..60c6f5482 --- /dev/null +++ b/test/fixtures/java/corpus/For.diffB-A.txt @@ -0,0 +1,52 @@ +(Statements + (Class + (Identifier) + (Statements + (Method + (Void) + (AccessibilityModifier) + (AccessibilityModifier) + (Empty) + (Identifier) + (Annotation + (Identifier) + (Array + (Empty) + (Identifier))) + (Statements + {+(For + {+(Statements + {+(Assignment + {+(Variable + {+(Int)+} + {+(Identifier)+})+} + {+(Integer)+})+})+} + {+(LessThan + {+(Identifier)+} + {+(Integer)+})+} + {+(Statements + {+(PostIncrement + {+(Identifier)+})+})+} + {+(Statements + {+(Call + {+(MemberAccess + {+(MemberAccess + {+(Identifier)+})+})+} + {+(Plus + {+(TextElement)+} + {+(Identifier)+})+} + {+(Empty)+})+})+})+} + {-(ForEach + {-(Variable + {-(Int)-} + {-(Identifier)-})-} + {-(Identifier)-} + {-(Statements + {-(Call + {-(MemberAccess + {-(MemberAccess + {-(Identifier)-})-})-} + {-(Plus + {-(TextElement)-} + {-(Identifier)-})-} + {-(Empty)-})-})-})-}))))) diff --git a/test/fixtures/java/corpus/For.parseA.txt b/test/fixtures/java/corpus/For.parseA.txt new file mode 100644 index 000000000..08b7d2be8 --- /dev/null +++ b/test/fixtures/java/corpus/For.parseA.txt @@ -0,0 +1,38 @@ +(Statements + (Class + (Identifier) + (Statements + (Method + (Void) + (AccessibilityModifier) + (AccessibilityModifier) + (Empty) + (Identifier) + (Annotation + (Identifier) + (Array + (Empty) + (Identifier))) + (Statements + (For + (Statements + (Assignment + (Variable + (Int) + (Identifier)) + (Integer))) + (LessThan + (Identifier) + (Integer)) + (Statements + (PostIncrement + (Identifier))) + (Statements + (Call + (MemberAccess + (MemberAccess + (Identifier))) + (Plus + (TextElement) + (Identifier)) + (Empty))))))))) diff --git a/test/fixtures/java/corpus/For.parseB.txt b/test/fixtures/java/corpus/For.parseB.txt new file mode 100644 index 000000000..84d1c3cad --- /dev/null +++ b/test/fixtures/java/corpus/For.parseB.txt @@ -0,0 +1,30 @@ +(Statements + (Class + (Identifier) + (Statements + (Method + (Void) + (AccessibilityModifier) + (AccessibilityModifier) + (Empty) + (Identifier) + (Annotation + (Identifier) + (Array + (Empty) + (Identifier))) + (Statements + (ForEach + (Variable + (Int) + (Identifier)) + (Identifier) + (Statements + (Call + (MemberAccess + (MemberAccess + (Identifier))) + (Plus + (TextElement) + (Identifier)) + (Empty))))))))) diff --git a/test/fixtures/java/corpus/if.java b/test/fixtures/java/corpus/If.A.java similarity index 100% rename from test/fixtures/java/corpus/if.java rename to test/fixtures/java/corpus/If.A.java diff --git a/test/fixtures/java/corpus/If.B.java b/test/fixtures/java/corpus/If.B.java new file mode 100644 index 000000000..2780aef30 --- /dev/null +++ b/test/fixtures/java/corpus/If.B.java @@ -0,0 +1,2 @@ +if (x=1) + System.out.print(x); diff --git a/test/fixtures/java/corpus/If.diffA-B.txt b/test/fixtures/java/corpus/If.diffA-B.txt new file mode 100644 index 000000000..c2460839d --- /dev/null +++ b/test/fixtures/java/corpus/If.diffA-B.txt @@ -0,0 +1,14 @@ +(Statements + (If + { (Identifier) + ->(Assignment + {+(Identifier)+} + {+(Integer)+}) } + { (Identifier) + ->(Call + {+(MemberAccess + {+(MemberAccess + {+(Identifier)+})+})+} + {+(Identifier)+} + {+(Empty)+}) } + (Empty))) diff --git a/test/fixtures/java/corpus/If.diffB-A.txt b/test/fixtures/java/corpus/If.diffB-A.txt new file mode 100644 index 000000000..a7049e9ac --- /dev/null +++ b/test/fixtures/java/corpus/If.diffB-A.txt @@ -0,0 +1,14 @@ +(Statements + (If + { (Assignment + {-(Identifier)-} + {-(Integer)-}) + ->(Identifier) } + { (Call + {-(MemberAccess + {-(MemberAccess + {-(Identifier)-})-})-} + {-(Identifier)-} + {-(Empty)-}) + ->(Identifier) } + (Empty))) diff --git a/test/fixtures/java/corpus/If.parseA.txt b/test/fixtures/java/corpus/If.parseA.txt new file mode 100644 index 000000000..d41d0cd99 --- /dev/null +++ b/test/fixtures/java/corpus/If.parseA.txt @@ -0,0 +1,5 @@ +(Statements + (If + (Identifier) + (Identifier) + (Empty))) diff --git a/test/fixtures/java/corpus/If.parseB.txt b/test/fixtures/java/corpus/If.parseB.txt new file mode 100644 index 000000000..9d7c08886 --- /dev/null +++ b/test/fixtures/java/corpus/If.parseB.txt @@ -0,0 +1,12 @@ +(Statements + (If + (Assignment + (Identifier) + (Integer)) + (Call + (MemberAccess + (MemberAccess + (Identifier))) + (Identifier) + (Empty)) + (Empty))) diff --git a/test/fixtures/java/corpus/import.java b/test/fixtures/java/corpus/Import.A.java similarity index 100% rename from test/fixtures/java/corpus/import.java rename to test/fixtures/java/corpus/Import.A.java diff --git a/test/fixtures/java/corpus/Import.B.java b/test/fixtures/java/corpus/Import.B.java new file mode 100644 index 000000000..f97658dcc --- /dev/null +++ b/test/fixtures/java/corpus/Import.B.java @@ -0,0 +1 @@ +import java.until.*; diff --git a/test/fixtures/java/corpus/Import.diffA-B.txt b/test/fixtures/java/corpus/Import.diffA-B.txt new file mode 100644 index 000000000..ec99da96f --- /dev/null +++ b/test/fixtures/java/corpus/Import.diffA-B.txt @@ -0,0 +1,8 @@ +(Statements + (Import + {+(Identifier)+} + {+(Identifier)+} + {+(Asterisk)+} + {-(Identifier)-} + {-(Identifier)-} + {-(Identifier)-})) diff --git a/test/fixtures/java/corpus/Import.diffB-A.txt b/test/fixtures/java/corpus/Import.diffB-A.txt new file mode 100644 index 000000000..445ad9e1d --- /dev/null +++ b/test/fixtures/java/corpus/Import.diffB-A.txt @@ -0,0 +1,8 @@ +(Statements + (Import + {+(Identifier)+} + { (Identifier) + ->(Identifier) } + { (Identifier) + ->(Identifier) } + {-(Asterisk)-})) diff --git a/test/fixtures/java/corpus/Import.parseA.txt b/test/fixtures/java/corpus/Import.parseA.txt new file mode 100644 index 000000000..33094102e --- /dev/null +++ b/test/fixtures/java/corpus/Import.parseA.txt @@ -0,0 +1,5 @@ +(Statements + (Import + (Identifier) + (Identifier) + (Identifier))) diff --git a/test/fixtures/java/corpus/Import.parseB.txt b/test/fixtures/java/corpus/Import.parseB.txt new file mode 100644 index 000000000..479541d7b --- /dev/null +++ b/test/fixtures/java/corpus/Import.parseB.txt @@ -0,0 +1,5 @@ +(Statements + (Import + (Identifier) + (Identifier) + (Asterisk))) diff --git a/test/fixtures/java/corpus/int.java b/test/fixtures/java/corpus/Int.A.java similarity index 100% rename from test/fixtures/java/corpus/int.java rename to test/fixtures/java/corpus/Int.A.java diff --git a/test/fixtures/java/corpus/Int.B.java b/test/fixtures/java/corpus/Int.B.java new file mode 100644 index 000000000..b14745172 --- /dev/null +++ b/test/fixtures/java/corpus/Int.B.java @@ -0,0 +1,7 @@ +public class Point { + void dinosaur() { + Int A = 123; + Int B = 10; + System.out.print(A + B); + } +} diff --git a/test/fixtures/java/corpus/Int.diffA-B.txt b/test/fixtures/java/corpus/Int.diffA-B.txt new file mode 100644 index 000000000..0ee79cc4e --- /dev/null +++ b/test/fixtures/java/corpus/Int.diffA-B.txt @@ -0,0 +1,32 @@ +(Statements + (Class + (AccessibilityModifier) + (Identifier) + (Statements + (Method + (Void) + (Empty) + (Identifier) + (Statements + (Statements + (Assignment + (Variable + (Identifier) + { (Identifier) + ->(Identifier) }) + { (Integer) + ->(Integer) })) + {+(Statements + {+(Assignment + {+(Variable + {+(Identifier)+} + {+(Identifier)+})+} + {+(Integer)+})+})+} + {+(Call + {+(MemberAccess + {+(MemberAccess + {+(Identifier)+})+})+} + {+(Plus + {+(Identifier)+} + {+(Identifier)+})+} + {+(Empty)+})+}))))) diff --git a/test/fixtures/java/corpus/Int.diffB-A.txt b/test/fixtures/java/corpus/Int.diffB-A.txt new file mode 100644 index 000000000..d8e81e001 --- /dev/null +++ b/test/fixtures/java/corpus/Int.diffB-A.txt @@ -0,0 +1,32 @@ +(Statements + (Class + (AccessibilityModifier) + (Identifier) + (Statements + (Method + (Void) + (Empty) + (Identifier) + (Statements + (Statements + (Assignment + (Variable + (Identifier) + { (Identifier) + ->(Identifier) }) + { (Integer) + ->(Integer) })) + {-(Statements + {-(Assignment + {-(Variable + {-(Identifier)-} + {-(Identifier)-})-} + {-(Integer)-})-})-} + {-(Call + {-(MemberAccess + {-(MemberAccess + {-(Identifier)-})-})-} + {-(Plus + {-(Identifier)-} + {-(Identifier)-})-} + {-(Empty)-})-}))))) diff --git a/test/fixtures/java/corpus/Int.parseA.txt b/test/fixtures/java/corpus/Int.parseA.txt new file mode 100644 index 000000000..747de439b --- /dev/null +++ b/test/fixtures/java/corpus/Int.parseA.txt @@ -0,0 +1,16 @@ +(Statements + (Class + (AccessibilityModifier) + (Identifier) + (Statements + (Method + (Void) + (Empty) + (Identifier) + (Statements + (Statements + (Assignment + (Variable + (Identifier) + (Identifier)) + (Integer)))))))) diff --git a/test/fixtures/java/corpus/Int.parseB.txt b/test/fixtures/java/corpus/Int.parseB.txt new file mode 100644 index 000000000..c69c9c3ac --- /dev/null +++ b/test/fixtures/java/corpus/Int.parseB.txt @@ -0,0 +1,30 @@ +(Statements + (Class + (AccessibilityModifier) + (Identifier) + (Statements + (Method + (Void) + (Empty) + (Identifier) + (Statements + (Statements + (Assignment + (Variable + (Identifier) + (Identifier)) + (Integer))) + (Statements + (Assignment + (Variable + (Identifier) + (Identifier)) + (Integer))) + (Call + (MemberAccess + (MemberAccess + (Identifier))) + (Plus + (Identifier) + (Identifier)) + (Empty))))))) diff --git a/test/fixtures/java/corpus/Interface.A.java b/test/fixtures/java/corpus/Interface.A.java new file mode 100644 index 000000000..9a5b08aaa --- /dev/null +++ b/test/fixtures/java/corpus/Interface.A.java @@ -0,0 +1,3 @@ +interface Top { +} +// normal declaration diff --git a/test/fixtures/java/corpus/normalInterfaceDeclaration.java b/test/fixtures/java/corpus/Interface.B.java similarity index 61% rename from test/fixtures/java/corpus/normalInterfaceDeclaration.java rename to test/fixtures/java/corpus/Interface.B.java index a2410e1ad..6bd4d505b 100644 --- a/test/fixtures/java/corpus/normalInterfaceDeclaration.java +++ b/test/fixtures/java/corpus/Interface.B.java @@ -1,3 +1,4 @@ @interface TerminationHandle { Bar foo = 1; } +// annotation type declaration diff --git a/test/fixtures/java/corpus/Interface.diffA-B.txt b/test/fixtures/java/corpus/Interface.diffA-B.txt new file mode 100644 index 000000000..d4da8e08d --- /dev/null +++ b/test/fixtures/java/corpus/Interface.diffA-B.txt @@ -0,0 +1,15 @@ +(Statements + (InterfaceDeclaration + { (Identifier) + ->(Identifier) } + (Statements + {+(Statements + {+(Assignment + {+(Variable + {+(Identifier)+} + {+(Identifier)+})+} + {+(Integer)+})+})+})) + (Context + { (Comment) + ->(Comment) } + (Empty))) diff --git a/test/fixtures/java/corpus/Interface.diffB-A.txt b/test/fixtures/java/corpus/Interface.diffB-A.txt new file mode 100644 index 000000000..80437ff2a --- /dev/null +++ b/test/fixtures/java/corpus/Interface.diffB-A.txt @@ -0,0 +1,15 @@ +(Statements + (InterfaceDeclaration + { (Identifier) + ->(Identifier) } + (Statements + {-(Statements + {-(Assignment + {-(Variable + {-(Identifier)-} + {-(Identifier)-})-} + {-(Integer)-})-})-})) + (Context + { (Comment) + ->(Comment) } + (Empty))) diff --git a/test/fixtures/java/corpus/Interface.parseA.txt b/test/fixtures/java/corpus/Interface.parseA.txt new file mode 100644 index 000000000..c1b995b7f --- /dev/null +++ b/test/fixtures/java/corpus/Interface.parseA.txt @@ -0,0 +1,7 @@ +(Statements + (InterfaceDeclaration + (Identifier) + (Statements)) + (Context + (Comment) + (Empty))) diff --git a/test/fixtures/java/corpus/Interface.parseB.txt b/test/fixtures/java/corpus/Interface.parseB.txt new file mode 100644 index 000000000..710ff6be0 --- /dev/null +++ b/test/fixtures/java/corpus/Interface.parseB.txt @@ -0,0 +1,13 @@ +(Statements + (InterfaceDeclaration + (Identifier) + (Statements + (Statements + (Assignment + (Variable + (Identifier) + (Identifier)) + (Integer))))) + (Context + (Comment) + (Empty))) diff --git a/test/fixtures/java/corpus/lambda.java b/test/fixtures/java/corpus/Lambda.A.java similarity index 100% rename from test/fixtures/java/corpus/lambda.java rename to test/fixtures/java/corpus/Lambda.A.java diff --git a/test/fixtures/java/corpus/Lambda.B.java b/test/fixtures/java/corpus/Lambda.B.java new file mode 100644 index 000000000..ac7696f67 --- /dev/null +++ b/test/fixtures/java/corpus/Lambda.B.java @@ -0,0 +1,5 @@ +class LambdaTest { + void singleton() { + stateOwner.add(x -> System.out.println("State changed")); + } +} diff --git a/test/fixtures/java/corpus/Lambda.diffA-B.txt b/test/fixtures/java/corpus/Lambda.diffA-B.txt new file mode 100644 index 000000000..b649a9532 --- /dev/null +++ b/test/fixtures/java/corpus/Lambda.diffA-B.txt @@ -0,0 +1,26 @@ +(Statements + (Class + (Identifier) + (Statements + (Method + (Void) + (Empty) + (Identifier) + (Statements + {+(Call + {+(MemberAccess + {+(Identifier)+})+} + {+(Lambda + {+(Identifier)+} + {+(LambdaBody + {+(Call + {+(MemberAccess + {+(MemberAccess + {+(Identifier)+})+})+} + {+(TextElement)+} + {+(Empty)+})+})+})+} + {+(Empty)+})+} + {-(Lambda + {-(Identifier)-} + {-(LambdaBody + {-(Identifier)-})-})-}))))) diff --git a/test/fixtures/java/corpus/Lambda.diffB-A.txt b/test/fixtures/java/corpus/Lambda.diffB-A.txt new file mode 100644 index 000000000..001ac87d5 --- /dev/null +++ b/test/fixtures/java/corpus/Lambda.diffB-A.txt @@ -0,0 +1,26 @@ +(Statements + (Class + (Identifier) + (Statements + (Method + (Void) + (Empty) + (Identifier) + (Statements + {+(Lambda + {+(Identifier)+} + {+(LambdaBody + {+(Identifier)+})+})+} + {-(Call + {-(MemberAccess + {-(Identifier)-})-} + {-(Lambda + {-(Identifier)-} + {-(LambdaBody + {-(Call + {-(MemberAccess + {-(MemberAccess + {-(Identifier)-})-})-} + {-(TextElement)-} + {-(Empty)-})-})-})-} + {-(Empty)-})-}))))) diff --git a/test/fixtures/java/corpus/Lambda.parseA.txt b/test/fixtures/java/corpus/Lambda.parseA.txt new file mode 100644 index 000000000..8c577d9bf --- /dev/null +++ b/test/fixtures/java/corpus/Lambda.parseA.txt @@ -0,0 +1,13 @@ +(Statements + (Class + (Identifier) + (Statements + (Method + (Void) + (Empty) + (Identifier) + (Statements + (Lambda + (Identifier) + (LambdaBody + (Identifier)))))))) diff --git a/test/fixtures/java/corpus/Lambda.parseB.txt b/test/fixtures/java/corpus/Lambda.parseB.txt new file mode 100644 index 000000000..09abfb3ee --- /dev/null +++ b/test/fixtures/java/corpus/Lambda.parseB.txt @@ -0,0 +1,22 @@ +(Statements + (Class + (Identifier) + (Statements + (Method + (Void) + (Empty) + (Identifier) + (Statements + (Call + (MemberAccess + (Identifier)) + (Lambda + (Identifier) + (LambdaBody + (Call + (MemberAccess + (MemberAccess + (Identifier))) + (TextElement) + (Empty)))) + (Empty))))))) diff --git a/test/fixtures/java/corpus/member-access.java b/test/fixtures/java/corpus/ScopedIdentifier.A.java similarity index 100% rename from test/fixtures/java/corpus/member-access.java rename to test/fixtures/java/corpus/ScopedIdentifier.A.java diff --git a/test/fixtures/java/corpus/scoped-identifier.java b/test/fixtures/java/corpus/ScopedIdentifier.B.java similarity index 100% rename from test/fixtures/java/corpus/scoped-identifier.java rename to test/fixtures/java/corpus/ScopedIdentifier.B.java diff --git a/test/fixtures/java/corpus/ScopedIdentifier.diffA-B.txt b/test/fixtures/java/corpus/ScopedIdentifier.diffA-B.txt new file mode 100644 index 000000000..fc71e0764 --- /dev/null +++ b/test/fixtures/java/corpus/ScopedIdentifier.diffA-B.txt @@ -0,0 +1,25 @@ +(Statements + (Class + {+(AccessibilityModifier)+} + {+(AccessibilityModifier)+} + { (Identifier) + ->(Identifier) } + {+(MemberAccess + {+(Identifier)+})+} + (Statements + {-(Method + {-(Int)-} + {-(Empty)-} + {-(Identifier)-} + {-(Annotation + {-(Identifier)-} + {-(Identifier)-})-} + {-(Annotation + {-(Identifier)-} + {-(Identifier)-})-} + {-(Statements + {-(Call + {-(MemberAccess + {-(Identifier)-})-} + {-(Identifier)-} + {-(Empty)-})-})-})-}))) diff --git a/test/fixtures/java/corpus/ScopedIdentifier.diffB-A.txt b/test/fixtures/java/corpus/ScopedIdentifier.diffB-A.txt new file mode 100644 index 000000000..6bca7c547 --- /dev/null +++ b/test/fixtures/java/corpus/ScopedIdentifier.diffB-A.txt @@ -0,0 +1,25 @@ +(Statements + (Class + {-(AccessibilityModifier)-} + {-(AccessibilityModifier)-} + { (Identifier) + ->(Identifier) } + {-(MemberAccess + {-(Identifier)-})-} + (Statements + {+(Method + {+(Int)+} + {+(Empty)+} + {+(Identifier)+} + {+(Annotation + {+(Identifier)+} + {+(Identifier)+})+} + {+(Annotation + {+(Identifier)+} + {+(Identifier)+})+} + {+(Statements + {+(Call + {+(MemberAccess + {+(Identifier)+})+} + {+(Identifier)+} + {+(Empty)+})+})+})+}))) diff --git a/test/fixtures/java/corpus/ScopedIdentifier.parseA.txt b/test/fixtures/java/corpus/ScopedIdentifier.parseA.txt new file mode 100644 index 000000000..f989d25ae --- /dev/null +++ b/test/fixtures/java/corpus/ScopedIdentifier.parseA.txt @@ -0,0 +1,20 @@ +(Statements + (Class + (Identifier) + (Statements + (Method + (Int) + (Empty) + (Identifier) + (Annotation + (Identifier) + (Identifier)) + (Annotation + (Identifier) + (Identifier)) + (Statements + (Call + (MemberAccess + (Identifier)) + (Identifier) + (Empty))))))) diff --git a/test/fixtures/java/corpus/ScopedIdentifier.parseB.txt b/test/fixtures/java/corpus/ScopedIdentifier.parseB.txt new file mode 100644 index 000000000..698533d69 --- /dev/null +++ b/test/fixtures/java/corpus/ScopedIdentifier.parseB.txt @@ -0,0 +1,8 @@ +(Statements + (Class + (AccessibilityModifier) + (AccessibilityModifier) + (Identifier) + (MemberAccess + (Identifier)) + (Statements))) diff --git a/test/fixtures/java/corpus/spread-parameter.java b/test/fixtures/java/corpus/SpreadParameter.A.java similarity index 100% rename from test/fixtures/java/corpus/spread-parameter.java rename to test/fixtures/java/corpus/SpreadParameter.A.java diff --git a/test/fixtures/java/corpus/SpreadParameter.B.java b/test/fixtures/java/corpus/SpreadParameter.B.java new file mode 100644 index 000000000..ae7df4dde --- /dev/null +++ b/test/fixtures/java/corpus/SpreadParameter.B.java @@ -0,0 +1,4 @@ +class Dinosaur { + Disposable(int ...resources) { + } +} diff --git a/test/fixtures/java/corpus/SpreadParameter.diffA-B.txt b/test/fixtures/java/corpus/SpreadParameter.diffA-B.txt new file mode 100644 index 000000000..7b72fd9aa --- /dev/null +++ b/test/fixtures/java/corpus/SpreadParameter.diffA-B.txt @@ -0,0 +1,12 @@ +(Statements + (Class + (Identifier) + (Statements + (Constructor + (Identifier) + (SpreadParameter + (Variable + { (Identifier) + ->(Int) } + (Identifier))) + (Statements))))) diff --git a/test/fixtures/java/corpus/SpreadParameter.diffB-A.txt b/test/fixtures/java/corpus/SpreadParameter.diffB-A.txt new file mode 100644 index 000000000..31c04ebeb --- /dev/null +++ b/test/fixtures/java/corpus/SpreadParameter.diffB-A.txt @@ -0,0 +1,12 @@ +(Statements + (Class + (Identifier) + (Statements + (Constructor + (Identifier) + (SpreadParameter + (Variable + { (Int) + ->(Identifier) } + (Identifier))) + (Statements))))) diff --git a/test/fixtures/java/corpus/SpreadParameter.parseA.txt b/test/fixtures/java/corpus/SpreadParameter.parseA.txt new file mode 100644 index 000000000..95f78c7fa --- /dev/null +++ b/test/fixtures/java/corpus/SpreadParameter.parseA.txt @@ -0,0 +1,11 @@ +(Statements + (Class + (Identifier) + (Statements + (Constructor + (Identifier) + (SpreadParameter + (Variable + (Identifier) + (Identifier))) + (Statements))))) diff --git a/test/fixtures/java/corpus/SpreadParameter.parseB.txt b/test/fixtures/java/corpus/SpreadParameter.parseB.txt new file mode 100644 index 000000000..9045d9bc4 --- /dev/null +++ b/test/fixtures/java/corpus/SpreadParameter.parseB.txt @@ -0,0 +1,11 @@ +(Statements + (Class + (Identifier) + (Statements + (Constructor + (Identifier) + (SpreadParameter + (Variable + (Int) + (Identifier))) + (Statements))))) diff --git a/test/fixtures/java/corpus/string.java b/test/fixtures/java/corpus/String.A.java similarity index 100% rename from test/fixtures/java/corpus/string.java rename to test/fixtures/java/corpus/String.A.java diff --git a/test/fixtures/java/corpus/String.B.java b/test/fixtures/java/corpus/String.B.java new file mode 100644 index 000000000..d38c7b491 --- /dev/null +++ b/test/fixtures/java/corpus/String.B.java @@ -0,0 +1,5 @@ +public class Point { + void dinosaur() { + String gfg3 = String.format("%07d", num); + } +} diff --git a/test/fixtures/java/corpus/String.diffA-B.txt b/test/fixtures/java/corpus/String.diffA-B.txt new file mode 100644 index 000000000..679800ba1 --- /dev/null +++ b/test/fixtures/java/corpus/String.diffA-B.txt @@ -0,0 +1,23 @@ +(Statements + (Class + (AccessibilityModifier) + (Identifier) + (Statements + (Method + (Void) + (Empty) + (Identifier) + (Statements + (Statements + (Assignment + (Variable + (Identifier) + { (Identifier) + ->(Identifier) }) + { (TextElement) + ->(Call + {+(MemberAccess + {+(Identifier)+})+} + {+(TextElement)+} + {+(Identifier)+} + {+(Empty)+}) }))))))) diff --git a/test/fixtures/java/corpus/String.diffB-A.txt b/test/fixtures/java/corpus/String.diffB-A.txt new file mode 100644 index 000000000..c17057d4d --- /dev/null +++ b/test/fixtures/java/corpus/String.diffB-A.txt @@ -0,0 +1,23 @@ +(Statements + (Class + (AccessibilityModifier) + (Identifier) + (Statements + (Method + (Void) + (Empty) + (Identifier) + (Statements + (Statements + (Assignment + (Variable + (Identifier) + { (Identifier) + ->(Identifier) }) + { (Call + {-(MemberAccess + {-(Identifier)-})-} + {-(TextElement)-} + {-(Identifier)-} + {-(Empty)-}) + ->(TextElement) }))))))) diff --git a/test/fixtures/java/corpus/String.parseA.txt b/test/fixtures/java/corpus/String.parseA.txt new file mode 100644 index 000000000..c3291a125 --- /dev/null +++ b/test/fixtures/java/corpus/String.parseA.txt @@ -0,0 +1,16 @@ +(Statements + (Class + (AccessibilityModifier) + (Identifier) + (Statements + (Method + (Void) + (Empty) + (Identifier) + (Statements + (Statements + (Assignment + (Variable + (Identifier) + (Identifier)) + (TextElement)))))))) diff --git a/test/fixtures/java/corpus/String.parseB.txt b/test/fixtures/java/corpus/String.parseB.txt new file mode 100644 index 000000000..7179344c6 --- /dev/null +++ b/test/fixtures/java/corpus/String.parseB.txt @@ -0,0 +1,21 @@ +(Statements + (Class + (AccessibilityModifier) + (Identifier) + (Statements + (Method + (Void) + (Empty) + (Identifier) + (Statements + (Statements + (Assignment + (Variable + (Identifier) + (Identifier)) + (Call + (MemberAccess + (Identifier)) + (TextElement) + (Identifier) + (Empty))))))))) diff --git a/test/fixtures/java/corpus/switch.java b/test/fixtures/java/corpus/Switch.A.java similarity index 100% rename from test/fixtures/java/corpus/switch.java rename to test/fixtures/java/corpus/Switch.A.java diff --git a/test/fixtures/java/corpus/Switch.B.java b/test/fixtures/java/corpus/Switch.B.java new file mode 100644 index 000000000..bc8229b78 --- /dev/null +++ b/test/fixtures/java/corpus/Switch.B.java @@ -0,0 +1,17 @@ +public class Test +{ + public static void main(String[] args) + { + int day = 5; + int cupcakes = 2; + + switch (day) + { + case 1: cupcakes = 1; + break; + default: cupcakes = 2; + break; + } + System.out.println(dayString); + } +} diff --git a/test/fixtures/java/corpus/Switch.diffA-B.txt b/test/fixtures/java/corpus/Switch.diffA-B.txt new file mode 100644 index 000000000..52a3ce422 --- /dev/null +++ b/test/fixtures/java/corpus/Switch.diffA-B.txt @@ -0,0 +1,115 @@ +(Statements + (Class + (AccessibilityModifier) + (Identifier) + (Statements + (Method + (Void) + (AccessibilityModifier) + (AccessibilityModifier) + (Empty) + (Identifier) + (Annotation + (Identifier) + (Array + (Empty) + (Identifier))) + (Statements + (Statements + (Assignment + (Variable + (Int) + (Identifier)) + (Integer))) + (Statements + {+(Assignment + {+(Variable + {+(Int)+} + {+(Identifier)+})+} + {+(Integer)+})+} + {-(Variable + {-(Identifier)-} + {-(Identifier)-})-}) + (Match + (Identifier) + (Statements + (Pattern + (Integer) + (Statements + (Assignment + { (Identifier) + ->(Identifier) } + { (TextElement) + ->(Integer) }) + (Break + (Empty)))) + {+(Pattern + {+(Empty)+} + {+(Statements + {+(Assignment + {+(Identifier)+} + {+(Integer)+})+} + {+(Break + {+(Empty)+})+})+})+} + {-(Pattern + {-(Integer)-} + {-(Statements + {-(Assignment + {-(Identifier)-} + {-(TextElement)-})-} + {-(Break + {-(Empty)-})-})-})-} + {-(Pattern + {-(Integer)-} + {-(Statements + {-(Assignment + {-(Identifier)-} + {-(TextElement)-})-} + {-(Break + {-(Empty)-})-})-})-} + {-(Pattern + {-(Integer)-} + {-(Statements + {-(Assignment + {-(Identifier)-} + {-(TextElement)-})-} + {-(Break + {-(Empty)-})-})-})-} + {-(Pattern + {-(Integer)-} + {-(Statements + {-(Assignment + {-(Identifier)-} + {-(TextElement)-})-} + {-(Break + {-(Empty)-})-})-})-} + {-(Pattern + {-(Integer)-} + {-(Statements + {-(Assignment + {-(Identifier)-} + {-(TextElement)-})-} + {-(Break + {-(Empty)-})-})-})-} + {-(Pattern + {-(Integer)-} + {-(Statements + {-(Assignment + {-(Identifier)-} + {-(TextElement)-})-} + {-(Break + {-(Empty)-})-})-})-} + {-(Pattern + {-(Empty)-} + {-(Statements + {-(Assignment + {-(Identifier)-} + {-(TextElement)-})-} + {-(Break + {-(Empty)-})-})-})-})) + (Call + (MemberAccess + (MemberAccess + (Identifier))) + (Identifier) + (Empty))))))) diff --git a/test/fixtures/java/corpus/Switch.diffB-A.txt b/test/fixtures/java/corpus/Switch.diffB-A.txt new file mode 100644 index 000000000..2d3546fad --- /dev/null +++ b/test/fixtures/java/corpus/Switch.diffB-A.txt @@ -0,0 +1,110 @@ +(Statements + (Class + (AccessibilityModifier) + (Identifier) + (Statements + (Method + (Void) + (AccessibilityModifier) + (AccessibilityModifier) + (Empty) + (Identifier) + (Annotation + (Identifier) + (Array + (Empty) + (Identifier))) + (Statements + (Statements + (Assignment + (Variable + (Int) + (Identifier)) + (Integer))) + (Statements + {+(Variable + {+(Identifier)+} + {+(Identifier)+})+} + {-(Assignment + {-(Variable + {-(Int)-} + {-(Identifier)-})-} + {-(Integer)-})-}) + (Match + (Identifier) + (Statements + (Pattern + (Integer) + (Statements + (Assignment + { (Identifier) + ->(Identifier) } + { (Integer) + ->(TextElement) }) + (Break + (Empty)))) + {+(Pattern + {+(Integer)+} + {+(Statements + {+(Assignment + {+(Identifier)+} + {+(TextElement)+})+} + {+(Break + {+(Empty)+})+})+})+} + (Pattern + { (Empty) + ->(Integer) } + (Statements + (Assignment + { (Identifier) + ->(Identifier) } + { (Integer) + ->(TextElement) }) + (Break + (Empty)))) + {+(Pattern + {+(Integer)+} + {+(Statements + {+(Assignment + {+(Identifier)+} + {+(TextElement)+})+} + {+(Break + {+(Empty)+})+})+})+} + {+(Pattern + {+(Integer)+} + {+(Statements + {+(Assignment + {+(Identifier)+} + {+(TextElement)+})+} + {+(Break + {+(Empty)+})+})+})+} + {+(Pattern + {+(Integer)+} + {+(Statements + {+(Assignment + {+(Identifier)+} + {+(TextElement)+})+} + {+(Break + {+(Empty)+})+})+})+} + {+(Pattern + {+(Integer)+} + {+(Statements + {+(Assignment + {+(Identifier)+} + {+(TextElement)+})+} + {+(Break + {+(Empty)+})+})+})+} + {+(Pattern + {+(Empty)+} + {+(Statements + {+(Assignment + {+(Identifier)+} + {+(TextElement)+})+} + {+(Break + {+(Empty)+})+})+})+})) + (Call + (MemberAccess + (MemberAccess + (Identifier))) + (Identifier) + (Empty))))))) diff --git a/test/fixtures/java/corpus/Switch.parseA.txt b/test/fixtures/java/corpus/Switch.parseA.txt new file mode 100644 index 000000000..4630c3a96 --- /dev/null +++ b/test/fixtures/java/corpus/Switch.parseA.txt @@ -0,0 +1,100 @@ +(Statements + (Class + (AccessibilityModifier) + (Identifier) + (Statements + (Method + (Void) + (AccessibilityModifier) + (AccessibilityModifier) + (Empty) + (Identifier) + (Annotation + (Identifier) + (Array + (Empty) + (Identifier))) + (Statements + (Statements + (Assignment + (Variable + (Int) + (Identifier)) + (Integer))) + (Statements + (Variable + (Identifier) + (Identifier))) + (Match + (Identifier) + (Statements + (Pattern + (Integer) + (Statements + (Assignment + (Identifier) + (TextElement)) + (Break + (Empty)))) + (Pattern + (Integer) + (Statements + (Assignment + (Identifier) + (TextElement)) + (Break + (Empty)))) + (Pattern + (Integer) + (Statements + (Assignment + (Identifier) + (TextElement)) + (Break + (Empty)))) + (Pattern + (Integer) + (Statements + (Assignment + (Identifier) + (TextElement)) + (Break + (Empty)))) + (Pattern + (Integer) + (Statements + (Assignment + (Identifier) + (TextElement)) + (Break + (Empty)))) + (Pattern + (Integer) + (Statements + (Assignment + (Identifier) + (TextElement)) + (Break + (Empty)))) + (Pattern + (Integer) + (Statements + (Assignment + (Identifier) + (TextElement)) + (Break + (Empty)))) + (Pattern + (Empty) + (Statements + (Assignment + (Identifier) + (TextElement)) + (Break + (Empty)))))) + (Call + (MemberAccess + (MemberAccess + (Identifier))) + (Identifier) + (Empty))))))) diff --git a/test/fixtures/java/corpus/Switch.parseB.txt b/test/fixtures/java/corpus/Switch.parseB.txt new file mode 100644 index 000000000..088acf0d1 --- /dev/null +++ b/test/fixtures/java/corpus/Switch.parseB.txt @@ -0,0 +1,54 @@ +(Statements + (Class + (AccessibilityModifier) + (Identifier) + (Statements + (Method + (Void) + (AccessibilityModifier) + (AccessibilityModifier) + (Empty) + (Identifier) + (Annotation + (Identifier) + (Array + (Empty) + (Identifier))) + (Statements + (Statements + (Assignment + (Variable + (Int) + (Identifier)) + (Integer))) + (Statements + (Assignment + (Variable + (Int) + (Identifier)) + (Integer))) + (Match + (Identifier) + (Statements + (Pattern + (Integer) + (Statements + (Assignment + (Identifier) + (Integer)) + (Break + (Empty)))) + (Pattern + (Empty) + (Statements + (Assignment + (Identifier) + (Integer)) + (Break + (Empty)))))) + (Call + (MemberAccess + (MemberAccess + (Identifier))) + (Identifier) + (Empty))))))) diff --git a/test/fixtures/java/corpus/Throws.A.java b/test/fixtures/java/corpus/Throws.A.java new file mode 100644 index 000000000..90ec69066 --- /dev/null +++ b/test/fixtures/java/corpus/Throws.A.java @@ -0,0 +1,8 @@ +class Beyonce { + void x() { + BufferedReader newReader() throws FileNotFoundException { + new BufferedReader(new InputStreamReader(new FileInputStream(file), charset)); + } + } +} +// this doesn't work diff --git a/test/fixtures/java/corpus/throws.java b/test/fixtures/java/corpus/Throws.B.java similarity index 88% rename from test/fixtures/java/corpus/throws.java rename to test/fixtures/java/corpus/Throws.B.java index 09c46ce9f..af6d79f40 100644 --- a/test/fixtures/java/corpus/throws.java +++ b/test/fixtures/java/corpus/Throws.B.java @@ -3,3 +3,4 @@ class Beyonce { new BufferedReader(new InputStreamReader(new FileInputStream(file), charset)); } } +// this doesn't work diff --git a/test/fixtures/java/corpus/try-catches.java b/test/fixtures/java/corpus/TryCatches.A.java similarity index 100% rename from test/fixtures/java/corpus/try-catches.java rename to test/fixtures/java/corpus/TryCatches.A.java diff --git a/test/fixtures/java/corpus/TryCatches.B.java b/test/fixtures/java/corpus/TryCatches.B.java new file mode 100644 index 000000000..38c6a7110 --- /dev/null +++ b/test/fixtures/java/corpus/TryCatches.B.java @@ -0,0 +1,8 @@ +class Example2{ + public static void main(String args[]){ + try{ + int data = 50; + } catch (ArithmeticException e){System.out.println(e);} + System.out.println("rest of the code..."); +} +} diff --git a/test/fixtures/java/corpus/tryWithResourcesStatement.java b/test/fixtures/java/corpus/TryWithResourcesStatement.A.java similarity index 100% rename from test/fixtures/java/corpus/tryWithResourcesStatement.java rename to test/fixtures/java/corpus/TryWithResourcesStatement.A.java diff --git a/test/fixtures/java/corpus/TryWithResourcesStatement.B.java b/test/fixtures/java/corpus/TryWithResourcesStatement.B.java new file mode 100644 index 000000000..a414a972f --- /dev/null +++ b/test/fixtures/java/corpus/TryWithResourcesStatement.B.java @@ -0,0 +1,6 @@ +class Dino { + void hi() { + try (int analyzer = 123){ + } + } +} diff --git a/test/fixtures/java/corpus/TryWithResourcesStatement.diffA-B.txt b/test/fixtures/java/corpus/TryWithResourcesStatement.diffA-B.txt new file mode 100644 index 000000000..c194b01f9 --- /dev/null +++ b/test/fixtures/java/corpus/TryWithResourcesStatement.diffA-B.txt @@ -0,0 +1,19 @@ +(Statements + (Class + (Identifier) + (Statements + (Method + (Void) + (Empty) + (Identifier) + (Statements + (TryWithResources + (Assignment + (Variable + { (Identifier) + ->(Int) } + (Identifier)) + { (New + {-(Identifier)-}) + ->(Integer) }) + (Statements))))))) diff --git a/test/fixtures/java/corpus/TryWithResourcesStatement.diffB-A.txt b/test/fixtures/java/corpus/TryWithResourcesStatement.diffB-A.txt new file mode 100644 index 000000000..e51fd3a73 --- /dev/null +++ b/test/fixtures/java/corpus/TryWithResourcesStatement.diffB-A.txt @@ -0,0 +1,19 @@ +(Statements + (Class + (Identifier) + (Statements + (Method + (Void) + (Empty) + (Identifier) + (Statements + (TryWithResources + (Assignment + (Variable + { (Int) + ->(Identifier) } + (Identifier)) + { (Integer) + ->(New + {+(Identifier)+}) }) + (Statements))))))) diff --git a/test/fixtures/java/corpus/TryWithResourcesStatement.parseA.txt b/test/fixtures/java/corpus/TryWithResourcesStatement.parseA.txt new file mode 100644 index 000000000..13d776693 --- /dev/null +++ b/test/fixtures/java/corpus/TryWithResourcesStatement.parseA.txt @@ -0,0 +1,17 @@ +(Statements + (Class + (Identifier) + (Statements + (Method + (Void) + (Empty) + (Identifier) + (Statements + (TryWithResources + (Assignment + (Variable + (Identifier) + (Identifier)) + (New + (Identifier))) + (Statements))))))) diff --git a/test/fixtures/java/corpus/TryWithResourcesStatement.parseB.txt b/test/fixtures/java/corpus/TryWithResourcesStatement.parseB.txt new file mode 100644 index 000000000..48e424f72 --- /dev/null +++ b/test/fixtures/java/corpus/TryWithResourcesStatement.parseB.txt @@ -0,0 +1,16 @@ +(Statements + (Class + (Identifier) + (Statements + (Method + (Void) + (Empty) + (Identifier) + (Statements + (TryWithResources + (Assignment + (Variable + (Int) + (Identifier)) + (Integer)) + (Statements))))))) diff --git a/test/fixtures/java/corpus/TypeArgument.A.java b/test/fixtures/java/corpus/TypeArgument.A.java new file mode 100644 index 000000000..bd3dc56fc --- /dev/null +++ b/test/fixtures/java/corpus/TypeArgument.A.java @@ -0,0 +1,5 @@ +class Test { + void printCollection(Collection c) { + // a wildcard collection + } + } diff --git a/test/fixtures/java/corpus/TypeArgument.B.java b/test/fixtures/java/corpus/TypeArgument.B.java new file mode 100644 index 000000000..c03794d44 --- /dev/null +++ b/test/fixtures/java/corpus/TypeArgument.B.java @@ -0,0 +1,8 @@ +class Test { + static void printCollection(Collection c) { + // a wildcard collection + for (Object o : c) { + System.out.println(o); + } + } + } diff --git a/test/fixtures/java/corpus/TypeArgument.diffA-B.txt b/test/fixtures/java/corpus/TypeArgument.diffA-B.txt new file mode 100644 index 000000000..325a3e3cd --- /dev/null +++ b/test/fixtures/java/corpus/TypeArgument.diffA-B.txt @@ -0,0 +1,31 @@ +(Statements + (Class + (Identifier) + (Statements + (Method + (Void) + {+(AccessibilityModifier)+} + (Empty) + (Identifier) + (Annotation + (Identifier) + (GenericType + (Identifier) + {+(Wildcard)+} + {-(Identifier)-})) + (Statements + (Context + (Comment) + { (Empty) + ->(ForEach + {+(Variable + {+(Identifier)+} + {+(Identifier)+})+} + {+(Identifier)+} + {+(Statements + {+(Call + {+(MemberAccess + {+(MemberAccess + {+(Identifier)+})+})+} + {+(Identifier)+} + {+(Empty)+})+})+}) })))))) diff --git a/test/fixtures/java/corpus/TypeArgument.diffB-A.txt b/test/fixtures/java/corpus/TypeArgument.diffB-A.txt new file mode 100644 index 000000000..8b6a6046f --- /dev/null +++ b/test/fixtures/java/corpus/TypeArgument.diffB-A.txt @@ -0,0 +1,31 @@ +(Statements + (Class + (Identifier) + (Statements + (Method + (Void) + {-(AccessibilityModifier)-} + (Empty) + (Identifier) + (Annotation + (Identifier) + (GenericType + (Identifier) + {+(Identifier)+} + {-(Wildcard)-})) + (Statements + (Context + (Comment) + { (ForEach + {-(Variable + {-(Identifier)-} + {-(Identifier)-})-} + {-(Identifier)-} + {-(Statements + {-(Call + {-(MemberAccess + {-(MemberAccess + {-(Identifier)-})-})-} + {-(Identifier)-} + {-(Empty)-})-})-}) + ->(Empty) })))))) diff --git a/test/fixtures/java/corpus/TypeArgument.parseA.txt b/test/fixtures/java/corpus/TypeArgument.parseA.txt new file mode 100644 index 000000000..1a3a41a18 --- /dev/null +++ b/test/fixtures/java/corpus/TypeArgument.parseA.txt @@ -0,0 +1,17 @@ +(Statements + (Class + (Identifier) + (Statements + (Method + (Void) + (Empty) + (Identifier) + (Annotation + (Identifier) + (GenericType + (Identifier) + (Identifier))) + (Statements + (Context + (Comment) + (Empty))))))) diff --git a/test/fixtures/java/corpus/TypeArgument.parseB.txt b/test/fixtures/java/corpus/TypeArgument.parseB.txt new file mode 100644 index 000000000..e7d4324c1 --- /dev/null +++ b/test/fixtures/java/corpus/TypeArgument.parseB.txt @@ -0,0 +1,29 @@ +(Statements + (Class + (Identifier) + (Statements + (Method + (Void) + (AccessibilityModifier) + (Empty) + (Identifier) + (Annotation + (Identifier) + (GenericType + (Identifier) + (Wildcard))) + (Statements + (Context + (Comment) + (ForEach + (Variable + (Identifier) + (Identifier)) + (Identifier) + (Statements + (Call + (MemberAccess + (MemberAccess + (Identifier))) + (Identifier) + (Empty)))))))))) diff --git a/test/fixtures/java/corpus/update.java b/test/fixtures/java/corpus/Update.A.java similarity index 50% rename from test/fixtures/java/corpus/update.java rename to test/fixtures/java/corpus/Update.A.java index 9d356b0b2..ca75c9e21 100644 --- a/test/fixtures/java/corpus/update.java +++ b/test/fixtures/java/corpus/Update.A.java @@ -1,4 +1,2 @@ foo++; ++bar; -baz--; ---boo; diff --git a/test/fixtures/java/corpus/Update.B.java b/test/fixtures/java/corpus/Update.B.java new file mode 100644 index 000000000..22bd7ba17 --- /dev/null +++ b/test/fixtures/java/corpus/Update.B.java @@ -0,0 +1,2 @@ +baz--; +--boo; diff --git a/test/fixtures/java/corpus/Update.diffA-B.txt b/test/fixtures/java/corpus/Update.diffA-B.txt new file mode 100644 index 000000000..122fe1fbe --- /dev/null +++ b/test/fixtures/java/corpus/Update.diffA-B.txt @@ -0,0 +1,9 @@ +(Statements +{+(PostDecrement + {+(Identifier)+})+} +{+(PreDecrement + {+(Identifier)+})+} +{-(PostIncrement + {-(Identifier)-})-} +{-(PreIncrement + {-(Identifier)-})-}) diff --git a/test/fixtures/java/corpus/Update.diffB-A.txt b/test/fixtures/java/corpus/Update.diffB-A.txt new file mode 100644 index 000000000..4778efdb7 --- /dev/null +++ b/test/fixtures/java/corpus/Update.diffB-A.txt @@ -0,0 +1,9 @@ +(Statements +{+(PostIncrement + {+(Identifier)+})+} +{+(PreIncrement + {+(Identifier)+})+} +{-(PostDecrement + {-(Identifier)-})-} +{-(PreDecrement + {-(Identifier)-})-}) diff --git a/test/fixtures/java/corpus/Update.parseA.txt b/test/fixtures/java/corpus/Update.parseA.txt new file mode 100644 index 000000000..08a425850 --- /dev/null +++ b/test/fixtures/java/corpus/Update.parseA.txt @@ -0,0 +1,5 @@ +(Statements + (PostIncrement + (Identifier)) + (PreIncrement + (Identifier))) diff --git a/test/fixtures/java/corpus/Update.parseB.txt b/test/fixtures/java/corpus/Update.parseB.txt new file mode 100644 index 000000000..14822adbd --- /dev/null +++ b/test/fixtures/java/corpus/Update.parseB.txt @@ -0,0 +1,5 @@ +(Statements + (PostDecrement + (Identifier)) + (PreDecrement + (Identifier))) diff --git a/test/fixtures/java/corpus/VariableDeclaration.A.java b/test/fixtures/java/corpus/VariableDeclaration.A.java new file mode 100644 index 000000000..5b201c984 --- /dev/null +++ b/test/fixtures/java/corpus/VariableDeclaration.A.java @@ -0,0 +1,5 @@ +class Dino { + void test() { + int x = 3; + } +} diff --git a/test/fixtures/java/corpus/VariableDeclaration.B.java b/test/fixtures/java/corpus/VariableDeclaration.B.java new file mode 100644 index 000000000..9fc24e8df --- /dev/null +++ b/test/fixtures/java/corpus/VariableDeclaration.B.java @@ -0,0 +1,5 @@ +class Dino { + void test() { + float x = 3.0; + } +} diff --git a/test/fixtures/java/corpus/VariableDeclaration.diffA-B.txt b/test/fixtures/java/corpus/VariableDeclaration.diffA-B.txt new file mode 100644 index 000000000..a998c7de2 --- /dev/null +++ b/test/fixtures/java/corpus/VariableDeclaration.diffA-B.txt @@ -0,0 +1,17 @@ +(Statements + (Class + (Identifier) + (Statements + (Method + (Void) + (Empty) + (Identifier) + (Statements + (Statements + (Assignment + (Variable + { (Int) + ->(Float) } + (Identifier)) + { (Integer) + ->(Float) }))))))) diff --git a/test/fixtures/java/corpus/VariableDeclaration.diffB-A.txt b/test/fixtures/java/corpus/VariableDeclaration.diffB-A.txt new file mode 100644 index 000000000..82934bad3 --- /dev/null +++ b/test/fixtures/java/corpus/VariableDeclaration.diffB-A.txt @@ -0,0 +1,17 @@ +(Statements + (Class + (Identifier) + (Statements + (Method + (Void) + (Empty) + (Identifier) + (Statements + (Statements + (Assignment + (Variable + { (Float) + ->(Int) } + (Identifier)) + { (Float) + ->(Integer) }))))))) diff --git a/test/fixtures/java/corpus/VariableDeclaration.parseA.txt b/test/fixtures/java/corpus/VariableDeclaration.parseA.txt new file mode 100644 index 000000000..31765329f --- /dev/null +++ b/test/fixtures/java/corpus/VariableDeclaration.parseA.txt @@ -0,0 +1,15 @@ +(Statements + (Class + (Identifier) + (Statements + (Method + (Void) + (Empty) + (Identifier) + (Statements + (Statements + (Assignment + (Variable + (Int) + (Identifier)) + (Integer)))))))) diff --git a/test/fixtures/java/corpus/VariableDeclaration.parseB.txt b/test/fixtures/java/corpus/VariableDeclaration.parseB.txt new file mode 100644 index 000000000..cdd0fc932 --- /dev/null +++ b/test/fixtures/java/corpus/VariableDeclaration.parseB.txt @@ -0,0 +1,15 @@ +(Statements + (Class + (Identifier) + (Statements + (Method + (Void) + (Empty) + (Identifier) + (Statements + (Statements + (Assignment + (Variable + (Float) + (Identifier)) + (Float)))))))) diff --git a/test/fixtures/java/corpus/while.java b/test/fixtures/java/corpus/While.A.java similarity index 100% rename from test/fixtures/java/corpus/while.java rename to test/fixtures/java/corpus/While.A.java diff --git a/test/fixtures/java/corpus/While.B.java b/test/fixtures/java/corpus/While.B.java new file mode 100644 index 000000000..befc932e7 --- /dev/null +++ b/test/fixtures/java/corpus/While.B.java @@ -0,0 +1,8 @@ +class WhileDemo { + void main(String[] args){ + String theString = "cheese"; + while (theString != "poop") { + System.out.println("Count is: " + theString); + } + } +} diff --git a/test/fixtures/java/corpus/While.diffA-B.txt b/test/fixtures/java/corpus/While.diffA-B.txt new file mode 100644 index 000000000..315f537c7 --- /dev/null +++ b/test/fixtures/java/corpus/While.diffA-B.txt @@ -0,0 +1,45 @@ +(Statements + (Class + (Identifier) + (Statements + (Method + (Void) + {-(AccessibilityModifier)-} + {-(AccessibilityModifier)-} + (Empty) + (Identifier) + (Annotation + (Identifier) + (Array + (Empty) + (Identifier))) + (Statements + (Statements + (Assignment + (Variable + { (Int) + ->(Identifier) } + { (Identifier) + ->(Identifier) }) + { (Integer) + ->(TextElement) })) + (While + { (LessThan + {-(Identifier)-} + {-(Integer)-}) + ->(Not + {+(Equal + {+(Identifier)+} + {+(TextElement)+})+}) } + (Statements + (Call + (MemberAccess + (MemberAccess + (Identifier))) + (Plus + (TextElement) + { (Identifier) + ->(Identifier) }) + (Empty)) + {-(PostIncrement + {-(Identifier)-})-}))))))) diff --git a/test/fixtures/java/corpus/While.diffB-A.txt b/test/fixtures/java/corpus/While.diffB-A.txt new file mode 100644 index 000000000..c01568633 --- /dev/null +++ b/test/fixtures/java/corpus/While.diffB-A.txt @@ -0,0 +1,45 @@ +(Statements + (Class + (Identifier) + (Statements + (Method + (Void) + {+(AccessibilityModifier)+} + {+(AccessibilityModifier)+} + (Empty) + (Identifier) + (Annotation + (Identifier) + (Array + (Empty) + (Identifier))) + (Statements + (Statements + (Assignment + (Variable + { (Identifier) + ->(Int) } + { (Identifier) + ->(Identifier) }) + { (TextElement) + ->(Integer) })) + (While + { (Not + {-(Equal + {-(Identifier)-} + {-(TextElement)-})-}) + ->(LessThan + {+(Identifier)+} + {+(Integer)+}) } + (Statements + (Call + (MemberAccess + (MemberAccess + (Identifier))) + (Plus + (TextElement) + { (Identifier) + ->(Identifier) }) + (Empty)) + {+(PostIncrement + {+(Identifier)+})+}))))))) diff --git a/test/fixtures/java/corpus/While.parseA.txt b/test/fixtures/java/corpus/While.parseA.txt new file mode 100644 index 000000000..c27a47569 --- /dev/null +++ b/test/fixtures/java/corpus/While.parseA.txt @@ -0,0 +1,37 @@ +(Statements + (Class + (Identifier) + (Statements + (Method + (Void) + (AccessibilityModifier) + (AccessibilityModifier) + (Empty) + (Identifier) + (Annotation + (Identifier) + (Array + (Empty) + (Identifier))) + (Statements + (Statements + (Assignment + (Variable + (Int) + (Identifier)) + (Integer))) + (While + (LessThan + (Identifier) + (Integer)) + (Statements + (Call + (MemberAccess + (MemberAccess + (Identifier))) + (Plus + (TextElement) + (Identifier)) + (Empty)) + (PostIncrement + (Identifier))))))))) diff --git a/test/fixtures/java/corpus/While.parseB.txt b/test/fixtures/java/corpus/While.parseB.txt new file mode 100644 index 000000000..f53873b96 --- /dev/null +++ b/test/fixtures/java/corpus/While.parseB.txt @@ -0,0 +1,34 @@ +(Statements + (Class + (Identifier) + (Statements + (Method + (Void) + (Empty) + (Identifier) + (Annotation + (Identifier) + (Array + (Empty) + (Identifier))) + (Statements + (Statements + (Assignment + (Variable + (Identifier) + (Identifier)) + (TextElement))) + (While + (Not + (Equal + (Identifier) + (TextElement))) + (Statements + (Call + (MemberAccess + (MemberAccess + (Identifier))) + (Plus + (TextElement) + (Identifier)) + (Empty))))))))) diff --git a/test/fixtures/java/corpus/wildcard.java b/test/fixtures/java/corpus/Wildcard.A.java similarity index 100% rename from test/fixtures/java/corpus/wildcard.java rename to test/fixtures/java/corpus/Wildcard.A.java diff --git a/test/fixtures/java/corpus/Wildcard.B.java b/test/fixtures/java/corpus/Wildcard.B.java new file mode 100644 index 000000000..581d79c5f --- /dev/null +++ b/test/fixtures/java/corpus/Wildcard.B.java @@ -0,0 +1,3 @@ +class Connectable { + void connect(C connection); +} diff --git a/test/fixtures/java/corpus/Wildcard.diffA-B.txt b/test/fixtures/java/corpus/Wildcard.diffA-B.txt new file mode 100644 index 000000000..84fccc5d8 --- /dev/null +++ b/test/fixtures/java/corpus/Wildcard.diffA-B.txt @@ -0,0 +1,19 @@ +(Statements + (Class + (Identifier) + (Statements + (Method + (Void) + (Empty) + (Identifier) + (Annotation + (Identifier) + (GenericType + { (Identifier) + ->(Identifier) } + (Wildcard + { (WildcardBoundSuper + {-(Identifier)-}) + ->(WildcardBoundExtends + {+(Identifier)+}) }))) + (Empty))))) diff --git a/test/fixtures/java/corpus/Wildcard.diffB-A.txt b/test/fixtures/java/corpus/Wildcard.diffB-A.txt new file mode 100644 index 000000000..04ea9993f --- /dev/null +++ b/test/fixtures/java/corpus/Wildcard.diffB-A.txt @@ -0,0 +1,19 @@ +(Statements + (Class + (Identifier) + (Statements + (Method + (Void) + (Empty) + (Identifier) + (Annotation + (Identifier) + (GenericType + { (Identifier) + ->(Identifier) } + (Wildcard + { (WildcardBoundExtends + {-(Identifier)-}) + ->(WildcardBoundSuper + {+(Identifier)+}) }))) + (Empty))))) diff --git a/test/fixtures/java/corpus/Wildcard.parseA.txt b/test/fixtures/java/corpus/Wildcard.parseA.txt new file mode 100644 index 000000000..e55a144cb --- /dev/null +++ b/test/fixtures/java/corpus/Wildcard.parseA.txt @@ -0,0 +1,16 @@ +(Statements + (Class + (Identifier) + (Statements + (Method + (Void) + (Empty) + (Identifier) + (Annotation + (Identifier) + (GenericType + (Identifier) + (Wildcard + (WildcardBoundSuper + (Identifier))))) + (Empty))))) diff --git a/test/fixtures/java/corpus/Wildcard.parseB.txt b/test/fixtures/java/corpus/Wildcard.parseB.txt new file mode 100644 index 000000000..b1c84ce3d --- /dev/null +++ b/test/fixtures/java/corpus/Wildcard.parseB.txt @@ -0,0 +1,16 @@ +(Statements + (Class + (Identifier) + (Statements + (Method + (Void) + (Empty) + (Identifier) + (Annotation + (Identifier) + (GenericType + (Identifier) + (Wildcard + (WildcardBoundExtends + (Identifier))))) + (Empty))))) diff --git a/test/fixtures/java/corpus/enum-declaration-with-modifier.java b/test/fixtures/java/corpus/enum-declaration-with-modifier.java deleted file mode 100644 index 5e5d6bae8..000000000 --- a/test/fixtures/java/corpus/enum-declaration-with-modifier.java +++ /dev/null @@ -1,3 +0,0 @@ -public enum DisposableHelper { - -} diff --git a/test/fixtures/java/corpus/interface.java b/test/fixtures/java/corpus/interface.java deleted file mode 100644 index 432a2c27e..000000000 --- a/test/fixtures/java/corpus/interface.java +++ /dev/null @@ -1,2 +0,0 @@ -interface Top { -} diff --git a/test/fixtures/java/corpus/type-argument.java b/test/fixtures/java/corpus/type-argument.java deleted file mode 100644 index 10b339657..000000000 --- a/test/fixtures/java/corpus/type-argument.java +++ /dev/null @@ -1,5 +0,0 @@ -class Dinosaur { - void apply() { - (T1)a[0]; - } -} diff --git a/test/fixtures/java/corpus/variable-declaration.java b/test/fixtures/java/corpus/variable-declaration.java deleted file mode 100644 index 3694828b8..000000000 --- a/test/fixtures/java/corpus/variable-declaration.java +++ /dev/null @@ -1 +0,0 @@ -int x = 3;