blob: 6c035f420e7f5474b03015b02774eb9f749050ac (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
// Copyright (C) 2015 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 21.1.3.6
description: >
Returns abrupt from ToInteger(endPosition) as a Symbol.
info: |
21.1.3.6 String.prototype.endsWith ( searchString [ , endPosition] )
...
10. If endPosition is undefined, let pos be len, else let pos be
ToInteger(endPosition).
11. ReturnIfAbrupt(pos).
...
features: [Symbol, String.prototype.endsWith]
---*/
var position = Symbol();
assert.throws(TypeError, function() {
''.endsWith('', position);
});
reportCompare(0, 0);
|