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

Unified Diff: test/mjsunit/regress/regress-892742.js

Issue 7184034: Make line-terminators inside multi-line comments count. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 6 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 | « src/scanner-base.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-892742.js
diff --git a/test/mjsunit/regress/regress-892742.js b/test/mjsunit/regress/regress-892742.js
index a60395e872b3d163baba28a7fec7e36d86cac018..78a57b2ad57f5e734a0ff3ed2ee15f2a77e06b15 100644
--- a/test/mjsunit/regress/regress-892742.js
+++ b/test/mjsunit/regress/regress-892742.js
@@ -26,25 +26,23 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
function f() {
- return/* useless*/1;
+ return/* Counts as non-line-terminating whitespace */1;
};
-
-// According to ECMA-262, this comment should actually be parsed as a
-// line terminator making g() return undefined, but this is not the
-// way it's handled by Spidermonkey or KJS.
+// According to ECMA-262, this comment should be parsed as a
+// line terminator making g() return undefined.
function g() {
- return/* useless
- */2;
+ return/* Counts as line-terminator whitespace.
+ */2;
};
function h() {
- return// meaningful
+ return// Comment doesn't include line-terminator at end.
3;
};
assertEquals(1, f());
-assertEquals(2, g());
-assertTrue(typeof h() == 'undefined', 'h');
+assertEquals(undefined, g());
+assertEquals(undefined, h());
« no previous file with comments | « src/scanner-base.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698