Skip to content

Commit

Permalink
Split up casting UI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
phansch committed Jan 5, 2018
1 parent 29c6093 commit 94f8fc3
Show file tree
Hide file tree
Showing 8 changed files with 371 additions and 346 deletions.
49 changes: 0 additions & 49 deletions tests/ui/cast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,36 +25,6 @@ fn main() {
1u32 as i32;
1u64 as i64;
1usize as isize;
// Test cast_lossless with casts to integer types
1i8 as i16;
1i8 as i32;
1i8 as i64;
1u8 as i16;
1u8 as i32;
1u8 as i64;
1u8 as u16;
1u8 as u32;
1u8 as u64;
1i16 as i32;
1i16 as i64;
1u16 as i32;
1u16 as i64;
1u16 as u32;
1u16 as u64;
1i32 as i64;
1u32 as i64;
1u32 as u64;
// Test cast_lossless with casts to floating-point types
1i8 as f32;
1i8 as f64;
1u8 as f32;
1u8 as f64;
1i16 as f32;
1i16 as f64;
1u16 as f32;
1u16 as f64;
1i32 as f64;
1u32 as f64;
// Test cast_lossless with casts from floating-point types
1.0f32 as f64;
// Test cast_lossless with an expression wrapped in parens
Expand All @@ -63,25 +33,6 @@ fn main() {
1i32 as u32;
1isize as usize;
// Extra checks for *size
// Casting from *size
1isize as i8;
1isize as f64;
1usize as f64;
1isize as f32;
1usize as f32;
1isize as i32;
1isize as u32;
1usize as u32;
1usize as i32;
// Casting to *size
1i64 as isize;
1i64 as usize;
1u64 as isize;
1u64 as usize;
1u32 as isize;
1u32 as usize; // Should not trigger any lint
1i32 as isize; // Neither should this
1i32 as usize;
// Test cast_unnecessary
1i32 as i32;
1f32 as f32;
Expand Down
Loading

0 comments on commit 94f8fc3

Please sign in to comment.