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

Side by Side Diff: test/mjsunit/messages.js

Issue 1758663002: Change syntax error message for illegal token. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: addressed comment Created 4 years, 9 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/parsing/parser-base.h ('k') | test/webkit/fast/js/basic-strict-mode-expected.txt » ('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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Flags: --stack-size=100 --harmony --harmony-reflect --harmony-regexps 5 // Flags: --stack-size=100 --harmony --harmony-reflect --harmony-regexps
6 // Flags: --harmony-simd 6 // Flags: --harmony-simd
7 7
8 function test(f, expected, type) { 8 function test(f, expected, type) {
9 try { 9 try {
10 f(); 10 f();
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 "and a value or writable attribute, #<Object>", TypeError); 332 "and a value or writable attribute, #<Object>", TypeError);
333 333
334 334
335 // === SyntaxError === 335 // === SyntaxError ===
336 336
337 // kInvalidRegExpFlags 337 // kInvalidRegExpFlags
338 test(function() { 338 test(function() {
339 eval("/a/x.test(\"a\");"); 339 eval("/a/x.test(\"a\");");
340 }, "Invalid regular expression flags", SyntaxError); 340 }, "Invalid regular expression flags", SyntaxError);
341 341
342 // kInvalidOrUnexpectedToken
343 test(function() {
344 eval("'\n'");
345 }, "Invalid or unexpected token", SyntaxError);
346
342 //kJsonParseUnexpectedEOS 347 //kJsonParseUnexpectedEOS
343 test(function() { 348 test(function() {
344 JSON.parse("{") 349 JSON.parse("{")
345 }, "Unexpected end of JSON input", SyntaxError); 350 }, "Unexpected end of JSON input", SyntaxError);
346 351
347 // kJsonParseUnexpectedTokenAt 352 // kJsonParseUnexpectedTokenAt
348 test(function() { 353 test(function() {
349 JSON.parse("/") 354 JSON.parse("/")
350 }, "Unexpected token / in JSON at position 0", SyntaxError); 355 }, "Unexpected token / in JSON at position 0", SyntaxError);
351 356
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 Number(1).toString(100); 445 Number(1).toString(100);
441 }, "toString() radix argument must be between 2 and 36", RangeError); 446 }, "toString() radix argument must be between 2 and 36", RangeError);
442 447
443 448
444 // === URIError === 449 // === URIError ===
445 450
446 // kURIMalformed 451 // kURIMalformed
447 test(function() { 452 test(function() {
448 decodeURI("%%"); 453 decodeURI("%%");
449 }, "URI malformed", URIError); 454 }, "URI malformed", URIError);
OLDNEW
« no previous file with comments | « src/parsing/parser-base.h ('k') | test/webkit/fast/js/basic-strict-mode-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698