OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 2200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2211 "new foo.bar();", | 2211 "new foo.bar();", |
2212 "new foo.bar.baz;", | 2212 "new foo.bar.baz;", |
2213 "new foo.bar().baz;", | 2213 "new foo.bar().baz;", |
2214 "new foo[bar];", | 2214 "new foo[bar];", |
2215 "new foo[bar]();", | 2215 "new foo[bar]();", |
2216 "new foo[bar][baz];", | 2216 "new foo[bar][baz];", |
2217 "new foo[bar]()[baz];", | 2217 "new foo[bar]()[baz];", |
2218 "new foo[bar].baz(baz)()[bar].baz;", | 2218 "new foo[bar].baz(baz)()[bar].baz;", |
2219 "new \"foo\"", // Runtime error | 2219 "new \"foo\"", // Runtime error |
2220 "new 1", // Runtime error | 2220 "new 1", // Runtime error |
2221 "new foo++", | |
Michael Starzinger
2014/03/17 09:28:17
IIUC, this should throw an "invalid LHS" reference
rossberg
2014/03/17 10:12:32
Done.
| |
2222 // This even runs: | 2221 // This even runs: |
2223 "(new new Function(\"this.x = 1\")).x;", | 2222 "(new new Function(\"this.x = 1\")).x;", |
2224 "new new Test_Two(String, 2).v(0123).length;", | 2223 "new new Test_Two(String, 2).v(0123).length;", |
2225 NULL | 2224 NULL |
2226 }; | 2225 }; |
2227 | 2226 |
2228 RunParserSyncTest(context_data, statement_data, kSuccess); | 2227 RunParserSyncTest(context_data, statement_data, kSuccess); |
2229 } | 2228 } |
2230 | 2229 |
2231 | 2230 |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2371 | 2370 |
2372 const char* statement_data[] = { | 2371 const char* statement_data[] = { |
2373 statement, | 2372 statement, |
2374 NULL | 2373 NULL |
2375 }; | 2374 }; |
2376 | 2375 |
2377 // The test is quite slow, so run it with a reduced set of flags. | 2376 // The test is quite slow, so run it with a reduced set of flags. |
2378 static const ParserFlag empty_flags[] = {kAllowLazy}; | 2377 static const ParserFlag empty_flags[] = {kAllowLazy}; |
2379 RunParserSyncTest(context_data, statement_data, kError, empty_flags, 1); | 2378 RunParserSyncTest(context_data, statement_data, kError, empty_flags, 1); |
2380 } | 2379 } |
OLD | NEW |