diff options
| author | Linus Färnstrand <faern@faern.net> | 2020-04-06 23:09:17 +0200 |
|---|---|---|
| committer | Linus Färnstrand <faern@faern.net> | 2020-04-07 00:43:15 +0200 |
| commit | cf8df0157ac0e537b4948d7487bb50519464ecc2 (patch) | |
| tree | b995f979505c5afd6c26fd4f5d3624bd3defe670 /src/libserialize/tests | |
| parent | 68b1af66244bf3486dea3f23d7b90bf410032230 (diff) | |
| download | rust-cf8df0157ac0e537b4948d7487bb50519464ecc2.tar.gz rust-cf8df0157ac0e537b4948d7487bb50519464ecc2.zip | |
Use assoc integer constants in libserialize
Diffstat (limited to 'src/libserialize/tests')
| -rw-r--r-- | src/libserialize/tests/opaque.rs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/libserialize/tests/opaque.rs b/src/libserialize/tests/opaque.rs index aa099bb8a36..a6ec1580aca 100644 --- a/src/libserialize/tests/opaque.rs +++ b/src/libserialize/tests/opaque.rs @@ -53,7 +53,7 @@ fn test_unit() { #[test] fn test_u8() { let mut vec = vec![]; - for i in ::std::u8::MIN..::std::u8::MAX { + for i in u8::MIN..u8::MAX { vec.push(i); } check_round_trip(vec); @@ -61,30 +61,30 @@ fn test_u8() { #[test] fn test_u16() { - for i in ::std::u16::MIN..::std::u16::MAX { + for i in u16::MIN..u16::MAX { check_round_trip(vec![1, 2, 3, i, i, i]); } } #[test] fn test_u32() { - check_round_trip(vec![1, 2, 3, ::std::u32::MIN, 0, 1, ::std::u32::MAX, 2, 1]); + check_round_trip(vec![1, 2, 3, u32::MIN, 0, 1, u32::MAX, 2, 1]); } #[test] fn test_u64() { - check_round_trip(vec![1, 2, 3, ::std::u64::MIN, 0, 1, ::std::u64::MAX, 2, 1]); + check_round_trip(vec![1, 2, 3, u64::MIN, 0, 1, u64::MAX, 2, 1]); } #[test] fn test_usize() { - check_round_trip(vec![1, 2, 3, ::std::usize::MIN, 0, 1, ::std::usize::MAX, 2, 1]); + check_round_trip(vec![1, 2, 3, usize::MIN, 0, 1, usize::MAX, 2, 1]); } #[test] fn test_i8() { let mut vec = vec![]; - for i in ::std::i8::MIN..::std::i8::MAX { + for i in i8::MIN..i8::MAX { vec.push(i); } check_round_trip(vec); @@ -92,24 +92,24 @@ fn test_i8() { #[test] fn test_i16() { - for i in ::std::i16::MIN..::std::i16::MAX { + for i in i16::MIN..i16::MAX { check_round_trip(vec![-1, 2, -3, i, i, i, 2]); } } #[test] fn test_i32() { - check_round_trip(vec![-1, 2, -3, ::std::i32::MIN, 0, 1, ::std::i32::MAX, 2, 1]); + check_round_trip(vec![-1, 2, -3, i32::MIN, 0, 1, i32::MAX, 2, 1]); } #[test] fn test_i64() { - check_round_trip(vec![-1, 2, -3, ::std::i64::MIN, 0, 1, ::std::i64::MAX, 2, 1]); + check_round_trip(vec![-1, 2, -3, i64::MIN, 0, 1, i64::MAX, 2, 1]); } #[test] fn test_isize() { - check_round_trip(vec![-1, 2, -3, ::std::isize::MIN, 0, 1, ::std::isize::MAX, 2, 1]); + check_round_trip(vec![-1, 2, -3, isize::MIN, 0, 1, isize::MAX, 2, 1]); } #[test] |
