Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cast expected remainingLength type to int32 #1

Merged
merged 1 commit into from
Oct 17, 2015
Merged

cast expected remainingLength type to int32 #1

merged 1 commit into from
Oct 17, 2015

Conversation

lufia
Copy link

@lufia lufia commented Oct 8, 2015

I ran go test with go1.5 darwin/amd64.
then:

--- FAIL: TestMessageHeaderFields (0.00s)
        Error Trace:    header_test.go:28
        Error:      Not equal: 33 (expected)
                    != 33 (actual)

FAIL

In require.Equal(t, 33, header.RemainingLength()), 33 is int by via interface{}.
But type of returning value of header.RemainingLength() is int32.

https://play.golang.org/p/LA9gpt17V1

@lufia lufia changed the title cast expected remainingLength cast actual remainingLength to int32 Oct 8, 2015
@lufia lufia changed the title cast actual remainingLength to int32 cast expected remainingLength type to int32 Oct 8, 2015
zhenjl added a commit that referenced this pull request Oct 17, 2015
cast expected remainingLength type to int32
@zhenjl zhenjl merged commit 2b7ca1a into zentures:master Oct 17, 2015
@lufia lufia deleted the fix/broken_test_typemismatch branch October 20, 2015 03:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants