Debian Codegraph @

execution/func_flatten_test.go

raw symbols SCIP
1 package execution_testscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/execution_test`/
2
3 import (
4 "testingscip-go gomod github.com/golang/go/src go1.25 testing/"
5
6 "github.com/tomwright/dasel/v3/modelscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/"
7 )
8
9 func TestFuncFlattenscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/execution_test`/TestFuncFlatten().(t *testingscip-go gomod github.com/golang/go/src go1.25 testing/.Tscip-go gomod github.com/golang/go/src go1.25 testing/T#) {
10 t.Runscip-go gomod github.com/golang/go/src go1.25 testing/T#Run().("nested arrays", testCasescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/execution_test`/testCase#{
11 sscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/execution_test`/testCase#s.: `flatten([[1, 2], [3, 4]])`,
12 outFnscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/execution_test`/testCase#outFn.: func() *modelscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/.Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value# {
13 r := modelscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/.NewSliceValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewSliceValue().()
14 for _, v := range []int64{1, 2, 3, 4} {
15 if err := r.Appendscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#Append().(modelscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/.NewIntValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewIntValue().(v)); err != nil {
16 panic(err)
17 }
18 }
19 return r
20 },
21 }.runscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/execution_test`/testCase#run().)
22 t.Runscip-go gomod github.com/golang/go/src go1.25 testing/T#Run().("mixed nested and flat", testCasescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/execution_test`/testCase#{
23 sscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/execution_test`/testCase#s.: `flatten([1, [2, 3], 4])`,
24 outFnscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/execution_test`/testCase#outFn.: func() *modelscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/.Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value# {
25 r := modelscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/.NewSliceValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewSliceValue().()
26 for _, v := range []int64{1, 2, 3, 4} {
27 if err := r.Appendscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#Append().(modelscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/.NewIntValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewIntValue().(v)); err != nil {
28 panic(err)
29 }
30 }
31 return r
32 },
33 }.runscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/execution_test`/testCase#run().)
34 t.Runscip-go gomod github.com/golang/go/src go1.25 testing/T#Run().("already flat", testCasescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/execution_test`/testCase#{
35 sscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/execution_test`/testCase#s.: `flatten([1, 2, 3])`,
36 outFnscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/execution_test`/testCase#outFn.: func() *modelscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/.Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value# {
37 r := modelscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/.NewSliceValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewSliceValue().()
38 for _, v := range []int64{1, 2, 3} {
39 if err := r.Appendscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#Append().(modelscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/.NewIntValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewIntValue().(v)); err != nil {
40 panic(err)
41 }
42 }
43 return r
44 },
45 }.runscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/execution_test`/testCase#run().)
46 t.Runscip-go gomod github.com/golang/go/src go1.25 testing/T#Run().("chained", testCasescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/execution_test`/testCase#{
47 sscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/execution_test`/testCase#s.: `[[1, 2], [3, 4]].flatten()`,
48 outFnscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/execution_test`/testCase#outFn.: func() *modelscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/.Valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value# {
49 r := modelscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/.NewSliceValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewSliceValue().()
50 for _, v := range []int64{1, 2, 3, 4} {
51 if err := r.Appendscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#Append().(modelscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/.NewIntValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewIntValue().(v)); err != nil {
52 panic(err)
53 }
54 }
55 return r
56 },
57 }.runscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/execution_test`/testCase#run().)
58 }