rust/crates/core_simd/tests/i16_ops.rs

21 lines
444 B
Rust
Raw Normal View History

#![feature(portable_simd)]
use core_simd::i16x2;
2021-02-13 13:19:16 -06:00
#[macro_use]
mod ops_macros;
2021-08-07 15:38:41 -05:00
impl_signed_tests! { i16 }
#[test]
fn max_is_not_lexicographic() {
let a = i16x2::splat(10);
let b = i16x2::from_array([-4, 12]);
assert_eq!(a.max(b), i16x2::from_array([10, 12]));
}
#[test]
fn min_is_not_lexicographic() {
let a = i16x2::splat(10);
let b = i16x2::from_array([12, -4]);
assert_eq!(a.min(b), i16x2::from_array([10, -4]));
}