From 52bc3641682819eb3ae2c589b6135a78c47d06ed Mon Sep 17 00:00:00 2001 From: Rick Winfrey Date: Mon, 20 Nov 2017 11:07:21 -0800 Subject: [PATCH] Update tests fixtures --- .../go/binary-expressions.diffA-B.txt | 128 ++++++++++++++++++ .../go/binary-expressions.diffB-A.txt | 128 ++++++++++++++++++ .../fixtures/go/binary-expressions.parseA.txt | 72 ++++++++++ .../fixtures/go/binary-expressions.parseB.txt | 72 ++++++++++ .../fixtures/go/switch-statements.diffA-B.txt | 50 +++---- .../fixtures/go/switch-statements.diffB-A.txt | 45 +++--- test/fixtures/go/switch-statements.parseA.txt | 28 ++-- .../go/type-switch-statements.diffA-B.txt | 24 ++-- .../go/type-switch-statements.diffB-A.txt | 24 ++-- .../go/type-switch-statements.parseA.txt | 24 ++-- .../go/type-switch-statements.parseB.txt | 24 ++-- test/fixtures/go/unary-expressions.A.go | 6 +- test/fixtures/go/unary-expressions.B.go | 8 +- .../fixtures/go/unary-expressions.diffA-B.txt | 12 ++ .../fixtures/go/unary-expressions.diffB-A.txt | 12 ++ test/fixtures/go/unary-expressions.parseA.txt | 8 ++ test/fixtures/go/unary-expressions.parseB.txt | 8 ++ 17 files changed, 552 insertions(+), 121 deletions(-) create mode 100644 test/fixtures/go/binary-expressions.diffA-B.txt create mode 100644 test/fixtures/go/binary-expressions.diffB-A.txt create mode 100644 test/fixtures/go/binary-expressions.parseA.txt create mode 100644 test/fixtures/go/binary-expressions.parseB.txt diff --git a/test/fixtures/go/binary-expressions.diffA-B.txt b/test/fixtures/go/binary-expressions.diffA-B.txt new file mode 100644 index 000000000..3b7b43359 --- /dev/null +++ b/test/fixtures/go/binary-expressions.diffA-B.txt @@ -0,0 +1,128 @@ +(Program + (Module + (Identifier)) + (Function + (Empty) + (Identifier) + ([]) + ( + (Context + (Comment) + (Or + { (Identifier) + ->(Identifier) } + (Context + (Comment) + { (Identifier) + ->(Identifier) }))) + (Context + (Comment) + (And + { (Identifier) + ->(Identifier) } + { (Identifier) + ->(Identifier) })) + {+(Equal + {+(Identifier)+} + {+(Identifier)+})+} + {+(Not + {+(Equal + {+(Identifier)+} + {+(Identifier)+})+})+} + {+(LessThan + {+(Identifier)+} + {+(Identifier)+})+} + {+(LessThanEqual + {+(Identifier)+} + {+(Identifier)+})+} + {+(GreaterThan + {+(Identifier)+} + {+(Identifier)+})+} + {+(GreaterThanEqual + {+(Identifier)+} + {+(Identifier)+})+} + {+(Plus + {+(Identifier)+} + {+(Identifier)+})+} + {+(Minus + {+(Identifier)+} + {+(Identifier)+})+} + {+(BOr + {+(Identifier)+} + {+(Identifier)+})+} + {+(BXOr + {+(Identifier)+} + {+(Identifier)+})+} + {+(Times + {+(Identifier)+} + {+(Identifier)+})+} + {+(DividedBy + {+(Identifier)+} + {+(Identifier)+})+} + {+(Modulo + {+(Identifier)+} + {+(Identifier)+})+} + {+(LShift + {+(Identifier)+} + {+(Identifier)+})+} + {+(RShift + {+(Identifier)+} + {+(Identifier)+})+} + {+(BAnd + {+(Identifier)+} + {+(Identifier)+})+} + {+(BAnd + {+(Identifier)+} + {+(Identifier)+})+} + {-(Equal + {-(Identifier)-} + {-(Identifier)-})-} + {-(Not + {-(Equal + {-(Identifier)-} + {-(Identifier)-})-})-} + {-(LessThan + {-(Identifier)-} + {-(Identifier)-})-} + {-(LessThanEqual + {-(Identifier)-} + {-(Identifier)-})-} + {-(GreaterThan + {-(Identifier)-} + {-(Identifier)-})-} + {-(GreaterThanEqual + {-(Identifier)-} + {-(Identifier)-})-} + {-(Plus + {-(Identifier)-} + {-(Identifier)-})-} + {-(Minus + {-(Identifier)-} + {-(Identifier)-})-} + {-(BOr + {-(Identifier)-} + {-(Identifier)-})-} + {-(BXOr + {-(Identifier)-} + {-(Identifier)-})-} + {-(Times + {-(Identifier)-} + {-(Identifier)-})-} + {-(DividedBy + {-(Identifier)-} + {-(Identifier)-})-} + {-(Modulo + {-(Identifier)-} + {-(Identifier)-})-} + {-(LShift + {-(Identifier)-} + {-(Identifier)-})-} + {-(RShift + {-(Identifier)-} + {-(Identifier)-})-} + {-(BAnd + {-(Identifier)-} + {-(Identifier)-})-} + {-(BAnd + {-(Identifier)-} + {-(Identifier)-})-}))) diff --git a/test/fixtures/go/binary-expressions.diffB-A.txt b/test/fixtures/go/binary-expressions.diffB-A.txt new file mode 100644 index 000000000..3b7b43359 --- /dev/null +++ b/test/fixtures/go/binary-expressions.diffB-A.txt @@ -0,0 +1,128 @@ +(Program + (Module + (Identifier)) + (Function + (Empty) + (Identifier) + ([]) + ( + (Context + (Comment) + (Or + { (Identifier) + ->(Identifier) } + (Context + (Comment) + { (Identifier) + ->(Identifier) }))) + (Context + (Comment) + (And + { (Identifier) + ->(Identifier) } + { (Identifier) + ->(Identifier) })) + {+(Equal + {+(Identifier)+} + {+(Identifier)+})+} + {+(Not + {+(Equal + {+(Identifier)+} + {+(Identifier)+})+})+} + {+(LessThan + {+(Identifier)+} + {+(Identifier)+})+} + {+(LessThanEqual + {+(Identifier)+} + {+(Identifier)+})+} + {+(GreaterThan + {+(Identifier)+} + {+(Identifier)+})+} + {+(GreaterThanEqual + {+(Identifier)+} + {+(Identifier)+})+} + {+(Plus + {+(Identifier)+} + {+(Identifier)+})+} + {+(Minus + {+(Identifier)+} + {+(Identifier)+})+} + {+(BOr + {+(Identifier)+} + {+(Identifier)+})+} + {+(BXOr + {+(Identifier)+} + {+(Identifier)+})+} + {+(Times + {+(Identifier)+} + {+(Identifier)+})+} + {+(DividedBy + {+(Identifier)+} + {+(Identifier)+})+} + {+(Modulo + {+(Identifier)+} + {+(Identifier)+})+} + {+(LShift + {+(Identifier)+} + {+(Identifier)+})+} + {+(RShift + {+(Identifier)+} + {+(Identifier)+})+} + {+(BAnd + {+(Identifier)+} + {+(Identifier)+})+} + {+(BAnd + {+(Identifier)+} + {+(Identifier)+})+} + {-(Equal + {-(Identifier)-} + {-(Identifier)-})-} + {-(Not + {-(Equal + {-(Identifier)-} + {-(Identifier)-})-})-} + {-(LessThan + {-(Identifier)-} + {-(Identifier)-})-} + {-(LessThanEqual + {-(Identifier)-} + {-(Identifier)-})-} + {-(GreaterThan + {-(Identifier)-} + {-(Identifier)-})-} + {-(GreaterThanEqual + {-(Identifier)-} + {-(Identifier)-})-} + {-(Plus + {-(Identifier)-} + {-(Identifier)-})-} + {-(Minus + {-(Identifier)-} + {-(Identifier)-})-} + {-(BOr + {-(Identifier)-} + {-(Identifier)-})-} + {-(BXOr + {-(Identifier)-} + {-(Identifier)-})-} + {-(Times + {-(Identifier)-} + {-(Identifier)-})-} + {-(DividedBy + {-(Identifier)-} + {-(Identifier)-})-} + {-(Modulo + {-(Identifier)-} + {-(Identifier)-})-} + {-(LShift + {-(Identifier)-} + {-(Identifier)-})-} + {-(RShift + {-(Identifier)-} + {-(Identifier)-})-} + {-(BAnd + {-(Identifier)-} + {-(Identifier)-})-} + {-(BAnd + {-(Identifier)-} + {-(Identifier)-})-}))) diff --git a/test/fixtures/go/binary-expressions.parseA.txt b/test/fixtures/go/binary-expressions.parseA.txt new file mode 100644 index 000000000..3bd8a9bd5 --- /dev/null +++ b/test/fixtures/go/binary-expressions.parseA.txt @@ -0,0 +1,72 @@ +(Program + (Module + (Identifier)) + (Function + (Empty) + (Identifier) + ([]) + ( + (Context + (Comment) + (Or + (Identifier) + (Context + (Comment) + (Identifier)))) + (Context + (Comment) + (And + (Identifier) + (Identifier))) + (Equal + (Identifier) + (Identifier)) + (Not + (Equal + (Identifier) + (Identifier))) + (LessThan + (Identifier) + (Identifier)) + (LessThanEqual + (Identifier) + (Identifier)) + (GreaterThan + (Identifier) + (Identifier)) + (GreaterThanEqual + (Identifier) + (Identifier)) + (Plus + (Identifier) + (Identifier)) + (Minus + (Identifier) + (Identifier)) + (BOr + (Identifier) + (Identifier)) + (BXOr + (Identifier) + (Identifier)) + (Times + (Identifier) + (Identifier)) + (DividedBy + (Identifier) + (Identifier)) + (Modulo + (Identifier) + (Identifier)) + (LShift + (Identifier) + (Identifier)) + (RShift + (Identifier) + (Identifier)) + (BAnd + (Identifier) + (Identifier)) + (BAnd + (Identifier) + (Identifier))))) diff --git a/test/fixtures/go/binary-expressions.parseB.txt b/test/fixtures/go/binary-expressions.parseB.txt new file mode 100644 index 000000000..3bd8a9bd5 --- /dev/null +++ b/test/fixtures/go/binary-expressions.parseB.txt @@ -0,0 +1,72 @@ +(Program + (Module + (Identifier)) + (Function + (Empty) + (Identifier) + ([]) + ( + (Context + (Comment) + (Or + (Identifier) + (Context + (Comment) + (Identifier)))) + (Context + (Comment) + (And + (Identifier) + (Identifier))) + (Equal + (Identifier) + (Identifier)) + (Not + (Equal + (Identifier) + (Identifier))) + (LessThan + (Identifier) + (Identifier)) + (LessThanEqual + (Identifier) + (Identifier)) + (GreaterThan + (Identifier) + (Identifier)) + (GreaterThanEqual + (Identifier) + (Identifier)) + (Plus + (Identifier) + (Identifier)) + (Minus + (Identifier) + (Identifier)) + (BOr + (Identifier) + (Identifier)) + (BXOr + (Identifier) + (Identifier)) + (Times + (Identifier) + (Identifier)) + (DividedBy + (Identifier) + (Identifier)) + (Modulo + (Identifier) + (Identifier)) + (LShift + (Identifier) + (Identifier)) + (RShift + (Identifier) + (Identifier)) + (BAnd + (Identifier) + (Identifier)) + (BAnd + (Identifier) + (Identifier))))) diff --git a/test/fixtures/go/switch-statements.diffA-B.txt b/test/fixtures/go/switch-statements.diffA-B.txt index 8605d9b44..cbebdad27 100644 --- a/test/fixtures/go/switch-statements.diffA-B.txt +++ b/test/fixtures/go/switch-statements.diffA-B.txt @@ -17,35 +17,25 @@ (Call (Identifier) (Empty))) - {+(Pattern - {+(LessThan - {+(Identifier)+} - {+(Identifier)+})+} - {+(Call - {+(Identifier)+} - {+(Empty)+})+})+} - {+(Pattern - {+(Equal - {+(Identifier)+} - {+(Integer)+})+} - {+(Call - {+(Identifier)+} - {+(Empty)+})+})+} + (Pattern + (LessThan + { (Identifier) + ->(Identifier) } + { (Identifier) + ->(Identifier) }) + {-(Context + {-(Comment)-} + (Call + (Identifier) + (Empty)))-}) {-(Context {-(Comment)-} - {-(Pattern - {-(LessThan - {-(Identifier)-} - {-(Identifier)-})-} - {-(Context - {-(Comment)-} - {-(Call - {-(Identifier)-} - {-(Empty)-})-})-})-})-} - {-(Pattern - {-(Equal - {-(Identifier)-} - {-(Integer)-})-} - {-(Call - {-(Identifier)-} - {-(Empty)-})-})-})))) + (Pattern + (Equal + { (Identifier) + ->(Identifier) } + (Integer)) + (Call + { (Identifier) + ->(Identifier) } + (Empty))))-})))) diff --git a/test/fixtures/go/switch-statements.diffB-A.txt b/test/fixtures/go/switch-statements.diffB-A.txt index 48748178f..b52fd8969 100644 --- a/test/fixtures/go/switch-statements.diffB-A.txt +++ b/test/fixtures/go/switch-statements.diffB-A.txt @@ -17,32 +17,25 @@ (Call (Identifier) (Empty))) - {+(Context - {+(Comment)+} - {+(Pattern - {+(LessThan - {+(Identifier)+} - {+(Identifier)+})+} - {+(Context - {+(Comment)+} - {+(Call - {+(Identifier)+} - {+(Empty)+})+})+})+})+} (Pattern - { (LessThan - {-(Identifier)-} - {-(Identifier)-}) - ->(Equal - {+(Identifier)+} - {+(Integer)+}) } - (Call + (LessThan { (Identifier) ->(Identifier) } - (Empty))) - {-(Pattern - {-(Equal - {-(Identifier)-} - {-(Integer)-})-} - {-(Call - {-(Identifier)-} - {-(Empty)-})-})-})))) + { (Identifier) + ->(Identifier) }) + {+(Context + {+(Comment)+} + (Call + (Identifier) + (Empty)))+}) + {+(Context + {+(Comment)+} + (Pattern + (Equal + { (Identifier) + ->(Identifier) } + (Integer)) + (Call + { (Identifier) + ->(Identifier) } + (Empty))))+})))) diff --git a/test/fixtures/go/switch-statements.parseA.txt b/test/fixtures/go/switch-statements.parseA.txt index a3f66a9f4..7a6987a8a 100644 --- a/test/fixtures/go/switch-statements.parseA.txt +++ b/test/fixtures/go/switch-statements.parseA.txt @@ -15,21 +15,21 @@ (Call (Identifier) (Empty))) + (Pattern + (LessThan + (Identifier) + (Identifier)) + (Context + (Comment) + (Call + (Identifier) + (Empty)))) (Context (Comment) (Pattern - (LessThan + (Equal (Identifier) - (Identifier)) - (Context - (Comment) - (Call - (Identifier) - (Empty))))) - (Pattern - (Equal - (Identifier) - (Integer)) - (Call - (Identifier) - (Empty))))))) + (Integer)) + (Call + (Identifier) + (Empty)))))))) diff --git a/test/fixtures/go/type-switch-statements.diffA-B.txt b/test/fixtures/go/type-switch-statements.diffA-B.txt index bd73c506f..d54e8a0fb 100644 --- a/test/fixtures/go/type-switch-statements.diffA-B.txt +++ b/test/fixtures/go/type-switch-statements.diffA-B.txt @@ -17,22 +17,22 @@ { (Identifier) ->(Identifier) })) ( + (Pattern + ( + (Identifier) + (Pointer + (MemberAccess + (Identifier) + (Identifier)))) + ([])) (Context (Comment) (Pattern - ( + (Slice + (Identifier)) + (Call (Identifier) - (Pointer - (MemberAccess - (Identifier) - (Identifier)))) - ([]))) - (Pattern - (Slice - (Identifier)) - (Call - (Identifier) - (Empty))) + (Empty)))) (Pattern (Pointer (Identifier)) diff --git a/test/fixtures/go/type-switch-statements.diffB-A.txt b/test/fixtures/go/type-switch-statements.diffB-A.txt index 2b9c832e4..adedfb5b8 100644 --- a/test/fixtures/go/type-switch-statements.diffB-A.txt +++ b/test/fixtures/go/type-switch-statements.diffB-A.txt @@ -17,22 +17,22 @@ { (Identifier) ->(Identifier) })) ( + (Pattern + ( + (Identifier) + (Pointer + (MemberAccess + (Identifier) + (Identifier)))) + ([])) (Context (Comment) (Pattern - ( + (Slice + (Identifier)) + (Call (Identifier) - (Pointer - (MemberAccess - (Identifier) - (Identifier)))) - ([]))) - (Pattern - (Slice - (Identifier)) - (Call - (Identifier) - (Empty))) + (Empty)))) (Pattern (Pointer (Identifier)) diff --git a/test/fixtures/go/type-switch-statements.parseA.txt b/test/fixtures/go/type-switch-statements.parseA.txt index b0474fa9e..0e29aae4a 100644 --- a/test/fixtures/go/type-switch-statements.parseA.txt +++ b/test/fixtures/go/type-switch-statements.parseA.txt @@ -14,22 +14,22 @@ (TypeSwitchGuard (Identifier))) ( + (Pattern + ( + (Identifier) + (Pointer + (MemberAccess + (Identifier) + (Identifier)))) + ([])) (Context (Comment) (Pattern - ( + (Slice + (Identifier)) + (Call (Identifier) - (Pointer - (MemberAccess - (Identifier) - (Identifier)))) - ([]))) - (Pattern - (Slice - (Identifier)) - (Call - (Identifier) - (Empty))) + (Empty)))) (Pattern (Pointer (Identifier)) diff --git a/test/fixtures/go/type-switch-statements.parseB.txt b/test/fixtures/go/type-switch-statements.parseB.txt index 8235d817c..aabffbfab 100644 --- a/test/fixtures/go/type-switch-statements.parseB.txt +++ b/test/fixtures/go/type-switch-statements.parseB.txt @@ -14,22 +14,22 @@ (TypeSwitchGuard (Identifier))) ( + (Pattern + ( + (Identifier) + (Pointer + (MemberAccess + (Identifier) + (Identifier)))) + ([])) (Context (Comment) (Pattern - ( + (Slice + (Identifier)) + (Call (Identifier) - (Pointer - (MemberAccess - (Identifier) - (Identifier)))) - ([]))) - (Pattern - (Slice - (Identifier)) - (Call - (Identifier) - (Empty))) + (Empty)))) (Pattern (Pointer (Identifier)) diff --git a/test/fixtures/go/unary-expressions.A.go b/test/fixtures/go/unary-expressions.A.go index b28f4e010..c94acf89a 100644 --- a/test/fixtures/go/unary-expressions.A.go +++ b/test/fixtures/go/unary-expressions.A.go @@ -1,7 +1,11 @@ package main func main() { -!<-a ++a +-b +!<-c *foo() ^h +&bar +<-d } diff --git a/test/fixtures/go/unary-expressions.B.go b/test/fixtures/go/unary-expressions.B.go index df61b6d66..80d22166f 100644 --- a/test/fixtures/go/unary-expressions.B.go +++ b/test/fixtures/go/unary-expressions.B.go @@ -1,7 +1,11 @@ package main func main() { -!<-b ++b +-c +!<-d *bar() -^g +^i +&foo +<-e } diff --git a/test/fixtures/go/unary-expressions.diffA-B.txt b/test/fixtures/go/unary-expressions.diffA-B.txt index e180e39df..cfd95f282 100644 --- a/test/fixtures/go/unary-expressions.diffA-B.txt +++ b/test/fixtures/go/unary-expressions.diffA-B.txt @@ -6,6 +6,11 @@ (Identifier) ([]) ( + { (Identifier) + ->(Identifier) } + (Negate + { (Identifier) + ->(Identifier) }) (Not (Receive (Empty) @@ -18,4 +23,11 @@ (Empty))) (Complement { (Identifier) + ->(Identifier) }) + (Reference + { (Identifier) + ->(Identifier) }) + (Receive + (Empty) + { (Identifier) ->(Identifier) })))) diff --git a/test/fixtures/go/unary-expressions.diffB-A.txt b/test/fixtures/go/unary-expressions.diffB-A.txt index e180e39df..cfd95f282 100644 --- a/test/fixtures/go/unary-expressions.diffB-A.txt +++ b/test/fixtures/go/unary-expressions.diffB-A.txt @@ -6,6 +6,11 @@ (Identifier) ([]) ( + { (Identifier) + ->(Identifier) } + (Negate + { (Identifier) + ->(Identifier) }) (Not (Receive (Empty) @@ -18,4 +23,11 @@ (Empty))) (Complement { (Identifier) + ->(Identifier) }) + (Reference + { (Identifier) + ->(Identifier) }) + (Receive + (Empty) + { (Identifier) ->(Identifier) })))) diff --git a/test/fixtures/go/unary-expressions.parseA.txt b/test/fixtures/go/unary-expressions.parseA.txt index dd1f5e2ab..ccc33fe17 100644 --- a/test/fixtures/go/unary-expressions.parseA.txt +++ b/test/fixtures/go/unary-expressions.parseA.txt @@ -6,6 +6,9 @@ (Identifier) ([]) ( + (Identifier) + (Negate + (Identifier)) (Not (Receive (Empty) @@ -15,4 +18,9 @@ (Identifier) (Empty))) (Complement + (Identifier)) + (Reference + (Identifier)) + (Receive + (Empty) (Identifier))))) diff --git a/test/fixtures/go/unary-expressions.parseB.txt b/test/fixtures/go/unary-expressions.parseB.txt index dd1f5e2ab..ccc33fe17 100644 --- a/test/fixtures/go/unary-expressions.parseB.txt +++ b/test/fixtures/go/unary-expressions.parseB.txt @@ -6,6 +6,9 @@ (Identifier) ([]) ( + (Identifier) + (Negate + (Identifier)) (Not (Receive (Empty) @@ -15,4 +18,9 @@ (Identifier) (Empty))) (Complement + (Identifier)) + (Reference + (Identifier)) + (Receive + (Empty) (Identifier)))))