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

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

Issue 1328083002: [es6] support `get` and `set` in shorthand properties (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 5 years, 3 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
« no previous file with comments | « src/preparser.h ('k') | test/mjsunit/es6/object-literals-property-shorthand.js » ('j') | 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 6523 matching lines...) Expand 10 before | Expand all | Expand 10 after
6534 {"function f(argument1, ", ") {}"}, 6534 {"function f(argument1, ", ") {}"},
6535 {"var f = (", ") => {};"}, 6535 {"var f = (", ") => {};"},
6536 {"var f = (argument1,", ") => {};"}, 6536 {"var f = (argument1,", ") => {};"},
6537 {NULL, NULL}}; 6537 {NULL, NULL}};
6538 6538
6539 // clang-format off 6539 // clang-format off
6540 const char* data[] = { 6540 const char* data[] = {
6541 "a", 6541 "a",
6542 "{ x : y }", 6542 "{ x : y }",
6543 "{ x : y = 1 }", 6543 "{ x : y = 1 }",
6544 "{ get, set }",
6545 "{ get = 1, set = 2 }",
6544 "[a]", 6546 "[a]",
6545 "[a = 1]", 6547 "[a = 1]",
6546 "[a,b,c]", 6548 "[a,b,c]",
6547 "[a, b = 42, c]", 6549 "[a, b = 42, c]",
6548 "{ x : x, y : y }", 6550 "{ x : x, y : y }",
6549 "{ x : x = 1, y : y }", 6551 "{ x : x = 1, y : y }",
6550 "{ x : x, y : y = 42 }", 6552 "{ x : x, y : y = 42 }",
6551 "[]", 6553 "[]",
6552 "{}", 6554 "{}",
6553 "[{x:x, y:y}, [a,b,c]]", 6555 "[{x:x, y:y}, [a,b,c]]",
(...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after
7229 "for (let in {}) {}", 7231 "for (let in {}) {}",
7230 NULL 7232 NULL
7231 }; 7233 };
7232 // clang-format on 7234 // clang-format on
7233 7235
7234 static const ParserFlag always_flags[] = {kAllowHarmonySloppy, 7236 static const ParserFlag always_flags[] = {kAllowHarmonySloppy,
7235 kAllowHarmonySloppyLet}; 7237 kAllowHarmonySloppyLet};
7236 RunParserSyncTest(context_data, data, kSuccess, NULL, 0, always_flags, 7238 RunParserSyncTest(context_data, data, kSuccess, NULL, 0, always_flags,
7237 arraysize(always_flags)); 7239 arraysize(always_flags));
7238 } 7240 }
OLDNEW
« no previous file with comments | « src/preparser.h ('k') | test/mjsunit/es6/object-literals-property-shorthand.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698