From 0d8e8eb5332118b62a834ef216592d93a82f7b4d Mon Sep 17 00:00:00 2001 From: Alexander Sikorski Date: Mon, 25 Oct 2021 23:12:15 +0200 Subject: [PATCH] test for BoundsError on `skip = i -> true` https://github.com/KristofferC/NearestNeighbors.jl/issues/127 --- test/test_knn.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/test_knn.jl b/test/test_knn.jl index 3648ae5..3fbfa49 100644 --- a/test/test_knn.jl +++ b/test/test_knn.jl @@ -79,6 +79,8 @@ end idxs, dists = knn(tree, data[:, 10], 2, true, i -> i == first_idx) @test idxs[1] == second_idx + + idxs, dists = knn(tree, data[:,10], 1, true, i -> true) end data = rand(2, 1000) test(data)