func compareCoordDistSets(t *testing.T, actualCoords []Item, expectedCoords []Item, actualDists, expectedDists []float64) {
	if len(actualCoords) != len(expectedCoords) {
		t.Fatalf("Expected %v coordinates, got %v", len(expectedCoords), len(actualCoords))
	}

	if len(actualDists) != len(expectedDists) {
		t.Fatalf("Expected %v distances, got %v", len(expectedDists), len(actualDists))
	}

	for i := 0; i < len(actualCoords); i++ {
		if actualCoords[i] != expectedCoords[i] {
			t.Fatalf("Expected actualCoords[%v] to be %x, got %x", i, expectedCoords[i], actualCoords[i])
		}
		if actualDists[i] != expectedDists[i] {
			t.Fatalf("Expected actualDists[%v] to be %v, got %v", i, expectedDists[i], actualDists[i])
		}
	}
}
// This helper function compares two sets of coordinates/distances to make sure
// they are the same.
This helper function compares two sets of coordinates/distances to make sure
they are the same.
// This helper function compares two sets of coordinates / distances to make sure // they are the same .
func compareCoordDistSets(t *testing.T, actualCoords []Item, expectedCoords []Item, actualDists, expectedDists []float64) {
	if len(actualCoords) != len(expectedCoords) {
		t.Fatalf("Expected %v coordinates, got %v", len(expectedCoords), len(actualCoords))
	}
	if len(actualDists) != len(expectedDists) {
		t.Fatalf("Expected %v distances, got %v", len(expectedDists), len(actualDists))
	}
	for i := 0; i < len(actualCoords); i++ {
		if actualCoords[i] != expectedCoords[i] {
			t.Fatalf("Expected actualCoords[%v] to be %x, got %x", i, expectedCoords[i], actualCoords[i])
		}
		if actualDists[i] != expectedDists[i] {
			t.Fatalf("Expected actualDists[%v] to be %v, got %v", i, expectedDists[i], actualDists[i])
		}
	}
}
func compareCoordDistSets ( t * testing . T , actualCoords [ ] Item , expectedCoords [ ] Item , actualDists , expectedDists [ ] float64 ) { if len ( actualCoords ) != len ( expectedCoords ) { t . Fatalf ( " " , len ( expectedCoords ) , len ( actualCoords ) ) } if len ( actualDists ) != len ( expectedDists ) { t . Fatalf ( " " , len ( expectedDists ) , len ( actualDists ) ) } for i := 0 ; i < len ( actualCoords ) ; i ++ { if actualCoords [ i ] != expectedCoords [ i ] { t . Fatalf ( " " , i , expectedCoords [ i ] , actualCoords [ i ] ) } if actualDists [ i ] != expectedDists [ i ] { t . Fatalf ( " " , i , expectedDists [ i ] , actualDists [ i ] ) } } }
This helper function compares two sets of coordinates/distances to make sure
they are the same.
This helper function compares two sets of coordinates / distances to make sure they are the same .