MCPcopy Index your code
hub / github.com/dnote/dnote / MustUnmarshalJSON

Function MustUnmarshalJSON

pkg/cli/testutils/main.go:286–291  ·  view source on GitHub ↗

MustUnmarshalJSON marshalls the given interface into JSON. If there is any error, it fails the test.

(t *testing.T, data []byte, v interface{})

Source from the content-addressed store, hash-verified

284// MustUnmarshalJSON marshalls the given interface into JSON.
285// If there is any error, it fails the test.
286func MustUnmarshalJSON(t *testing.T, data []byte, v interface{}) {
287 err := json.Unmarshal(data, v)
288 if err != nil {
289 t.Fatalf("%s: unmarshalling data: %s", t.Name(), err.Error())
290 }
291}
292
293// MustGenerateUUID generates the uuid. If error occurs, it fails the test.
294func MustGenerateUUID(t *testing.T) string {

Callers 3

TestLocalMigration1Function · 0.92
TestLocalMigration2Function · 0.92
TestLocalMigration3Function · 0.92

Calls 1

ErrorMethod · 0.45

Tested by 3

TestLocalMigration1Function · 0.74
TestLocalMigration2Function · 0.74
TestLocalMigration3Function · 0.74