Skip to content
This repository was archived by the owner on Jan 26, 2022. It is now read-only.

Commit 0d28cdc

Browse files
committed
Merge pull request #330 from stoklund/equal-simd
Don't pass SIMD values to equal().
2 parents a3132ac + a302d13 commit 0d28cdc

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

‎src/ecmascript_simd_tests.js‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -393,10 +393,12 @@ function testCheck(type) {
393393
// Other SIMD types shouldn't check for this type.
394394
var a = type.fn();
395395
for (var otherType of simdTypes) {
396-
if (otherType === type)
397-
equal(a, type.fn.check(a));
398-
else
396+
if (otherType === type) {
397+
var result = type.fn.check(a);
398+
checkValue(type, result, function(index) { return type.fn.extractLane(a, index); });
399+
} else {
399400
throws(function() { otherType.check(a); });
401+
}
400402
}
401403
// Neither should other types.
402404
for (var x of [ {}, "", 0, 1, true, false, undefined, null, NaN, Infinity]) {

0 commit comments

Comments
 (0)