func TestSmall(t *testing.T) {
	items := []Item{
		Item{0xdeadbeef, 57},
		Item{0xcabba9e5, 28},
		Item{0xcafebabe, 48},
		Item{0xc0cac0ca, 42},
	}

	target := uint64(0xcafef00d)

	itemsCopy := make([]Item, len(items))
	copy(itemsCopy, items)

	vp := New(itemsCopy)

	coords1, distances1 := vp.Search(target, 3)
	coords2, distances2 := nearestNeighbours(target, items, 3)

	compareCoordDistSets(t, coords1, coords2, distances1, distances2)
}
// This test creates a small VPTree and makes sure its search function returns
// the right results
This test creates a small VPTree and makes sure its search function returns
the right results
// This test creates a small VPTree and makes sure its search function returns // the right results
func TestSmall(t *testing.T) {
	items := []Item{
		Item{0xdeadbeef, 57},
		Item{0xcabba9e5, 28},
		Item{0xcafebabe, 48},
		Item{0xc0cac0ca, 42},
	}
	target := uint64(0xcafef00d)
	itemsCopy := make([]Item, len(items))
	copy(itemsCopy, items)
	vp := New(itemsCopy)
	coords1, distances1 := vp.Search(target, 3)
	coords2, distances2 := nearestNeighbours(target, items, 3)
	compareCoordDistSets(t, coords1, coords2, distances1, distances2)
}
func TestSmall ( t * testing . T ) { items := [ ] Item { Item { 0xdeadbeef , 57 } , Item { 0xcabba9e5 , 28 } , Item { 0xcafebabe , 48 } , Item { 0xc0cac0ca , 42 } , } target := uint64 ( 0xcafef00d ) itemsCopy := make ( [ ] Item , len ( items ) ) copy ( itemsCopy , items ) vp := New ( itemsCopy ) coords1 , distances1 := vp . Search ( target , 3 ) coords2 , distances2 := nearestNeighbours ( target , items , 3 ) compareCoordDistSets ( t , coords1 , coords2 , distances1 , distances2 ) }
This test creates a small VPTree and makes sure its search function returns
the right results
This test creates a small VPTree and makes sure its search function returns the right results