| 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 6358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6369 "[a,b,c]", | 6369 "[a,b,c]", |
| 6370 "{ x : x, y : y }", | 6370 "{ x : x, y : y }", |
| 6371 "[]", | 6371 "[]", |
| 6372 "{}", | 6372 "{}", |
| 6373 "[{x:x, y:y}, [a,b,c]]", | 6373 "[{x:x, y:y}, [a,b,c]]", |
| 6374 "[a,,b]", | 6374 "[a,,b]", |
| 6375 "{42 : x}", | 6375 "{42 : x}", |
| 6376 "{42e-2 : x}", | 6376 "{42e-2 : x}", |
| 6377 "{'hi' : x}", | 6377 "{'hi' : x}", |
| 6378 "{var: x}", | 6378 "{var: x}", |
| 6379 "{}", |
| 6379 NULL}; | 6380 NULL}; |
| 6380 // clang-format on | 6381 // clang-format on |
| 6381 static const ParserFlag always_flags[] = {kAllowHarmonyDestructuring}; | 6382 static const ParserFlag always_flags[] = {kAllowHarmonyDestructuring}; |
| 6382 RunParserSyncTest(context_data, data, kSuccess, NULL, 0, always_flags, | 6383 RunParserSyncTest(context_data, data, kSuccess, NULL, 0, always_flags, |
| 6383 arraysize(always_flags)); | 6384 arraysize(always_flags)); |
| 6384 } | 6385 } |
| 6385 | 6386 |
| 6386 | 6387 |
| 6387 TEST(DestructuringNegativeTests) { | 6388 TEST(DestructuringNegativeTests) { |
| 6388 i::FLAG_harmony_destructuring = true; | 6389 i::FLAG_harmony_destructuring = true; |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6472 const char* data[] = { | 6473 const char* data[] = { |
| 6473 "yield", | 6474 "yield", |
| 6474 "[yield]", | 6475 "[yield]", |
| 6475 "{ x : yield }", | 6476 "{ x : yield }", |
| 6476 NULL}; | 6477 NULL}; |
| 6477 // clang-format on | 6478 // clang-format on |
| 6478 RunParserSyncTest(context_data, data, kError, NULL, 0, always_flags, | 6479 RunParserSyncTest(context_data, data, kError, NULL, 0, always_flags, |
| 6479 arraysize(always_flags)); | 6480 arraysize(always_flags)); |
| 6480 } | 6481 } |
| 6481 } | 6482 } |
| OLD | NEW |