diff options
Diffstat (limited to 'js/src/tests/test262/built-ins/Reflect/has/return-abrupt-from-property-key.js')
-rw-r--r-- | js/src/tests/test262/built-ins/Reflect/has/return-abrupt-from-property-key.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/Reflect/has/return-abrupt-from-property-key.js b/js/src/tests/test262/built-ins/Reflect/has/return-abrupt-from-property-key.js new file mode 100644 index 0000000000..70d1f66c89 --- /dev/null +++ b/js/src/tests/test262/built-ins/Reflect/has/return-abrupt-from-property-key.js @@ -0,0 +1,27 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 26.1.9 +description: > + Return abrupt from ToPropertyKey(propertyKey) +info: | + 26.1.9 Reflect.has ( target, propertyKey ) + + ... + 2. Let key be ToPropertyKey(propertyKey). + 3. ReturnIfAbrupt(key). + ... +features: [Reflect] +---*/ + +var p = { + toString: function() { + throw new Test262Error(); + } +}; + +assert.throws(Test262Error, function() { + Reflect.has({}, p); +}); + +reportCompare(0, 0); |