| 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 6351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6362 "a", | 6362 "a", |
| 6363 "{ x : y }", | 6363 "{ x : y }", |
| 6364 "[a]", | 6364 "[a]", |
| 6365 "[a,b,c]", | 6365 "[a,b,c]", |
| 6366 "{ x : x, y : y }", | 6366 "{ x : x, y : y }", |
| 6367 "[]", | 6367 "[]", |
| 6368 "{}", | 6368 "{}", |
| 6369 "[{x:x, y:y}, [a,b,c]]", | 6369 "[{x:x, y:y}, [a,b,c]]", |
| 6370 "[a,,b]", | 6370 "[a,,b]", |
| 6371 "{42 : x}", | 6371 "{42 : x}", |
| 6372 "{42e-2 : x}", |
| 6372 "{'hi' : x}", | 6373 "{'hi' : x}", |
| 6374 "{var: x}", |
| 6373 NULL}; | 6375 NULL}; |
| 6374 // clang-format on | 6376 // clang-format on |
| 6375 static const ParserFlag always_flags[] = {kAllowHarmonyDestructuring}; | 6377 static const ParserFlag always_flags[] = {kAllowHarmonyDestructuring}; |
| 6376 RunParserSyncTest(context_data, data, kSuccess, NULL, 0, always_flags, | 6378 RunParserSyncTest(context_data, data, kSuccess, NULL, 0, always_flags, |
| 6377 arraysize(always_flags)); | 6379 arraysize(always_flags)); |
| 6378 } | 6380 } |
| 6379 | 6381 |
| 6380 | 6382 |
| 6381 TEST(DestructuringNegativeTests) { | 6383 TEST(DestructuringNegativeTests) { |
| 6382 i::FLAG_harmony_destructuring = true; | 6384 i::FLAG_harmony_destructuring = true; |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6466 const char* data[] = { | 6468 const char* data[] = { |
| 6467 "yield", | 6469 "yield", |
| 6468 "[yield]", | 6470 "[yield]", |
| 6469 "{ x : yield }", | 6471 "{ x : yield }", |
| 6470 NULL}; | 6472 NULL}; |
| 6471 // clang-format on | 6473 // clang-format on |
| 6472 RunParserSyncTest(context_data, data, kError, NULL, 0, always_flags, | 6474 RunParserSyncTest(context_data, data, kError, NULL, 0, always_flags, |
| 6473 arraysize(always_flags)); | 6475 arraysize(always_flags)); |
| 6474 } | 6476 } |
| 6475 } | 6477 } |
| OLD | NEW |