summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/RegExp/prototype/source/prop-desc.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/test262/built-ins/RegExp/prototype/source/prop-desc.js')
-rw-r--r--js/src/tests/test262/built-ins/RegExp/prototype/source/prop-desc.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/RegExp/prototype/source/prop-desc.js b/js/src/tests/test262/built-ins/RegExp/prototype/source/prop-desc.js
new file mode 100644
index 0000000000..00d66114f4
--- /dev/null
+++ b/js/src/tests/test262/built-ins/RegExp/prototype/source/prop-desc.js
@@ -0,0 +1,22 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-get-regexp.prototype.source
+description: >
+ RegExp.prototype.source is an accessor property whose set accessor
+ function is undefined
+includes: [propertyHelper.js]
+---*/
+
+var d = Object.getOwnPropertyDescriptor(RegExp.prototype, 'source');
+
+assert.sameValue(typeof d.get, 'function', 'typeof d.get');
+assert.sameValue(d.set, undefined, 'd.set');
+
+verifyProperty(RegExp.prototype, 'source', {
+ enumerable: false,
+ configurable: true,
+});
+
+reportCompare(0, 0);