Commits

Anonymous committed 43cc047

sort values

Comments (0)

Files changed (1)

sorting/sort_test.go

 }
 
 func TestCountingSort(t *testing.T) {
-	array := []uint{19, 2, 23, 0, 24, 7, 11, 22, 4, 21, 21, 2}
+	array := []uint{15, 9, 8, 1, 4, 11, 7, 12, 13, 6, 5, 3, 16, 2, 10, 14}
 	CountingSort(array)
 	if !is_sorted2(array) {
 		t.Fail()
 }
 
 func TestHeapSort(t *testing.T) {
-	array := []int{88, 54, 37, 28, 9, 2, 1, 7, 19, 2, 23, 0, 24, 7, 11, 22, 4, 21, 21, 52}
+	array := []int{15, 9, 8, 1, 4, 11, 7, 12, 13, 6, 5, 3, 16, 2, 10, 14}
 	HeapSort(array)
 	if !is_sorted(array) {
 		t.Fail()
 }
 
 func TestInsertionSort(t *testing.T) {
-	array := []int{88, 54, 37, 28, 9, 2, 1}
+	array := []int{15, 9, 8, 1, 4, 11, 7, 12, 13, 6, 5, 3, 16, 2, 10, 14}
 	InsertionSort(array)
 	if !is_sorted(array) {
 		t.Fail()
 }
 
 func TestMedianSort(t *testing.T) {
-	array := []int{89, 606, 533, 1999, 3, 1, 22, 604, 605, 77}
+	array := []int{15, 9, 8, 1, 4, 11, 7, 12, 13, 6, 5, 3, 16, 2, 10, 14}
 	MedianSort(array)
 	if !is_sorted(array) {
 		t.Fail()
 }
 
 func TestQuickSort(t *testing.T) {
-	array := []int{89, 606, 533, 1999, 3, 1, 22, 604, 605, 77}
+	array := []int{15, 9, 8, 1, 4, 11, 7, 12, 13, 6, 5, 3, 16, 2, 10, 14}
 	MedianSort(array)
 	if !is_sorted(array) {
 		t.Fail()
 }
 
 func TestSelectionSort(t *testing.T) {
-	array := []int{19, 2, 23, 0, 24, 7, 11, 22, 4, 21, 21, 2}
+	array := []int{15, 9, 8, 1, 4, 11, 7, 12, 13, 6, 5, 3, 16, 2, 10, 14}
 	SelectionSort(array)
 	if !is_sorted(array) {
 		t.Fail()
 }
 
 func TestBucketSort(t *testing.T) {
-	array := []int{7, 5, 3, 13, 2, 14, 1, 6}
+	array := []int{15, 9, 8, 1, 4, 11, 7, 12, 13, 6, 5, 3, 16, 2, 10, 14}
 	BucketSort(array)
 	if !is_sorted(array) {
 		t.Fail()