From be3d497f8c379bd54ef2a298756b4f20d59d249a Mon Sep 17 00:00:00 2001 From: Rick Winfrey Date: Thu, 30 Nov 2017 16:55:38 -0800 Subject: [PATCH] Add interface test cases for method specs without return types --- test/fixtures/go/interface-types.A.go | 4 ++++ test/fixtures/go/interface-types.B.go | 4 ++++ test/fixtures/go/interface-types.diffA-B.txt | 14 +++++++++++++- test/fixtures/go/interface-types.diffB-A.txt | 14 +++++++++++++- test/fixtures/go/interface-types.parseA.txt | 12 +++++++++++- test/fixtures/go/interface-types.parseB.txt | 12 +++++++++++- 6 files changed, 56 insertions(+), 4 deletions(-) diff --git a/test/fixtures/go/interface-types.A.go b/test/fixtures/go/interface-types.A.go index 9b2ca4a95..7f911b017 100644 --- a/test/fixtures/go/interface-types.A.go +++ b/test/fixtures/go/interface-types.A.go @@ -8,4 +8,8 @@ i1 io.Reader SomeMethod(s string) error } +// Option is an optional value or context to a transformation, used at pipeline +type OptionA interface { + public() +} } diff --git a/test/fixtures/go/interface-types.B.go b/test/fixtures/go/interface-types.B.go index cba5600bc..281697eb7 100644 --- a/test/fixtures/go/interface-types.B.go +++ b/test/fixtures/go/interface-types.B.go @@ -8,4 +8,8 @@ i1 io.Reader SomeMethod(s string) error } +// Option is an optional value or context to a transformation, used at pipeline +type OptionB interface { + private() +} } diff --git a/test/fixtures/go/interface-types.diffA-B.txt b/test/fixtures/go/interface-types.diffA-B.txt index 0f8c3234c..768b9e9ad 100644 --- a/test/fixtures/go/interface-types.diffA-B.txt +++ b/test/fixtures/go/interface-types.diffA-B.txt @@ -33,4 +33,16 @@ (Identifier) ( (Identifier) - (Identifier))))))))) + (Identifier)))))) + (Context + (Comment) + ( + (Type + { (Identifier) + ->(Identifier) } + (Interface + (MethodSignature + (Empty) + { (Identifier) + ->(Identifier) } + ([]))))))))) diff --git a/test/fixtures/go/interface-types.diffB-A.txt b/test/fixtures/go/interface-types.diffB-A.txt index 0f8c3234c..768b9e9ad 100644 --- a/test/fixtures/go/interface-types.diffB-A.txt +++ b/test/fixtures/go/interface-types.diffB-A.txt @@ -33,4 +33,16 @@ (Identifier) ( (Identifier) - (Identifier))))))))) + (Identifier)))))) + (Context + (Comment) + ( + (Type + { (Identifier) + ->(Identifier) } + (Interface + (MethodSignature + (Empty) + { (Identifier) + ->(Identifier) } + ([]))))))))) diff --git a/test/fixtures/go/interface-types.parseA.txt b/test/fixtures/go/interface-types.parseA.txt index 60e48c63c..93b5e9a8b 100644 --- a/test/fixtures/go/interface-types.parseA.txt +++ b/test/fixtures/go/interface-types.parseA.txt @@ -30,4 +30,14 @@ (Identifier) ( (Identifier) - (Identifier))))))))) + (Identifier)))))) + (Context + (Comment) + ( + (Type + (Identifier) + (Interface + (MethodSignature + (Empty) + (Identifier) + ([]))))))))) diff --git a/test/fixtures/go/interface-types.parseB.txt b/test/fixtures/go/interface-types.parseB.txt index 60e48c63c..93b5e9a8b 100644 --- a/test/fixtures/go/interface-types.parseB.txt +++ b/test/fixtures/go/interface-types.parseB.txt @@ -30,4 +30,14 @@ (Identifier) ( (Identifier) - (Identifier))))))))) + (Identifier)))))) + (Context + (Comment) + ( + (Type + (Identifier) + (Interface + (MethodSignature + (Empty) + (Identifier) + ([])))))))))