summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/harness/propertyhelper-verifynotwritable-not-writable-strict.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/test262/harness/propertyhelper-verifynotwritable-not-writable-strict.js')
-rw-r--r--js/src/tests/test262/harness/propertyhelper-verifynotwritable-not-writable-strict.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/js/src/tests/test262/harness/propertyhelper-verifynotwritable-not-writable-strict.js b/js/src/tests/test262/harness/propertyhelper-verifynotwritable-not-writable-strict.js
new file mode 100644
index 0000000000..e4ff2346fa
--- /dev/null
+++ b/js/src/tests/test262/harness/propertyhelper-verifynotwritable-not-writable-strict.js
@@ -0,0 +1,23 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: >
+ Objects whose specified property is not writable satisfy the assertion.
+includes: [propertyHelper.js]
+---*/
+
+var obj = {};
+
+Object.defineProperty(obj, 'a', {
+ writable: false,
+ value: 123
+});
+
+verifyNotWritable(obj, 'a');
+
+if (obj.a !== 123) {
+ throw new Error('`verifyNotWritable` should be non-destructive.');
+}
+
+reportCompare(0, 0);