mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 17:10:23 +00:00
19 lines
988 B
JavaScript
19 lines
988 B
JavaScript
test("The use of the 'in' keyword is restricted in for loop headers", () => {
|
|
expect("for (a ? a : a in a; false; ) ;").not.toEval();
|
|
expect("for (a + a in b);").not.toEval();
|
|
expect("for (a in a of a);").not.toEval();
|
|
expect("for(a = a in a; false;);").not.toEval();
|
|
expect("for(a += a in a; false;);").not.toEval();
|
|
expect("for(a -= a in a; false;);").not.toEval();
|
|
expect("for(a *= a in a; false;);").not.toEval();
|
|
expect("for(a /= a in a; false;);").not.toEval();
|
|
expect("for(a &= a in a; false;);").not.toEval();
|
|
expect("for(a |= a in a; false;);").not.toEval();
|
|
expect("for(a ^= a in a; false;);").not.toEval();
|
|
expect("for(a ^^= a in a; false;);").not.toEval();
|
|
expect("for(a == a in a; false;);").not.toEval();
|
|
expect("for(a != a in a; false;);").not.toEval();
|
|
expect("for(a === a in a; false;);").not.toEval();
|
|
expect("for(a !== a in a; false;);").not.toEval();
|
|
expect("for (a ?? b in c;;);").not.toEval();
|
|
});
|