MCPcopy Index your code
hub / github.com/google/mangle / TestSortIndexInto

Function TestSortIndexInto

ast/ast_test.go:176–184  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

174}
175
176func TestSortIndexInto(t *testing.T) {
177 keys := []*Constant{&fooName, &barString, &fooBarPair}
178 index := make([]int, len(keys))
179 SortIndexInto(keys, index)
180 want := []int{2, 1, 0}
181 if !cmp.Equal(index, want) {
182 t.Errorf("SortIndexInto(%v) got %v want %v", keys, index, want)
183 }
184}
185
186func TestEqualsNegative(t *testing.T) {
187 tests := []struct {

Callers

nothing calls this directly

Calls 1

SortIndexIntoFunction · 0.85

Tested by

no test coverage detected