Skip to content

Commit

Permalink
TEST: Add test for Send/Sync of ArcArray.
Browse files Browse the repository at this point in the history
  • Loading branch information
bluss committed Jan 23, 2018
1 parent b4ec80a commit 482442b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/array-construct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ fn test_rc_into_owned() {
assert!(!a.all_close(&c, 0.01));
}

#[test]
fn test_arcarray_thread_safe() {
fn is_send<T: Send>(_t: &T) { }
fn is_sync<T: Sync>(_t: &T) { }
let a = Array2::from_elem((5, 5), 1.).into_shared();

is_send(&a);
is_sync(&a);
}

#[test]
fn test_uninit() {
unsafe {
Expand Down

0 comments on commit 482442b

Please sign in to comment.