This commit is contained in:
xing 2023-08-26 22:03:49 +08:00
parent bc71be7238
commit 2302aa7ff8

View File

@ -113,7 +113,7 @@ func TestGetStrMapAnyValWithAny(t *testing.T) {
}
for _, tt := range tests {
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) {
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}}}
for _, tt := range tests {
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) {
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}}}
for _, tt := range tests {
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) {
t.Fatal()
}