Skip to content

Commit

Permalink
Thread stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
terrarier2111 committed Jul 20, 2023
1 parent 1d30029 commit f853507
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/thread_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,31 +221,26 @@ cfg_if::cfg_if! {
#[test]
fn test_thread() {
let thread = Thread::new(0);
assert_eq!(thread.id(), 0);
assert_eq!(thread.bucket(), 0);
assert_eq!(thread.bucket_size(), 1);
assert_eq!(thread.index(), 0);

let thread = Thread::new(1);
assert_eq!(thread.id(), 1);
assert_eq!(thread.bucket(), 1);
assert_eq!(thread.bucket_size(), 2);
assert_eq!(thread.index(), 0);

let thread = Thread::new(2);
assert_eq!(thread.id(), 2);
assert_eq!(thread.bucket(), 1);
assert_eq!(thread.bucket_size(), 2);
assert_eq!(thread.index(), 1);

let thread = Thread::new(3);
assert_eq!(thread.id(), 3);
assert_eq!(thread.bucket(), 2);
assert_eq!(thread.bucket_size(), 4);
assert_eq!(thread.index(), 0);

let thread = Thread::new(19);
assert_eq!(thread.id(), 19);
assert_eq!(thread.bucket(), 4);
assert_eq!(thread.bucket_size(), 16);
assert_eq!(thread.index(), 4);
Expand Down

0 comments on commit f853507

Please sign in to comment.