MCPcopy Create free account
hub / github.com/GoTestTools/gotestfmt / MarshalJSON

Method MarshalJSON

parser/model_json.go:17–26  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15}
16
17func (t *TestCase) MarshalJSON() ([]byte, error) {
18 tmp := tmpTestCase{
19 Name: t.Name,
20 Result: t.Result,
21 Duration: t.Duration.String(),
22 Coverage: t.Coverage,
23 Output: t.Output,
24 }
25 return json.Marshal(tmp)
26}
27
28func (t *TestCase) UnmarshalJSON(data []byte) error {
29 var tmp tmpTestCase

Callers

nothing calls this directly

Calls 1

StringMethod · 0.80

Tested by

no test coverage detected