Commented out to avoid a warning relating to the method not being used. Left here since it's useful for debugging. func traceString(t *testing.T, s string) { testStringHelper(t, s, true) }
(t *testing.T, s string)
| 14 | //func traceString(t *testing.T, s string) { testStringHelper(t, s, true) } |
| 15 | |
| 16 | func testNoPanicString(t *testing.T, s string) { |
| 17 | defer func() { |
| 18 | if rc := recover(); rc != nil { |
| 19 | var buffer [8192]byte |
| 20 | t.Errorf("got panic %v; expected none", rc) |
| 21 | t.Logf("trace:\n%s", buffer[:runtime.Stack(buffer[:], false)]) |
| 22 | } |
| 23 | }() |
| 24 | testStringHelper(t, s, false) |
| 25 | } |
| 26 | |
| 27 | func testStringHelper(t *testing.T, s string, trace bool) { |
| 28 | l := NewState() |
no test coverage detected