Index: test/cctest/test-extra.js |
diff --git a/test/cctest/test-extra.js b/test/cctest/test-extra.js |
index 123c8920d04d18d35a628ca6209b05133af2fd03..dfb6c8012cdbfad93b894acb7dbab6b63c714af4 100644 |
--- a/test/cctest/test-extra.js |
+++ b/test/cctest/test-extra.js |
@@ -28,6 +28,18 @@ |
const Promise = global.Promise; |
const Promise_resolve = v8.simpleBind(Promise.resolve, Promise); |
+ const arrayToTest = new v8.InternalPackedArray(); |
+ arrayToTest.push(1); |
+ arrayToTest.push(2); |
+ arrayToTest.pop(); |
+ arrayToTest.unshift("a", "b", "c"); |
+ arrayToTest.shift(); |
+ arrayToTest.splice(0, 1); |
+ const slicedArray = arrayToTest.slice(); |
+ const arraysOK = arrayToTest.length === 2 && arrayToTest[0] === "c" && |
+ arrayToTest[1] === 1 && slicedArray.length === 2 && |
+ slicedArray[0] === "c" && slicedArray[1] === 1; |
+ |
binding.testExtraCanUseUtils = function() { |
const fulfilledPromise = v8.createPromise(); |
v8.resolvePromise( |
@@ -35,9 +47,9 @@ |
hasOwn({ test: 'test' }, 'test') ? 1 : -1 |
); |
- const fulfilledPromise2 = Promise_resolve(call(function (arg1) { |
- return (this.prop === arg1 && arg1 === 'value') ? 2 : -1; |
- }, { prop: 'value' }, 'value')); |
+ const fulfilledPromise2 = Promise_resolve(call(function (arg1, arg2) { |
+ return (this.prop === arg1 && arg1 === 'value' && arg2) ? 2 : -1; |
+ }, { prop: 'value' }, 'value', arraysOK)); |
const rejectedPromise = v8.createPromise(); |
v8.rejectPromise(rejectedPromise, apply(function (arg1, arg2) { |