| // Copyright (C) 2016 ecmascript_simd authors. All rights reserved. |
| // This code is governed by the BSD license found in the LICENSE file. |
| description: AllTrue returns true if all the SIMDElements are true. |
| includes: [simdUtilities.js] |
| function testAnyTrue(type) { |
| assert.sameValue('function', typeof type.fn.anyTrue); |
| var a = type.fn.splat(false); |
| assert(!type.fn.anyTrue(a)); |
| for (var i = 0; i < type.lanes; i++) { |
| a = type.fn.replaceLane(a, i, true); |
| assert(type.fn.anyTrue(a)); |
| assert(type.fn.anyTrue(a)); |
| simdTypes.filter(isBoolType).forEach(function(type) { |
| testSimdFunction(type.name + ' anyTrue', function() { |
| testAnyTrue(type, 'anyTrue'); |