Skip to content

Commit

Permalink
include type methods in generator test
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Cooper committed Oct 23, 2018
1 parent aae5d47 commit 73b546a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions dictionarygen/generator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,17 @@ func generateGoDoc(source []byte) ([]byte, error) {
printCfg.Indent = 1
fmt.Fprintf(&b, "\n")
}

if len(t.Methods) > 0 {
printCfg.Indent = 2
for _, c := range t.Methods {
if err := printCfg.Fprint(&b, fs, c.Decl); err != nil {
return nil, err
}
}
printCfg.Indent = 1
fmt.Fprintf(&b, "\n")
}
}
}

Expand Down
1 change: 1 addition & 0 deletions dictionarygen/testdata/value-collision.expected
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Types:
DSLTransmissionSystem_Value_ADSL2 DSLTransmissionSystem = 2
DSLTransmissionSystem_Value_ADSL2Plus DSLTransmissionSystem = 3
)
func (a DSLTransmissionSystem) String() string
Functions:
func DSLTransmissionSystem_Add(p *radius.Packet, value DSLTransmissionSystem) (err error)
func DSLTransmissionSystem_Del(p *radius.Packet)
Expand Down

0 comments on commit 73b546a

Please sign in to comment.