Skip to content
Snippets Groups Projects
Commit c6b0864d authored by jugglinmike's avatar jugglinmike Committed by Leo Balter
Browse files

Extend tests for Annex B String HTML methods (#627)

- Add tests for abrupt completion handling from ToString operations
- Add tests for method property descriptors
- Remove redundant assertion
parent 230dee16
No related branches found
No related tags found
No related merge requests found
......@@ -21,4 +21,3 @@ assert.throws(TypeError, function() {
assert.throws(TypeError, function() {
String.prototype.sup.call(null);
});
assert.sameValue(String.prototype.sup.length, 0);
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-string.prototype.sup
es6id: B.2.3.14
description: Property descriptor for String.prototype.sup
info: >
Every other data property described in clauses 18 through 26 and in Annex
B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false,
[[Configurable]]: true } unless otherwise specified.
includes: [propertyHelper.js]
---*/
verifyNotEnumerable(String.prototype, 'sup');
verifyWritable(String.prototype, 'sup');
verifyConfigurable(String.prototype, 'sup');
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-string.prototype.sup
es6id: B.2.3.14
description: Abrupt completion when coercing "this" value to string
info: |
B.2.3.2.1 Runtime Semantics: CreateHTML
1. Let str be ? RequireObjectCoercible(string).
2. Let S be ? ToString(str).
---*/
var thisVal = {
toString: function() {
throw new Test262Error();
}
};
assert.throws(Test262Error, function() {
String.prototype.sup.call(thisVal);
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment