Skip to content

Commit ff3ac4e

Browse files
committed
add test from issue #253
1 parent 4cba9f6 commit ff3ac4e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

crates/core_simd/tests/i16_ops.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,8 @@ fn clamp_is_not_lexicographic() {
2525
let lo = i16x2::from_array([-12, -4]);
2626
let up = i16x2::from_array([-4, 12]);
2727
assert_eq!(a.clamp(lo, up), i16x2::from_array([-4, 10]));
28+
29+
let x = i16x2::from_array([10,1]);
30+
let y = x.clamp(i16x2::splat(0), i16x2::splat(9));
31+
assert_eq!(y, i16x2::from_array([9,1]));
2832
}

0 commit comments

Comments
 (0)