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