1
1
mirror of https://github.com/github/semantic.git synced 2024-12-25 07:55:12 +03:00

Add test case

This commit is contained in:
Rick Winfrey 2019-02-08 17:41:16 -08:00
parent 2c5aeebf3e
commit f8645c43b5
6 changed files with 116 additions and 25 deletions

View File

@ -8,3 +8,7 @@ class C():
class B(method1):
def method1(self):
return
class D(e):
f: str
g: Optional[int]

View File

@ -5,3 +5,7 @@ class D(method1):
class B:
def b(self):
return c
class E(e):
g: str
h: Optional[int]

View File

@ -1,31 +1,69 @@
(Statements
(Class
{ (Identifier)
->(Identifier) }
{+(Identifier)+}
(Statements
(Function
{ (Identifier)
->(Identifier) }
(Identifier)
(Statements
(Return
{ (Identifier)
->(Empty) })))))
{-(Class
{-(Identifier)-}
{-(Statements
{-(Function
{-(Identifier)-}
{-(Identifier)-}
{-(Statements
{-(Return
{-(Identifier)-})-})-})-})-})-}
{-(Class
{-(Identifier)-}
{-(Statements
{-(NoOp
{-(Empty)-})-})-})-}
{-(Class
{-(Identifier)-}
{-(Identifier)-}
{-(Statements
{-(Function
{-(Identifier)-}
{-(Identifier)-}
{-(Statements
{-(Return
{-(Empty)-})-})-})-})-})-}
(Class
(Identifier)
{-(Identifier)-}
{ (Identifier)
->(Identifier) }
(Statements
(Function
{ (Identifier)
->(Identifier) }
(Identifier)
(Statements
(Return
{ (Empty)
->(Identifier) }))))))
{+(Function
{+(Identifier)+}
{+(Identifier)+}
{+(Statements
{+(Return
{+(Empty)+})+})+})+}
{-(Assignment
{-(Identifier)-}
{-(Identifier)-}
{-(Empty)-})-}
{-(Assignment
{-(Subscript
{-(Identifier)-}
{-(Identifier)-})-}
{-(Identifier)-}
{-(Empty)-})-}))
{+(Class
{+(Identifier)+}
{+(Statements
{+(Function
{+(Identifier)+}
{+(Identifier)+}
{+(Statements
{+(Return
{+(Identifier)+})+})+})+})+})+}
{+(Class
{+(Identifier)+}
{+(Identifier)+}
{+(Statements
{+(Assignment
{+(Identifier)+}
{+(Identifier)+}
{+(Empty)+})+}
{+(Assignment
{+(Subscript
{+(Identifier)+}
{+(Identifier)+})+}
{+(Identifier)+}
{+(Empty)+})+})+})+})

View File

@ -28,4 +28,21 @@
(Statements
(Return
{ (Identifier)
->(Empty) }))))))
->(Empty) })))))
(Class
{ (Identifier)
->(Identifier) }
(Identifier)
(Statements
(Assignment
(Identifier)
{ (Identifier)
->(Identifier) }
(Empty))
(Assignment
(Subscript
(Identifier)
(Identifier))
{ (Identifier)
->(Identifier) }
(Empty)))))

View File

@ -22,4 +22,18 @@
(Identifier)
(Statements
(Return
(Empty)))))))
(Empty))))))
(Class
(Identifier)
(Identifier)
(Statements
(Assignment
(Identifier)
(Identifier)
(Empty))
(Assignment
(Subscript
(Identifier)
(Identifier))
(Identifier)
(Empty)))))

View File

@ -17,4 +17,18 @@
(Identifier)
(Statements
(Return
(Identifier)))))))
(Identifier))))))
(Class
(Identifier)
(Identifier)
(Statements
(Assignment
(Identifier)
(Identifier)
(Empty))
(Assignment
(Subscript
(Identifier)
(Identifier))
(Identifier)
(Empty)))))