Skip to content

Commit

Permalink
Putting in test for issue #4
Browse files Browse the repository at this point in the history
  • Loading branch information
rsimmonsjr committed Aug 18, 2019
1 parent b8ed38a commit ca0af81
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,18 @@ mod tests {
F,
}

#[test]
fn test_clone_with_unclonable() {
// Issue #4 Prevents #[derive(Clone)] from being used because of a rust bug that
// thinks it needs to clone the T type and required manual cloning. If not fixed this
// test wouldn't compile.
struct Unclonable {}

let (sender, receiver) = create::<Unclonable>(5, 10);
let _s_clone = sender.clone();
let _r_clone = receiver.clone();
}

#[test]
fn test_send_and_receive() {
init_test_log();
Expand Down

0 comments on commit ca0af81

Please sign in to comment.