We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This came up recently when I was trying to test some code that calls the stats package like this: eng.Add("foo", uint64(1)).
stats
eng.Add("foo", uint64(1))
// test handler := &statstest.Handler{} eng := stats.NewEngine("test", handler) runCode(eng) assert.Equal(t, []stats.Measure{ { Name: "test.foo", Fields: []stats.Field{ stats.MakeField("", 1, stats.Counter), }, Tags: []stats.Tag{}, } }, handler.Measures())
This test failed with a cryptic error: assert.go:24: ! [0].Fields[0].Value.typ: 2 != 3.
assert.go:24: ! [0].Fields[0].Value.typ: 2 != 3
The error was that my code is using uint, but the test is using an `int.
uint
If the value type had a GoString method, the error could have been more obvious.
GoString
The text was updated successfully, but these errors were encountered:
f2prateek
No branches or pull requests
This came up recently when I was trying to test some code that calls the
stats
package like this:eng.Add("foo", uint64(1))
.This test failed with a cryptic error:
assert.go:24: ! [0].Fields[0].Value.typ: 2 != 3
.The error was that my code is using
uint
, but the test is using an `int.If the value type had a
GoString
method, the error could have been more obvious.The text was updated successfully, but these errors were encountered: