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 2511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2522 RunParserSyncTest(strict_context_data, good_statement_data, kSuccess); | 2522 RunParserSyncTest(strict_context_data, good_statement_data, kSuccess); |
2523 RunParserSyncTest(sloppy_context_data, good_statement_data, kSuccess); | 2523 RunParserSyncTest(sloppy_context_data, good_statement_data, kSuccess); |
2524 | 2524 |
2525 RunParserSyncTest(strict_context_data, bad_statement_data, kError); | 2525 RunParserSyncTest(strict_context_data, bad_statement_data, kError); |
2526 RunParserSyncTest(sloppy_context_data, bad_statement_data, kError); | 2526 RunParserSyncTest(sloppy_context_data, bad_statement_data, kError); |
2527 } | 2527 } |
2528 | 2528 |
2529 | 2529 |
2530 TEST(InvalidLeftHandSide) { | 2530 TEST(InvalidLeftHandSide) { |
2531 const char* assignment_context_data[][2] = { | 2531 const char* assignment_context_data[][2] = { |
2532 // {"", " = 1;"}, | 2532 {"", " = 1;"}, |
2533 // {"\"use strict\"; ", " = 1;"}, | 2533 {"\"use strict\"; ", " = 1;"}, |
2534 { NULL, NULL } | 2534 { NULL, NULL } |
2535 }; | 2535 }; |
2536 | 2536 |
2537 const char* prefix_context_data[][2] = { | 2537 const char* prefix_context_data[][2] = { |
2538 {"++", ";"}, | 2538 {"++", ";"}, |
2539 {"\"use strict\"; ++", ";"}, | 2539 {"\"use strict\"; ++", ";"}, |
2540 {NULL, NULL}, | 2540 {NULL, NULL}, |
2541 }; | 2541 }; |
2542 | 2542 |
2543 const char* postfix_context_data[][2] = { | 2543 const char* postfix_context_data[][2] = { |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2587 RunParserSyncTest(assignment_context_data, bad_statement_data_common, kError); | 2587 RunParserSyncTest(assignment_context_data, bad_statement_data_common, kError); |
2588 RunParserSyncTest(assignment_context_data, bad_statement_data_for_assignment, | 2588 RunParserSyncTest(assignment_context_data, bad_statement_data_for_assignment, |
2589 kError); | 2589 kError); |
2590 | 2590 |
2591 RunParserSyncTest(prefix_context_data, good_statement_data, kSuccess); | 2591 RunParserSyncTest(prefix_context_data, good_statement_data, kSuccess); |
2592 RunParserSyncTest(prefix_context_data, bad_statement_data_common, kError); | 2592 RunParserSyncTest(prefix_context_data, bad_statement_data_common, kError); |
2593 | 2593 |
2594 RunParserSyncTest(postfix_context_data, good_statement_data, kSuccess); | 2594 RunParserSyncTest(postfix_context_data, good_statement_data, kSuccess); |
2595 RunParserSyncTest(postfix_context_data, bad_statement_data_common, kError); | 2595 RunParserSyncTest(postfix_context_data, bad_statement_data_common, kError); |
2596 } | 2596 } |
OLD | NEW |