mirror of https://github.com/tc39/test262.git
Allow call testWithTypedArrayConstructors with a constructors subset
This commit is contained in:
parent
35dce20ec4
commit
4388f2869c
|
@ -13,7 +13,7 @@ var typedArrayConstructors = [
|
||||||
Uint32Array,
|
Uint32Array,
|
||||||
Uint16Array,
|
Uint16Array,
|
||||||
Uint8Array,
|
Uint8Array,
|
||||||
Uint8ClampedArray,
|
Uint8ClampedArray
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -32,10 +32,12 @@ var TypedArray = Object.getPrototypeOf(Int8Array);
|
||||||
* Calls the provided function for every typed array constructor.
|
* Calls the provided function for every typed array constructor.
|
||||||
*
|
*
|
||||||
* @param {typedArrayConstructorCallback} f - the function to call for each typed array constructor.
|
* @param {typedArrayConstructorCallback} f - the function to call for each typed array constructor.
|
||||||
|
* @param {Array} selected - An optional Array with filtered typed arrays
|
||||||
*/
|
*/
|
||||||
function testWithTypedArrayConstructors(f) {
|
function testWithTypedArrayConstructors(f, selected) {
|
||||||
for (var i = 0; i < typedArrayConstructors.length; ++i) {
|
var constructors = selected || typedArrayConstructors;
|
||||||
var constructor = typedArrayConstructors[i];
|
for (var i = 0; i < constructors.length; ++i) {
|
||||||
|
var constructor = constructors[i];
|
||||||
try {
|
try {
|
||||||
f(constructor);
|
f(constructor);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
Loading…
Reference in New Issue