diff options
author | André Bargull <andre.bargull@gmail.com> | 2015-08-13 17:41:47 +0200 |
---|---|---|
committer | André Bargull <andre.bargull@gmail.com> | 2015-08-13 17:42:06 +0200 |
commit | 6b48d9f1b29452db77403410d6d15c0de4a8ea21 (patch) | |
tree | 541fe18cb07896f9672f44e0715ba8dc2c0418d4 /test/built-ins/Object/defineProperty/15.2.3.6-3-220-1.js | |
parent | 39b5b7272c0cedb9d55c243dd75e98c263056451 (diff) | |
download | qtdeclarative-testsuites-6b48d9f1b29452db77403410d6d15c0de4a8ea21.tar.gz |
Replace runTestCase with assert, try-finally, [test/built-ins/Object]
Diffstat (limited to 'test/built-ins/Object/defineProperty/15.2.3.6-3-220-1.js')
-rw-r--r-- | test/built-ins/Object/defineProperty/15.2.3.6-3-220-1.js | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-3-220-1.js b/test/built-ins/Object/defineProperty/15.2.3.6-3-220-1.js index af410bfe6..12816889e 100644 --- a/test/built-ins/Object/defineProperty/15.2.3.6-3-220-1.js +++ b/test/built-ins/Object/defineProperty/15.2.3.6-3-220-1.js @@ -7,12 +7,10 @@ description: > Object.defineProperty - 'Attributes' is a String object that uses Object's [[Get]] method to access the 'get' property of prototype object (8.10.5 step 7.a) -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {}; - try { + String.prototype.get = function () { return "stringGetProperty"; }; @@ -20,9 +18,4 @@ function testcase() { Object.defineProperty(obj, "property", strObj); - return obj.property === "stringGetProperty"; - } finally { - delete String.prototype.get; - } - } -runTestCase(testcase); +assert.sameValue(obj.property, "stringGetProperty", 'obj.property'); |