Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The test_within_radius test sometimes fails. #1

Open
kennytm opened this issue Aug 29, 2017 · 0 comments
Open

The test_within_radius test sometimes fails. #1

kennytm opened this issue Aug 29, 2017 · 0 comments

Comments

@kennytm
Copy link

kennytm commented Aug 29, 2017

The failure rate is around 6% (3 in 50) on macOS. The failing items all have the form [4,3,5,2,6,x,x,x].

Example test cases:

(1)

---- test::test_within_radius stdout ----
	Tree: VpTree { len: 8 }
Items: [4, 3, 5, 2, 6, 7, 1, 0]
Structure:
[ 4(2) ] 
[ 3(1) 7(1) ] 
[ 5(1) 6(0) ] [ 1(1) _ ] 
[ 2(0) _ ] [ _ _ ] [ 0(0) _ ] [ _ _ ] 

Within radius (2): [Neighbor { item: 4, dist: 0 }, Neighbor { item: 3, dist: 1 }, Neighbor { item: 5, dist: 1 }, Neighbor { item: 6, dist: 2 }, Neighbor { item: 2, dist: 2 }, Neighbor { item: 7, dist: 3 }]
thread 'test::test_within_radius' panicked at 'Was not expecting Neighbor { item: 7, dist: 3 }', src/lib.rs:508:12
note: Run with `RUST_BACKTRACE=1` for a backtrace.

(2)

---- test::test_within_radius stdout ----
	Tree: VpTree { len: 8 }
Items: [4, 3, 5, 2, 6, 1, 7, 0]
Structure:
[ 4(2) ] 
[ 3(1) 1(1) ] 
[ 5(1) 6(0) ] [ 7(1) _ ] 
[ 2(0) _ ] [ _ _ ] [ 0(0) _ ] [ _ _ ] 

Within radius (2): [Neighbor { item: 4, dist: 0 }, Neighbor { item: 3, dist: 1 }, Neighbor { item: 5, dist: 1 }, Neighbor { item: 6, dist: 2 }, Neighbor { item: 2, dist: 2 }, Neighbor { item: 1, dist: 3 }]
thread 'test::test_within_radius' panicked at 'Was not expecting Neighbor { item: 1, dist: 3 }', src/lib.rs:508:12
note: Run with `RUST_BACKTRACE=1` for a backtrace.

(3)

---- test::test_within_radius stdout ----
	Tree: VpTree { len: 8 }
Items: [4, 3, 5, 2, 6, 0, 1, 7]
Structure:
[ 4(2) ] 
[ 3(1) 0(1) ] 
[ 5(1) 6(0) ] [ 1(1) _ ] 
[ 2(0) _ ] [ _ _ ] [ 7(0) _ ] [ _ _ ] 

Within radius (2): [Neighbor { item: 4, dist: 0 }, Neighbor { item: 3, dist: 1 }, Neighbor { item: 5, dist: 1 }, Neighbor { item: 6, dist: 2 }, Neighbor { item: 2, dist: 2 }, Neighbor { item: 1, dist: 3 }]
thread 'test::test_within_radius' panicked at 'Was not expecting Neighbor { item: 1, dist: 3 }', src/lib.rs:508:12
note: Run with `RUST_BACKTRACE=1` for a backtrace.

Tested with vec-vp-tree = "0.2.0-alpha.1" on crates.io.

$ rustc -vV
rustc 1.21.0-nightly (e26688824 2017-08-27)
binary: rustc
commit-hash: e2668882406b68739c6ed33d420358d5d710e67b
commit-date: 2017-08-27
host: x86_64-apple-darwin
release: 1.21.0-nightly
LLVM version: 4.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant