зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1041648: added float32x4 clamp test case; r=bbouvier
This commit is contained in:
Родитель
be3ca57d73
Коммит
d6373dcf04
|
@ -3,20 +3,19 @@ var BUGNUMBER = 946042;
|
||||||
var float32x4 = SIMD.float32x4;
|
var float32x4 = SIMD.float32x4;
|
||||||
var int32x4 = SIMD.int32x4;
|
var int32x4 = SIMD.int32x4;
|
||||||
|
|
||||||
var summary = 'float32x4 add';
|
var summary = 'float32x4 clamp';
|
||||||
|
|
||||||
function test() {
|
function test() {
|
||||||
print(BUGNUMBER + ": " + summary);
|
print(BUGNUMBER + ": " + summary);
|
||||||
|
|
||||||
// FIXME -- Bug 948379: Amend to check for correctness of border cases.
|
var a = float32x4(-13.37, 10.46, 31.79, 0.54);
|
||||||
|
var lower = float32x4(2.1, 1.1, 50.13, 0.0);
|
||||||
var a = float32x4(1, 2, 3, 4);
|
var upper = float32x4(2.56, 5.55, 55.93, 1.1);
|
||||||
var b = float32x4(10, 20, 30, 40);
|
var c = SIMD.float32x4.clamp(a, lower, upper);
|
||||||
var c = SIMD.float32x4.add(a, b);
|
assertEq(c.x, Math.fround(2.1));
|
||||||
assertEq(c.x, 11);
|
assertEq(c.y, Math.fround(5.55));
|
||||||
assertEq(c.y, 22);
|
assertEq(c.z, Math.fround(50.13));
|
||||||
assertEq(c.z, 33);
|
assertEq(c.w, Math.fround(0.54));
|
||||||
assertEq(c.w, 44);
|
|
||||||
|
|
||||||
if (typeof reportCompare === "function")
|
if (typeof reportCompare === "function")
|
||||||
reportCompare(true, true);
|
reportCompare(true, true);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче