summaryrefslogtreecommitdiff
path: root/harness
diff options
context:
space:
mode:
authorLeonardo Balter <leonardo.balter@gmail.com>2016-02-03 20:03:21 -0200
committerGorkem Yakin <goyakin@microsoft.com>2016-02-12 16:02:36 -0800
commit4388f2869ca3035ae34ec934427d14754aeb79a6 (patch)
treee71224f806fb2674898e1209a025bc63ee1a3dfd /harness
parent35dce20ec4c527b693b5dafa3deb74753c82e1c7 (diff)
downloadqtdeclarative-testsuites-4388f2869ca3035ae34ec934427d14754aeb79a6.tar.gz
Allow call testWithTypedArrayConstructors with a constructors subset
Diffstat (limited to 'harness')
-rwxr-xr-xharness/testTypedArray.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/harness/testTypedArray.js b/harness/testTypedArray.js
index 84e07ba36..1d783c58b 100755
--- a/harness/testTypedArray.js
+++ b/harness/testTypedArray.js
@@ -13,7 +13,7 @@ var typedArrayConstructors = [
Uint32Array,
Uint16Array,
Uint8Array,
- Uint8ClampedArray,
+ Uint8ClampedArray
];
/**
@@ -32,10 +32,12 @@ var TypedArray = Object.getPrototypeOf(Int8Array);
* Calls the provided function for every 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) {
- for (var i = 0; i < typedArrayConstructors.length; ++i) {
- var constructor = typedArrayConstructors[i];
+function testWithTypedArrayConstructors(f, selected) {
+ var constructors = selected || typedArrayConstructors;
+ for (var i = 0; i < constructors.length; ++i) {
+ var constructor = constructors[i];
try {
f(constructor);
} catch (e) {