MCPcopy
hub / github.com/go-task/task / TestNoSort_Sort

Function TestNoSort_Sort

internal/sort/sorter_test.go:83–113  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

81}
82
83func TestNoSort_Sort(t *testing.T) {
84 t.Parallel()
85
86 item1 := "a-item1"
87 item2 := "m-item2"
88 item3 := "ns1:item3"
89 item4 := "ns2:item4"
90 item5 := "z-item5"
91 item6 := "ns3:item6"
92
93 tests := []struct {
94 name string
95 items []string
96 want []string
97 }{
98 {
99 name: "all items in order of definition",
100 items: []string{item3, item2, item5, item1, item4, item6},
101 want: []string{item3, item2, item5, item1, item4, item6},
102 },
103 }
104
105 for _, tt := range tests {
106 t.Run(tt.name, func(t *testing.T) {
107 t.Parallel()
108
109 NoSort(tt.items, nil)
110 assert.Equal(t, tt.want, tt.items)
111 })
112 }
113}

Callers

nothing calls this directly

Calls 2

NoSortFunction · 0.85
RunMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…