From f524368c0bff6eeb5233a59bf70b562a2499526b Mon Sep 17 00:00:00 2001 From: Ayman Nadeem Date: Tue, 24 Jul 2018 17:06:07 -0400 Subject: [PATCH] interface declaration tests --- test/fixtures/java/corpus/Continue0.A.java | 14 ++++++++++++++ test/fixtures/java/corpus/Continue1.A.java | 14 ++++++++++++++ test/fixtures/java/corpus/Interface.A.java | 3 +++ ...InterfaceDeclaration.java => Interface.B.java} | 1 + test/fixtures/java/corpus/Interface.diffA-B.txt | 15 +++++++++++++++ test/fixtures/java/corpus/Interface.diffB-A.txt | 15 +++++++++++++++ test/fixtures/java/corpus/Interface.parseA.txt | 7 +++++++ test/fixtures/java/corpus/Interface.parseB.txt | 13 +++++++++++++ test/fixtures/java/corpus/interface.java | 2 -- 9 files changed, 82 insertions(+), 2 deletions(-) create mode 100644 test/fixtures/java/corpus/Continue0.A.java create mode 100644 test/fixtures/java/corpus/Continue1.A.java create mode 100644 test/fixtures/java/corpus/Interface.A.java rename test/fixtures/java/corpus/{normalInterfaceDeclaration.java => Interface.B.java} (61%) create mode 100644 test/fixtures/java/corpus/Interface.diffA-B.txt create mode 100644 test/fixtures/java/corpus/Interface.diffB-A.txt create mode 100644 test/fixtures/java/corpus/Interface.parseA.txt create mode 100644 test/fixtures/java/corpus/Interface.parseB.txt delete mode 100644 test/fixtures/java/corpus/interface.java 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/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/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 { -}