Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: test/cctest/test-parsing.cc

Issue 202333004: Move ParsePostfixExpression into ParserBase. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/preparser.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2314 matching lines...) Expand 10 before | Expand all | Expand 10 after
2325 const char* context_data[][2] = { 2325 const char* context_data[][2] = {
2326 {"", ""}, 2326 {"", ""},
2327 {"var f =", ""}, 2327 {"var f =", ""},
2328 { NULL, NULL } 2328 { NULL, NULL }
2329 }; 2329 };
2330 2330
2331 const char* statement_data[] = { 2331 const char* statement_data[] = {
2332 "new foo bar", 2332 "new foo bar",
2333 "new ) foo", 2333 "new ) foo",
2334 "new ++foo", 2334 "new ++foo",
2335 // TODO(marja): Activate this test once the preparser checks correctly. 2335 // TODO(marja): Activate this test once the preparser checks correctly.
Michael Starzinger 2014/03/21 09:24:37 Is this test also fixed by this change?
marja 2014/03/21 09:28:35 Ah, yes. Re-enabled it.
2336 // "new foo ++", 2336 // "new foo ++",
2337 NULL 2337 NULL
2338 }; 2338 };
2339 2339
2340 RunParserSyncTest(context_data, statement_data, kError); 2340 RunParserSyncTest(context_data, statement_data, kError);
2341 } 2341 }
2342 2342
2343 2343
2344 TEST(StrictObjectLiteralChecking) { 2344 TEST(StrictObjectLiteralChecking) {
2345 const char* strict_context_data[][2] = { 2345 const char* strict_context_data[][2] = {
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
2521 RunParserSyncTest(sloppy_context_data, sloppy_statement_data, kSuccess); 2521 RunParserSyncTest(sloppy_context_data, sloppy_statement_data, kSuccess);
2522 2522
2523 RunParserSyncTest(strict_context_data, good_statement_data, kSuccess); 2523 RunParserSyncTest(strict_context_data, good_statement_data, kSuccess);
2524 RunParserSyncTest(sloppy_context_data, good_statement_data, kSuccess); 2524 RunParserSyncTest(sloppy_context_data, good_statement_data, kSuccess);
2525 2525
2526 RunParserSyncTest(strict_context_data, bad_statement_data, kError); 2526 RunParserSyncTest(strict_context_data, bad_statement_data, kError);
2527 RunParserSyncTest(sloppy_context_data, bad_statement_data, kError); 2527 RunParserSyncTest(sloppy_context_data, bad_statement_data, kError);
2528 } 2528 }
2529 2529
2530 2530
2531 TEST(ErrorInvalidLeftHandSide) { 2531 TEST(InvalidLeftHandSide) {
2532 const char* assignment_context_data[][2] = { 2532 const char* assignment_context_data[][2] = {
2533 // {"", " = 1;"}, 2533 // {"", " = 1;"},
2534 // {"\"use strict\"; ", " = 1;"}, 2534 // {"\"use strict\"; ", " = 1;"},
2535 { NULL, NULL } 2535 { NULL, NULL }
2536 }; 2536 };
2537 2537
2538 const char* prefix_context_data[][2] = { 2538 const char* prefix_context_data[][2] = {
2539 {"++", ";"}, 2539 {"++", ";"},
2540 {"\"use strict\"; ++", ";"}, 2540 {"\"use strict\"; ++", ";"},
2541 {NULL, NULL}, 2541 {NULL, NULL},
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
2586 2586
2587 RunParserSyncTest(assignment_context_data, good_statement_data, kSuccess); 2587 RunParserSyncTest(assignment_context_data, good_statement_data, kSuccess);
2588 RunParserSyncTest(assignment_context_data, bad_statement_data_common, kError); 2588 RunParserSyncTest(assignment_context_data, bad_statement_data_common, kError);
2589 RunParserSyncTest(assignment_context_data, bad_statement_data_for_assignment, 2589 RunParserSyncTest(assignment_context_data, bad_statement_data_for_assignment,
2590 kError); 2590 kError);
2591 2591
2592 RunParserSyncTest(prefix_context_data, good_statement_data, kSuccess); 2592 RunParserSyncTest(prefix_context_data, good_statement_data, kSuccess);
2593 RunParserSyncTest(prefix_context_data, bad_statement_data_common, kError); 2593 RunParserSyncTest(prefix_context_data, bad_statement_data_common, kError);
2594 2594
2595 RunParserSyncTest(postfix_context_data, good_statement_data, kSuccess); 2595 RunParserSyncTest(postfix_context_data, good_statement_data, kSuccess);
2596 // TODO(marja): This doesn't work yet. 2596 RunParserSyncTest(postfix_context_data, bad_statement_data_common, kError);
2597 // RunParserSyncTest(postfix_context_data, bad_statement_data_common, kError);
2598 } 2597 }
OLDNEW
« no previous file with comments | « src/preparser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698