utatane.tea@gmail.com | f24ee89 | 2015-06-09 18:42:46 +0000 | [diff] [blame] | 1 | function shouldBe(actual, expected) { |
2 | if (actual !== expected) | ||||
3 | throw new Error('bad value: ' + actual); | ||||
4 | } | ||||
5 | |||||
mark.lam@apple.com | ff5f4f3 | 2016-03-18 23:14:34 +0000 | [diff] [blame] | 6 | shouldBe(JSON.stringify(Object.getOwnPropertyNames(RegExp.prototype).sort()), '["compile","constructor","exec","flags","global","ignoreCase","multiline","source","sticky","test","toString","unicode"]'); |
utatane.tea@gmail.com | f24ee89 | 2015-06-09 18:42:46 +0000 | [diff] [blame] | 7 | shouldBe(JSON.stringify(Object.getOwnPropertyNames(/Cocoa/).sort()), '["lastIndex"]'); |