]> git.saurik.com Git - apple/javascriptcore.git/blob - tests/stress/static-function-put.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / static-function-put.js
1 function shouldBe(actual, expected) {
2 if (actual !== expected)
3 throw new Error('bad value: ' + actual);
4 }
5 var exec = RegExp.prototype.exec;
6 var nested = Object.create(RegExp.prototype);
7
8 nested.exec = "Hello";
9 shouldBe(nested.hasOwnProperty('exec'), true);
10 shouldBe(nested.exec, "Hello");
11 shouldBe(/hello/.exec, exec);