| 1 | package model_testscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_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 | type setTestCasescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase# struct { |
| 10 | valueFnscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#valueFn. 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# |
| 11 | valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#value. *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# |
| 12 | newValueFnscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#newValueFn. 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 | newValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#newValue. *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# |
| 14 | } |
| 15 | |
| 16 | func (tc setTestCasescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#) runscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#run().(t *testingscip-go gomod github.com/golang/go/src go1.25 testing/.Tscip-go gomod github.com/golang/go/src go1.25 testing/T#) { |
| 17 | val := tc.valuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#value. |
| 18 | if tc.valueFnscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#valueFn. != nil { |
| 19 | val = tc.valueFnscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#valueFn.() |
| 20 | } |
| 21 | newVal := tc.newValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#newValue. |
| 22 | if tc.newValueFnscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#newValueFn. != nil { |
| 23 | newVal = tc.newValueFnscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#newValueFn.() |
| 24 | } |
| 25 | if err := val.Setscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#Set().(newVal); err != nil { |
| 26 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().("unexpected error: %s", err) |
| 27 | return |
| 28 | } |
| 29 | |
| 30 | eq, err := val.EqualTypeValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#EqualTypeValue().(newVal) |
| 31 | if err != nil { |
| 32 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().("unexpected error: %s", err) |
| 33 | return |
| 34 | } |
| 35 | if !eq { |
| 36 | t.Errorfscip-go gomod github.com/golang/go/src go1.25 testing/common#Errorf().("expected values to be equal") |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | func TestValue_Setscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/TestValue_Set().(t *testingscip-go gomod github.com/golang/go/src go1.25 testing/.Tscip-go gomod github.com/golang/go/src go1.25 testing/T#) { |
| 41 | testCases := []struct { |
| 42 | name string |
| 43 | stringValue 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# |
| 44 | intValue 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# |
| 45 | floatValue 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# |
| 46 | boolValue 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# |
| 47 | mapValue 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# |
| 48 | sliceValue 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 | nullValue 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# |
| 50 | }{ |
| 51 | { |
| 52 | name: "model constructor", |
| 53 | stringValue: 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# { |
| 54 | return modelscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/.NewStringValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewStringValue().("hello") |
| 55 | }, |
| 56 | intValue: 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# { |
| 57 | return 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().(1) |
| 58 | }, |
| 59 | floatValue: 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# { |
| 60 | return modelscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/.NewFloatValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewFloatValue().(1) |
| 61 | }, |
| 62 | boolValue: 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# { |
| 63 | return modelscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/.NewBoolValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewBoolValue().(true) |
| 64 | }, |
| 65 | mapValue: 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# { |
| 66 | res := modelscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/.NewMapValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewMapValue().() |
| 67 | if err := res.SetMapKeyscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#SetMapKey().("greeting", modelscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/.NewStringValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewStringValue().("hello")); err != nil { |
| 68 | t.Fatalscip-go gomod github.com/golang/go/src go1.25 testing/common#Fatal().(err) |
| 69 | } |
| 70 | return res |
| 71 | }, |
| 72 | sliceValue: 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# { |
| 73 | res := 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().() |
| 74 | if err := res.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`/.NewStringValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewStringValue().("hello")); err != nil { |
| 75 | t.Fatalscip-go gomod github.com/golang/go/src go1.25 testing/common#Fatal().(err) |
| 76 | } |
| 77 | return res |
| 78 | }, |
| 79 | nullValue: 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# { |
| 80 | return modelscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/.NewNullValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewNullValue().() |
| 81 | }, |
| 82 | }, |
| 83 | { |
| 84 | name: "go types non ptr", |
| 85 | stringValue: 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# { |
| 86 | v := "hello" |
| 87 | return modelscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/.NewValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewValue().(v) |
| 88 | }, |
| 89 | intValue: 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# { |
| 90 | v := int64(1) |
| 91 | return modelscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/.NewValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewValue().(v) |
| 92 | }, |
| 93 | floatValue: 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# { |
| 94 | v := 1.0 |
| 95 | return modelscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/.NewValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewValue().(v) |
| 96 | }, |
| 97 | boolValue: 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# { |
| 98 | v := true |
| 99 | return modelscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/.NewValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewValue().(v) |
| 100 | }, |
| 101 | mapValue: 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# { |
| 102 | v := map[string]interface{}{ |
| 103 | "greeting": "hello", |
| 104 | } |
| 105 | return modelscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/.NewValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewValue().(v) |
| 106 | }, |
| 107 | sliceValue: 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# { |
| 108 | v := []interface{}{ |
| 109 | "hello", |
| 110 | } |
| 111 | return modelscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/.NewValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewValue().(v) |
| 112 | }, |
| 113 | nullValue: 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# { |
| 114 | return modelscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/.NewValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewValue().(nil) |
| 115 | }, |
| 116 | }, |
| 117 | { |
| 118 | name: "go types ptr", |
| 119 | stringValue: 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# { |
| 120 | v := "hello" |
| 121 | return modelscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/.NewValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewValue().(&v) |
| 122 | }, |
| 123 | intValue: 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# { |
| 124 | v := int64(1) |
| 125 | return modelscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/.NewValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewValue().(&v) |
| 126 | }, |
| 127 | floatValue: 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# { |
| 128 | v := 1.0 |
| 129 | return modelscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/.NewValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewValue().(&v) |
| 130 | }, |
| 131 | boolValue: 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# { |
| 132 | v := true |
| 133 | return modelscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/.NewValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewValue().(&v) |
| 134 | }, |
| 135 | mapValue: 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# { |
| 136 | v := map[string]interface{}{ |
| 137 | "greeting": "hello", |
| 138 | } |
| 139 | return modelscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/.NewValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewValue().(&v) |
| 140 | }, |
| 141 | sliceValue: 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# { |
| 142 | v := []interface{}{ |
| 143 | "hello", |
| 144 | } |
| 145 | return modelscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/.NewValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewValue().(&v) |
| 146 | }, |
| 147 | nullValue: 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# { |
| 148 | var x any |
| 149 | return modelscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/.NewValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewValue().(&x) |
| 150 | }, |
| 151 | }, |
| 152 | } |
| 153 | |
| 154 | for _, testCase := range testCases { |
| 155 | tc := testCase |
| 156 | t.Runscip-go gomod github.com/golang/go/src go1.25 testing/T#Run().(tc.name, func(t *testingscip-go gomod github.com/golang/go/src go1.25 testing/.Tscip-go gomod github.com/golang/go/src go1.25 testing/T#) { |
| 157 | t.Runscip-go gomod github.com/golang/go/src go1.25 testing/T#Run().("string", setTestCasescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#{ |
| 158 | valueFnscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#valueFn.: tc.stringValue, |
| 159 | newValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#newValue.: modelscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/.NewStringValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewStringValue().("world"), |
| 160 | }.runscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#run().) |
| 161 | t.Runscip-go gomod github.com/golang/go/src go1.25 testing/T#Run().("int", setTestCasescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#{ |
| 162 | valueFnscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#valueFn.: tc.intValue, |
| 163 | newValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#newValue.: 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().(2), |
| 164 | }.runscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#run().) |
| 165 | t.Runscip-go gomod github.com/golang/go/src go1.25 testing/T#Run().("float", setTestCasescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#{ |
| 166 | valueFnscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#valueFn.: tc.floatValue, |
| 167 | newValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#newValue.: modelscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/.NewFloatValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewFloatValue().(2), |
| 168 | }.runscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#run().) |
| 169 | t.Runscip-go gomod github.com/golang/go/src go1.25 testing/T#Run().("bool", setTestCasescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#{ |
| 170 | valueFnscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#valueFn.: tc.boolValue, |
| 171 | newValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#newValue.: modelscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/.NewBoolValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewBoolValue().(false), |
| 172 | }.runscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#run().) |
| 173 | t.Runscip-go gomod github.com/golang/go/src go1.25 testing/T#Run().("map", setTestCasescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#{ |
| 174 | valueFnscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#valueFn.: tc.mapValue, |
| 175 | newValueFnscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#newValueFn.: 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# { |
| 176 | res := modelscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/.NewMapValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewMapValue().() |
| 177 | if err := res.SetMapKeyscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#SetMapKey().("greeting", modelscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/.NewStringValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewStringValue().("world")); err != nil { |
| 178 | t.Fatalscip-go gomod github.com/golang/go/src go1.25 testing/common#Fatal().(err) |
| 179 | } |
| 180 | return res |
| 181 | }, |
| 182 | }.runscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#run().) |
| 183 | t.Runscip-go gomod github.com/golang/go/src go1.25 testing/T#Run().("slice", setTestCasescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#{ |
| 184 | valueFnscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#valueFn.: tc.sliceValue, |
| 185 | newValueFnscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#newValueFn.: 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# { |
| 186 | res := 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().() |
| 187 | if err := res.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`/.NewStringValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewStringValue().("world")); err != nil { |
| 188 | t.Fatalscip-go gomod github.com/golang/go/src go1.25 testing/common#Fatal().(err) |
| 189 | } |
| 190 | return res |
| 191 | }, |
| 192 | }.runscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#run().) |
| 193 | t.Runscip-go gomod github.com/golang/go/src go1.25 testing/T#Run().("string over int", setTestCasescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#{ |
| 194 | valueFnscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#valueFn.: tc.intValue, |
| 195 | newValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#newValue.: modelscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/.NewStringValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewStringValue().("world"), |
| 196 | }.runscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#run().) |
| 197 | t.Runscip-go gomod github.com/golang/go/src go1.25 testing/T#Run().("int over float", setTestCasescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#{ |
| 198 | valueFnscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#valueFn.: tc.floatValue, |
| 199 | newValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#newValue.: 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().(2), |
| 200 | }.runscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#run().) |
| 201 | t.Runscip-go gomod github.com/golang/go/src go1.25 testing/T#Run().("float over bool", setTestCasescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#{ |
| 202 | valueFnscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#valueFn.: tc.boolValue, |
| 203 | newValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#newValue.: modelscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/.NewFloatValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewFloatValue().(2), |
| 204 | }.runscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#run().) |
| 205 | t.Runscip-go gomod github.com/golang/go/src go1.25 testing/T#Run().("bool over map", setTestCasescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#{ |
| 206 | valueFnscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#valueFn.: tc.mapValue, |
| 207 | newValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#newValue.: modelscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/.NewBoolValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewBoolValue().(true), |
| 208 | }.runscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#run().) |
| 209 | t.Runscip-go gomod github.com/golang/go/src go1.25 testing/T#Run().("map over slice", setTestCasescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#{ |
| 210 | valueFnscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#valueFn.: tc.sliceValue, |
| 211 | newValueFnscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#newValueFn.: 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# { |
| 212 | res := modelscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/.NewMapValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewMapValue().() |
| 213 | if err := res.SetMapKeyscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/Value#SetMapKey().("greeting", modelscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/.NewStringValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewStringValue().("world")); err != nil { |
| 214 | t.Fatalscip-go gomod github.com/golang/go/src go1.25 testing/common#Fatal().(err) |
| 215 | } |
| 216 | return res |
| 217 | }, |
| 218 | }.runscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#run().) |
| 219 | t.Runscip-go gomod github.com/golang/go/src go1.25 testing/T#Run().("string over slice", setTestCasescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#{ |
| 220 | valueFnscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#valueFn.: tc.sliceValue, |
| 221 | newValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#newValue.: modelscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/.NewStringValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewStringValue().("world"), |
| 222 | }.runscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#run().) |
| 223 | t.Runscip-go gomod github.com/golang/go/src go1.25 testing/T#Run().("slice over map", setTestCasescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#{ |
| 224 | valueFnscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#valueFn.: tc.mapValue, |
| 225 | newValueFnscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#newValueFn.: 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# { |
| 226 | res := 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().() |
| 227 | if err := res.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`/.NewStringValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewStringValue().("world")); err != nil { |
| 228 | t.Fatalscip-go gomod github.com/golang/go/src go1.25 testing/common#Fatal().(err) |
| 229 | } |
| 230 | return res |
| 231 | }, |
| 232 | }.runscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#run().) |
| 233 | t.Runscip-go gomod github.com/golang/go/src go1.25 testing/T#Run().("string over null", setTestCasescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#{ |
| 234 | valueFnscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#valueFn.: tc.nullValue, |
| 235 | newValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#newValue.: modelscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/.NewStringValuescip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model`/NewStringValue().("world"), |
| 236 | }.runscip-go gomod github.com/tomwright/dasel/v3 . `github.com/tomwright/dasel/v3/model_test`/setTestCase#run().) |
| 237 | }) |
| 238 | } |
| 239 | } |