mirror of
https://github.com/github/semantic.git
synced 2024-12-01 00:33:59 +03:00
test throws, trycatches and type argument
This commit is contained in:
parent
448999e68d
commit
cc2cf50b98
8
test/fixtures/java/corpus/Throws.A.java
vendored
Normal file
8
test/fixtures/java/corpus/Throws.A.java
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
class Beyonce {
|
||||
void x() {
|
||||
BufferedReader newReader() throws FileNotFoundException {
|
||||
new BufferedReader(new InputStreamReader(new FileInputStream(file), charset));
|
||||
}
|
||||
}
|
||||
}
|
||||
// this doesn't work
|
@ -3,3 +3,4 @@ class Beyonce {
|
||||
new BufferedReader(new InputStreamReader(new FileInputStream(file), charset));
|
||||
}
|
||||
}
|
||||
// this doesn't work
|
8
test/fixtures/java/corpus/TryCatches.B.java
vendored
Normal file
8
test/fixtures/java/corpus/TryCatches.B.java
vendored
Normal file
@ -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...");
|
||||
}
|
||||
}
|
5
test/fixtures/java/corpus/TypeArgument.A.java
vendored
Normal file
5
test/fixtures/java/corpus/TypeArgument.A.java
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
class Test {
|
||||
void printCollection(Collection<String> c) {
|
||||
// a wildcard collection
|
||||
}
|
||||
}
|
8
test/fixtures/java/corpus/TypeArgument.B.java
vendored
Normal file
8
test/fixtures/java/corpus/TypeArgument.B.java
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
class Test {
|
||||
static void printCollection(Collection<?> c) {
|
||||
// a wildcard collection
|
||||
for (Object o : c) {
|
||||
System.out.println(o);
|
||||
}
|
||||
}
|
||||
}
|
31
test/fixtures/java/corpus/TypeArgument.diffA-B.txt
vendored
Normal file
31
test/fixtures/java/corpus/TypeArgument.diffA-B.txt
vendored
Normal file
@ -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)+})+})+}) }))))))
|
31
test/fixtures/java/corpus/TypeArgument.diffB-A.txt
vendored
Normal file
31
test/fixtures/java/corpus/TypeArgument.diffB-A.txt
vendored
Normal file
@ -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) }))))))
|
17
test/fixtures/java/corpus/TypeArgument.parseA.txt
vendored
Normal file
17
test/fixtures/java/corpus/TypeArgument.parseA.txt
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
(Statements
|
||||
(Class
|
||||
(Identifier)
|
||||
(Statements
|
||||
(Method
|
||||
(Void)
|
||||
(Empty)
|
||||
(Identifier)
|
||||
(Annotation
|
||||
(Identifier)
|
||||
(GenericType
|
||||
(Identifier)
|
||||
(Identifier)))
|
||||
(Statements
|
||||
(Context
|
||||
(Comment)
|
||||
(Empty)))))))
|
29
test/fixtures/java/corpus/TypeArgument.parseB.txt
vendored
Normal file
29
test/fixtures/java/corpus/TypeArgument.parseB.txt
vendored
Normal file
@ -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))))))))))
|
@ -1,6 +0,0 @@
|
||||
class Dino {
|
||||
void hi() {
|
||||
try (CustomAnalyzer analyzer = new CustomAnalyzer()){
|
||||
}
|
||||
}
|
||||
}
|
5
test/fixtures/java/corpus/type-argument.java
vendored
5
test/fixtures/java/corpus/type-argument.java
vendored
@ -1,5 +0,0 @@
|
||||
class Dinosaur {
|
||||
void apply() {
|
||||
(T1)a[0];
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user