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

Unified Diff: test/cctest/test-parsing.cc

Issue 2580833005: [test] Add more maybe-assigned tests for parameters. (Closed)
Patch Set: Remove precision flag. Created 3 years, 12 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-parsing.cc
diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc
index 7a35ebe469b394c52a734fd9a6b36a49ca9c61e3..4d08adfe9a21d6211347aeb45d570c954f892705 100644
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -3453,6 +3453,8 @@ TEST(MaybeAssignedParameters) {
{false,
"function f(arg, arguments=[]) {g(arg); arguments[0] = 42; g(arg)}"},
{false, "function f(...arg) {g(arg); arguments[0] = 42; g(arg)}"},
+ {false,
+ "function f(arg) {g(arg); g(function() {arguments[0] = 42}); g(arg)}"},
// strict arguments object
{false, "function f(arg, x=1) {g(arg); arguments[0] = 42; g(arg)}"},
@@ -3471,9 +3473,11 @@ TEST(MaybeAssignedParameters) {
{true, "function f(arg=1) {g(arg); arg = 42; g(arg)}"},
{true, "function f(arg) {'use strict'; g(arg); arg = 42; g(arg)}"},
{true, "function f(arg, {a=(g(arg), arg=42)}) {g(arg)}"},
+ {true, "function f(arg) {g(arg); g(function() {arg = 42}); g(arg)}"},
+ {true,
+ "function f(arg) {g(arg); g(function() {eval('arg = 42')}); g(arg)}"},
{true, "function f(arg) {g(arg); g(() => arg = 42); g(arg)}"},
{true, "function f(arg) {g(arg); g(() => eval('arg = 42')); g(arg)}"},
- {true, "function f(arg) {g(arg); g(() => arguments[0] = 42); g(arg)}"},
{true, "function f(...arg) {g(arg); eval('arg = 42'); g(arg)}"},
// sloppy arguments object
@@ -3483,6 +3487,7 @@ TEST(MaybeAssignedParameters) {
"function f(arg) {((args) => {arguments[0] = 42})(arguments); "
"g(arg)}"},
{true, "function f(arg) {g(arg); eval('arguments[0] = 42'); g(arg)}"},
+ {true, "function f(arg) {g(arg); g(() => arguments[0] = 42); g(arg)}"},
};
const char* suffix = "; f";
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698