2017-06-27 23:12:06 +02:00
|
|
|
// Copyright 2015 Microsoft Corporation. All rights reserved.
|
|
|
|
// This code is governed by the license found in the LICENSE file.
|
|
|
|
|
|
|
|
/*---
|
|
|
|
description: mapFn throws an exception
|
|
|
|
esid: sec-array.from
|
|
|
|
es6id: 22.1.2.1
|
|
|
|
---*/
|
|
|
|
|
2018-02-09 18:09:47 +01:00
|
|
|
var array = [ 2, 4, 8, 16, 32, 64, 128 ];
|
2017-06-27 23:12:06 +02:00
|
|
|
function mapFn(value, index, obj) {
|
2018-02-09 18:09:47 +01:00
|
|
|
throw new Test262Error();
|
2017-06-27 23:12:06 +02:00
|
|
|
}
|
|
|
|
|
2018-02-09 18:09:47 +01:00
|
|
|
assert.throws(Test262Error, function(){Array.from(array, mapFn);});
|