MCPcopy Index your code
hub / github.com/koding/kite / TestUnmarshalArguments

Function TestUnmarshalArguments

dnode/partial_test.go:5–21  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

3import "testing"
4
5func TestUnmarshalArguments(t *testing.T) {
6 arguments := &Partial{Raw: []byte(`["hello", "world"]`)}
7
8 var s []string
9
10 arguments.MustUnmarshal(&s)
11
12 if len(s) != 2 {
13 t.Errorf("Invalid array length: %d", len(s))
14 return
15 }
16
17 if s[0] != "hello" || s[1] != "world" {
18 t.Errorf("Invalid array")
19 return
20 }
21}

Callers

nothing calls this directly

Calls 1

MustUnmarshalMethod · 0.95

Tested by

no test coverage detected