MCPcopy Index your code
hub / github.com/google/go-github / TestStringify_Floats

Function TestStringify_Floats

github/strings_test.go:233–251  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

231}
232
233func TestStringify_Floats(t *testing.T) {
234 t.Parallel()
235 tests := []struct {
236 in any
237 out string
238 }{
239 {float32(1.1), "1.1"},
240 {float64(1.1), "1.1"},
241 {float32(1.0000001), "1.0000001"},
242 {struct{ F float32 }{1.1}, "{F:1.1}"},
243 }
244
245 for i, tt := range tests {
246 s := Stringify(tt.in)
247 if s != tt.out {
248 t.Errorf("%v. Stringify(%v) = %q, want %q", i, tt.in, s, tt.out)
249 }
250 }
251}

Callers

nothing calls this directly

Calls 1

StringifyFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…