(t *testing.T)
| 107 | } |
| 108 | |
| 109 | func TestMergeSortedRandom(t *testing.T) { |
| 110 | createList := func(n int) *pb.List { |
| 111 | list := make([]uint64, n) |
| 112 | for i := range list { |
| 113 | list[i] = uint64(rand.Int63()) |
| 114 | } |
| 115 | sort.Slice(list, func(i, j int) bool { |
| 116 | return list[i] < list[j] |
| 117 | }) |
| 118 | return &pb.List{Uids: list} |
| 119 | } |
| 120 | |
| 121 | input := []*pb.List{} |
| 122 | for i := 0; i < 1000; i++ { |
| 123 | input = append(input, createList(1000)) |
| 124 | } |
| 125 | |
| 126 | require.Equal(t, MergeSorted(input).Uids, internalMergeSort(input).Uids) |
| 127 | } |
| 128 | |
| 129 | func TestMergeSorted7(t *testing.T) { |
| 130 | input := []*pb.List{ |
nothing calls this directly
no test coverage detected