diff --git a/js/src/tests/ecma_6/TypedObject/simd/float32x4clamp.js b/js/src/tests/ecma_6/TypedObject/simd/float32x4clamp.js index 4f5775f28244..a27d62503de7 100644 --- a/js/src/tests/ecma_6/TypedObject/simd/float32x4clamp.js +++ b/js/src/tests/ecma_6/TypedObject/simd/float32x4clamp.js @@ -3,20 +3,19 @@ var BUGNUMBER = 946042; var float32x4 = SIMD.float32x4; var int32x4 = SIMD.int32x4; -var summary = 'float32x4 add'; +var summary = 'float32x4 clamp'; function test() { print(BUGNUMBER + ": " + summary); - // FIXME -- Bug 948379: Amend to check for correctness of border cases. - - var a = float32x4(1, 2, 3, 4); - var b = float32x4(10, 20, 30, 40); - var c = SIMD.float32x4.add(a, b); - assertEq(c.x, 11); - assertEq(c.y, 22); - assertEq(c.z, 33); - assertEq(c.w, 44); + var a = float32x4(-13.37, 10.46, 31.79, 0.54); + var lower = float32x4(2.1, 1.1, 50.13, 0.0); + var upper = float32x4(2.56, 5.55, 55.93, 1.1); + var c = SIMD.float32x4.clamp(a, lower, upper); + assertEq(c.x, Math.fround(2.1)); + assertEq(c.y, Math.fround(5.55)); + assertEq(c.z, Math.fround(50.13)); + assertEq(c.w, Math.fround(0.54)); if (typeof reportCompare === "function") reportCompare(true, true);