github.com/mdaxf/iac@v0.0.0-20240519030858-58a061660378/engine/function/subtc_test.go (about) 1 package funcs 2 3 import ( 4 "reflect" 5 "testing" 6 ) 7 8 func TestSubTranCodeFuncs_Execute(t *testing.T) { 9 type args struct { 10 f *Funcs 11 } 12 tests := []struct { 13 name string 14 cf *SubTranCodeFuncs 15 args args 16 }{ 17 // TODO: Add test cases. 18 } 19 for _, tt := range tests { 20 t.Run(tt.name, func(t *testing.T) { 21 tt.cf.Execute(tt.args.f) 22 }) 23 } 24 } 25 26 func Test_convertSliceToMap(t *testing.T) { 27 type args struct { 28 slice []interface{} 29 } 30 tests := []struct { 31 name string 32 args args 33 want map[string]interface{} 34 }{ 35 // TODO: Add test cases. 36 } 37 for _, tt := range tests { 38 t.Run(tt.name, func(t *testing.T) { 39 if got := convertSliceToMap(tt.args.slice); !reflect.DeepEqual(got, tt.want) { 40 t.Errorf("convertSliceToMap() = %v, want %v", got, tt.want) 41 } 42 }) 43 } 44 }