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

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

Issue 10701116: Sync preparser and parser wrt syntax error in switch..case. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comment Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « src/preparser.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 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after
1140 { "{", "}" }, 1140 { "{", "}" },
1141 { "if (true) ", " else {}" }, 1141 { "if (true) ", " else {}" },
1142 { "if (true) {} else ", "" }, 1142 { "if (true) {} else ", "" },
1143 { "if (true) ", "" }, 1143 { "if (true) ", "" },
1144 { "do ", " while (false)" }, 1144 { "do ", " while (false)" },
1145 { "while (false) ", "" }, 1145 { "while (false) ", "" },
1146 { "for (;;) ", "" }, 1146 { "for (;;) ", "" },
1147 { "with ({})", "" }, 1147 { "with ({})", "" },
1148 { "switch (12) { case 12: ", "}" }, 1148 { "switch (12) { case 12: ", "}" },
1149 { "switch (12) { default: ", "}" }, 1149 { "switch (12) { default: ", "}" },
1150 { "switch (12) { ", "case 12: }" },
1150 { "label2: ", "" }, 1151 { "label2: ", "" },
1151 { NULL, NULL } 1152 { NULL, NULL }
1152 }; 1153 };
1153 1154
1154 const char* statement_data[] = { 1155 const char* statement_data[] = {
1155 "{}", 1156 "{}",
1156 "var x", 1157 "var x",
1157 "var x = 1", 1158 "var x = 1",
1158 "const x", 1159 "const x",
1159 "const x = 1", 1160 "const x = 1",
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
1252 " b = function() { \n" 1253 " b = function() { \n"
1253 " 01; \n" 1254 " 01; \n"
1254 " }; \n" 1255 " }; \n"
1255 "}; \n"; 1256 "}; \n";
1256 v8::Script::Compile(v8::String::New(script)); 1257 v8::Script::Compile(v8::String::New(script));
1257 CHECK(try_catch.HasCaught()); 1258 CHECK(try_catch.HasCaught());
1258 v8::String::Utf8Value exception(try_catch.Exception()); 1259 v8::String::Utf8Value exception(try_catch.Exception());
1259 CHECK_EQ("SyntaxError: Octal literals are not allowed in strict mode.", 1260 CHECK_EQ("SyntaxError: Octal literals are not allowed in strict mode.",
1260 *exception); 1261 *exception);
1261 } 1262 }
OLDNEW
« no previous file with comments | « src/preparser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698