Skip to content

Conversation

marcoferrer
Copy link

#18

@doriable doriable changed the title bug fix tag overflow checks Fix bug in tag overflow checks Aug 14, 2025
Copy link
Member

@mcy mcy left a comment

Choose a reason for hiding this comment

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

Please expand the PR description to detail why this change is necessary. I prefer to have detailed commit messages that are self-contained.


func TestTagOverflows(t *testing.T) {
tag := EncodeTag(protowire.MaxValidNumber, protowire.BytesType)
if tag.Overflows() {
Copy link
Member

Choose a reason for hiding this comment

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

Use assert.True() here.

@mcy
Copy link
Member

mcy commented Aug 18, 2025

Also, could you include a test in internal/testdata/tags that exercises this behavior? I like to have end-to-end tests for these kinds of corner-cases.

@@ -0,0 +1,13 @@
package tdp
Copy link
Member

Choose a reason for hiding this comment

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

tdp -> tdp_test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants