]> git.saurik.com Git - apple/javascriptcore.git/blame - tests/stress/static-getter-get.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / static-getter-get.js
CommitLineData
ed1e77d3
A
1function shouldBe(actual, expected) {
2 if (actual !== expected)
3 throw new Error('bad value: ' + actual);
4}
5
6var reg1 = /Cocoa/gi;
7shouldBe(reg1.global, true);
8shouldBe(reg1.ignoreCase, true);
9shouldBe(reg1.multiline, false);
10shouldBe(reg1.source, 'Cocoa');
11
12var reg2 = /Cocoa/im;
13shouldBe(reg2.global, false);
14shouldBe(reg2.ignoreCase, true);
15shouldBe(reg2.multiline, true);
16shouldBe(reg2.source, 'Cocoa');
17
18var reg3 = /Cappuccino/gm;
19shouldBe(reg3.global, true);
20shouldBe(reg3.ignoreCase, false);
21shouldBe(reg3.multiline, true);
22shouldBe(reg3.source, 'Cappuccino');