MCPcopy Create free account
hub / github.com/jmespath/go-jmespath / TestSlicePositiveStep

Function TestSlicePositiveStep

util_test.go:9–20  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

7)
8
9func TestSlicePositiveStep(t *testing.T) {
10 assert := assert.New(t)
11 input := make([]interface{}, 5)
12 input[0] = 0
13 input[1] = 1
14 input[2] = 2
15 input[3] = 3
16 input[4] = 4
17 result, err := slice(input, []sliceParam{{0, true}, {3, true}, {1, true}})
18 assert.Nil(err)
19 assert.Equal(input[:3], result)
20}
21
22func TestIsFalseJSONTypes(t *testing.T) {
23 assert := assert.New(t)

Callers

nothing calls this directly

Calls 4

NewFunction · 0.92
NilFunction · 0.92
EqualFunction · 0.92
sliceFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…