]> git.saurik.com Git - apple/javascriptcore.git/blob - tests/stress/eval-script-contains-null-character.js
419215da49c27dbb4cbe6d9f7da05efd5d4b3e6a
[apple/javascriptcore.git] / tests / stress / eval-script-contains-null-character.js
1 function shouldBe(actual, expected) {
2 if (actual !== expected)
3 throw new Error("bad value: " + actual);
4 }
5
6 function test() {
7 shouldBe(eval("(`\0`)"), "\0");
8 shouldBe(eval("('\0')"), "\0");
9 }
10 noInline(test);
11
12 for (var i = 0; i < 10000; ++i)
13 test();