MCPcopy Create free account
hub / github.com/appleboy/CodeGPT / TestConvertToMap

Function TestConvertToMap

util/util_test.go:53–83  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

51}
52
53func TestConvertToMap(t *testing.T) {
54 type args struct {
55 args []string
56 }
57 tests := []struct {
58 name string
59 args args
60 want Data
61 }{
62 {
63 name: "convert slice to map",
64 args: args{
65 []string{
66 "TICKET_ID=ABC-1234",
67 "Name=John Doe",
68 },
69 },
70 want: Data{
71 "Name": "John Doe",
72 "TICKET_ID": "ABC-1234",
73 },
74 },
75 }
76 for _, tt := range tests {
77 t.Run(tt.name, func(t *testing.T) {
78 if got := ConvertToMap(tt.args.args); !reflect.DeepEqual(got, tt.want) {
79 t.Errorf("ConvertToMap() = %v, want %v", got, tt.want)
80 }
81 })
82 }
83}

Callers

nothing calls this directly

Calls 1

ConvertToMapFunction · 0.85

Tested by

no test coverage detected