diff options
Diffstat (limited to '')
-rw-r--r-- | js/src/tests/test262/built-ins/Symbol/prototype/toString/toString-default-attributes-strict-strict.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/Symbol/prototype/toString/toString-default-attributes-strict-strict.js b/js/src/tests/test262/built-ins/Symbol/prototype/toString/toString-default-attributes-strict-strict.js new file mode 100644 index 0000000000..d33a0c6747 --- /dev/null +++ b/js/src/tests/test262/built-ins/Symbol/prototype/toString/toString-default-attributes-strict-strict.js @@ -0,0 +1,22 @@ +'use strict'; +// Copyright (C) 2013 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 19.4 +description: > + Symbol property get and set, strict +flags: [onlyStrict] +features: [Symbol] +---*/ + +var sym = Symbol("66"); + +assert.throws(TypeError, function() { + sym.toString = 0; +}); + +assert.throws(TypeError, function() { + sym.valueOf = 0; +}); + +reportCompare(0, 0); |