fix
This commit is contained in:
parent
bc71be7238
commit
2302aa7ff8
|
@ -113,7 +113,7 @@ func TestGetStrMapAnyValWithAny(t *testing.T) {
|
||||||
}
|
}
|
||||||
for _, tt := range tests {
|
for _, tt := range tests {
|
||||||
t.Run(tt.name, func(t *testing.T) {
|
t.Run(tt.name, func(t *testing.T) {
|
||||||
gotR, gotO := GetStrMapAnyValWithAny(tt.args.key, tt.args.v)
|
gotR, gotO := GetStrMapAnyValWithAny(tt.args.v, tt.args.key)
|
||||||
if !reflect.DeepEqual(gotR, tt.wantR) {
|
if !reflect.DeepEqual(gotR, tt.wantR) {
|
||||||
t.Errorf("GetStrMapAnyValWithAny() gotR = %v, want %v", gotR, tt.wantR)
|
t.Errorf("GetStrMapAnyValWithAny() gotR = %v, want %v", gotR, tt.wantR)
|
||||||
}
|
}
|
||||||
|
@ -240,7 +240,7 @@ func TestRecursiveSetAnyVal(t *testing.T) {
|
||||||
target := map[any]any{"m": map[any]any{3: map[any]any{"key": 3.4}}}
|
target := map[any]any{"m": map[any]any{3: map[any]any{"key": 3.4}}}
|
||||||
for _, tt := range tests {
|
for _, tt := range tests {
|
||||||
t.Run(tt.name, func(t *testing.T) {
|
t.Run(tt.name, func(t *testing.T) {
|
||||||
RecursiveSetAnyVal(tt.args.m, tt.args.v, tt.args.k...)
|
SetAnyAnyVal(tt.args.m, tt.args.v, tt.args.k...)
|
||||||
if !reflect.DeepEqual(tt.args.m, target) {
|
if !reflect.DeepEqual(tt.args.m, target) {
|
||||||
t.Fatalf("not equal target")
|
t.Fatalf("not equal target")
|
||||||
}
|
}
|
||||||
|
@ -287,7 +287,7 @@ func TestRecursiveSetStrVal(t *testing.T) {
|
||||||
target := map[string]any{"aa": map[string]any{"bb": map[string]any{"cc": 1}}}
|
target := map[string]any{"aa": map[string]any{"bb": map[string]any{"cc": 1}}}
|
||||||
for _, tt := range tests {
|
for _, tt := range tests {
|
||||||
t.Run(tt.name, func(t *testing.T) {
|
t.Run(tt.name, func(t *testing.T) {
|
||||||
RecursiveSetStrVal(tt.args.m, tt.args.k, tt.args.v)
|
SetStrAnyVal(tt.args.m, tt.args.k, tt.args.v)
|
||||||
if !reflect.DeepEqual(target, tt.args.m) {
|
if !reflect.DeepEqual(target, tt.args.m) {
|
||||||
t.Fatal()
|
t.Fatal()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user