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

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

Issue 684873002: Scanner: remove PushBack calls when we're going to return ILLEGAL. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebased Created 6 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « src/scanner.cc ('k') | no next file » | 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 4235 matching lines...) Expand 10 before | Expand all | Expand 10 after
4246 "for(const x = 4, y of [1,2,3]) {}", 4246 "for(const x = 4, y of [1,2,3]) {}",
4247 "for(const x = 1, y = 2 in []) {}", 4247 "for(const x = 1, y = 2 in []) {}",
4248 "for(const x,y in []) {}", 4248 "for(const x,y in []) {}",
4249 "for(const x = 1, y = 2 of []) {}", 4249 "for(const x = 1, y = 2 of []) {}",
4250 "for(const x,y of []) {}", 4250 "for(const x,y of []) {}",
4251 NULL}; 4251 NULL};
4252 static const ParserFlag always_flags[] = {kAllowHarmonyScoping}; 4252 static const ParserFlag always_flags[] = {kAllowHarmonyScoping};
4253 RunParserSyncTest(context_data, data, kError, NULL, 0, always_flags, 4253 RunParserSyncTest(context_data, data, kError, NULL, 0, always_flags,
4254 arraysize(always_flags)); 4254 arraysize(always_flags));
4255 } 4255 }
4256
4257
4258 TEST(InvalidUnicodeEscapes) {
4259 const char* context_data[][2] = {{"", ""},
4260 {"'use strict';", ""},
4261 {NULL, NULL}};
4262 const char* data[] = {
4263 "var foob\\u123r = 0;",
4264 "var \\u123roo = 0;",
4265 "\"foob\\u123rr\"",
4266 "/regex/g\\u123r",
4267 NULL};
4268 RunParserSyncTest(context_data, data, kError);
4269 }
OLDNEW
« no previous file with comments | « src/scanner.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698