Skip to content

Commit

Permalink
move from_nonzero test from run-pass to libcore
Browse files Browse the repository at this point in the history
  • Loading branch information
csmoe committed Sep 17, 2018
1 parent ac61a9c commit 95c1d81
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 deletions.
7 changes: 7 additions & 0 deletions src/libcore/tests/nonzero.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,10 @@ fn test_match_nonzero_const_pattern() {
_ => panic!("Expected the const item as a pattern to match.")
}
}

#[test]
fn test_from_nonzero() {
let nz = NonZeroU32::new(1).unwrap();
let num: u32 = nz.into();
assert_eq!(num, 1u32);
}
16 changes: 0 additions & 16 deletions src/test/run-pass/nonzero.rs

This file was deleted.

0 comments on commit 95c1d81

Please sign in to comment.