Thu, 15 Jan 2015 15:55:04 +0100
Back out 97036ab72558 which inappropriately compared turds to third parties.
1 var samples = [
2 "[...a]",
3 "[...[1]]",
4 "[1, ...a, 2]",
5 "[1, ...[2, 3], 4]",
6 "[...[1], , ]",
7 "[1, , ...[2]]",
8 "[, 1, ...[2], ...[3], , 4, 5, , ]"
9 ];
10 for (var sample of samples) {
11 var source = "function f() {\n return " + sample + ";\n}";
12 eval(source);
13 assertEq(f.toString(), source);
14 }