示例#1
0
func TestSorter(t *testing.T) {
	shuffle()
	bitonic.Sort(lst, bitonic.SORT_ASC)

	prev := lst[0]
	for _, i := range lst {
		if prev > i {
			t.Fatal("failed to confirm ASC sorting")
		}
	}
}
示例#2
0
func BenchmarkSorter(b *testing.B) {
	shuffle()
	bitonic.Sort(lst, bitonic.SORT_ASC)
}