Skip to content
This repository was archived by the owner on Jun 27, 2023. It is now read-only.

fix parse array with the external const correctly#569

Merged
codyoss merged 2 commits into
golang:masterfrom
sryoya:fix_parse_array_with_external_const_correctly
Jun 11, 2021
Merged

fix parse array with the external const correctly#569
codyoss merged 2 commits into
golang:masterfrom
sryoya:fix_parse_array_with_external_const_correctly

Conversation

@sryoya

@sryoya sryoya commented Jun 8, 2021

Copy link
Copy Markdown
Contributor

Fixes #561 - Panic on array parsing if length is externally defined

It also fixes the following minor problems in TestParseArrayWithConstLength, a test function related to this feature.

  • It doesn't check all outputs to be asserted.
  • It doesn't initialize some of the fields in mockgen.fileParser, even though they are initialized in the production code. (Actually, it caused an unnecessary test error by test data I added)

@sryoya sryoya requested a review from codyoss as a code owner June 8, 2021 18:14

@codyoss codyoss left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution, just a couple of minor nits.

Comment thread mockgen/parse.go
Comment thread mockgen/parse.go Outdated
@sryoya sryoya requested a review from codyoss June 11, 2021 00:49
@sryoya

sryoya commented Jun 11, 2021

Copy link
Copy Markdown
Contributor Author

Thanks for the review 🌵 I've either fixed or replied to your comments.

@codyoss codyoss left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@codyoss codyoss merged commit aba2ff9 into golang:master Jun 11, 2021
@codyoss

codyoss commented Jun 11, 2021

Copy link
Copy Markdown
Member

@sryoya Thank you for your contribution! 🎆

@sryoya sryoya deleted the fix_parse_array_with_external_const_correctly branch June 11, 2021 21:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Panic on array parsing if length is externally defined

2 participants