Add SIMD vector type tests
This commit is contained in:
parent
c5a7be624a
commit
0e052f5685
2 changed files with 22 additions and 0 deletions
13
src/test/compile-fail/simd-type.rs
Normal file
13
src/test/compile-fail/simd-type.rs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#[simd]
|
||||
struct vec4<T>(T, T, T, T); //~ ERROR SIMD vector cannot be generic
|
||||
|
||||
#[simd]
|
||||
struct empty; //~ ERROR SIMD vector cannot be empty
|
||||
|
||||
#[simd]
|
||||
struct i64f64(i64, f64); //~ ERROR SIMD vector should be homogeneous
|
||||
|
||||
#[simd]
|
||||
struct int4(int, int, int, int); //~ ERROR SIMD vector element type should be machine type
|
||||
|
||||
fn main() {}
|
||||
9
src/test/run-pass/simd-type.rs
Normal file
9
src/test/run-pass/simd-type.rs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
#[simd]
|
||||
struct RGBA {
|
||||
r: f32,
|
||||
g: f32,
|
||||
b: f32,
|
||||
a: f32
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue