Add test_i32x4_swizzles

This commit is contained in:
Luis de Bethencourt 2019-05-28 13:24:41 -04:00
parent 4813084eed
commit 7240dafb05
1 changed files with 9 additions and 0 deletions

View File

@ -385,3 +385,12 @@ fn test_i32x4_packed_comparisons() {
let b = I32x4::new(-59, 1, 5, 104); let b = I32x4::new(-59, 1, 5, 104);
assert_eq!(a.packed_eq(b), U32x4::new(0, !0, !0, 0)); assert_eq!(a.packed_eq(b), U32x4::new(0, !0, !0, 0));
} }
#[test]
fn test_i32x4_swizzles() {
let a = I32x4::new(1, 2, 3, 4);
assert_eq!(a.xyxy(), I32x4::new(1, 2, 1, 2));
assert_eq!(a.xwzy(), I32x4::new(1, 4, 3, 2));
assert_eq!(a.zyxw(), I32x4::new(3, 2, 1, 4));
assert_eq!(a.zwxy(), I32x4::new(3, 4, 1, 2));
}