Reviewers: jochen, cira,
Message:
Asking for review.
Description:
Rebaseline/update the intl tests with ICU 52
Update the following 4 intl tests after ICU 52 roll.
date-format/parse-MMMdy.js
date-format/parse-mdyhms.js
number-format/parse-decimal.js
number-format/parse-percent.js
BUG=v8:3454
TEST=intl/* tests pass.
LOG=Y
Please review this at https://codereview.chromium.org/410733003/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+12, -5 lines):
M test/intl/date-format/parse-MMMdy.js
M test/intl/date-format/parse-mdyhms.js
M test/intl/number-format/parse-decimal.js
M test/intl/number-format/parse-percent.js
Index: test/intl/date-format/parse-MMMdy.js
diff --git a/test/intl/date-format/parse-MMMdy.js
b/test/intl/date-format/parse-MMMdy.js
index
b23a3cde3a1edb2a408b58a4a8ce2a2046786ad6..3e1d9dcf279482b2c0cbe7f2ebbb91119c9d69d1
100644
--- a/test/intl/date-format/parse-MMMdy.js
+++ b/test/intl/date-format/parse-MMMdy.js
@@ -41,8 +41,11 @@ assertEquals(1974, date.getUTCFullYear());
assertEquals(1, date.getUTCMonth());
assertEquals(4, date.getUTCDate());
-// Missing , in the pattern.
-assertEquals(undefined, dtf.v8Parse('Feb 4 1974'));
+// Missing , in the input is not a problem any more.
+date = dtf.v8Parse('Feb 4 1974');
+assertEquals(1974, date.getUTCFullYear());
+assertEquals(1, date.getUTCMonth());
+assertEquals(4, date.getUTCDate());
// Extra "th" after 4 in the pattern.
assertEquals(undefined, dtf.v8Parse('Feb 4th, 1974'));
Index: test/intl/date-format/parse-mdyhms.js
diff --git a/test/intl/date-format/parse-mdyhms.js
b/test/intl/date-format/parse-mdyhms.js
index
73efb620538edeea1b70f712381bb54f56f5e2d8..bd333c33b14212cb8f81cadd25f759da02a62e9f
100644
--- a/test/intl/date-format/parse-mdyhms.js
+++ b/test/intl/date-format/parse-mdyhms.js
@@ -34,7 +34,7 @@ var dtf = new Intl.DateTimeFormat(['en'],
timeZone: 'UTC'});
// Make sure we have pattern we expect (may change in the future).
-assertEquals('M/d/y h:mm:ss a', dtf.resolved.pattern);
+assertEquals('M/d/y, h:mm:ss a', dtf.resolved.pattern);
var date = dtf.v8Parse('2/4/74 12:30:42 pm');
assertEquals(1974, date.getUTCFullYear());
Index: test/intl/number-format/parse-decimal.js
diff --git a/test/intl/number-format/parse-decimal.js
b/test/intl/number-format/parse-decimal.js
index
ea3f8ddf30e161eecef48a98f806515ddc6178e6..01415b658f19870fafc4d13086f22bc73525228c
100644
--- a/test/intl/number-format/parse-decimal.js
+++ b/test/intl/number-format/parse-decimal.js
@@ -30,7 +30,9 @@ var nf = new Intl.NumberFormat(['en'],
{style: 'decimal'});
assertEquals(123.43, nf.v8Parse('123.43'));
assertEquals(123, nf.v8Parse('123'));
assertEquals(NaN, nf.v8Parse(NaN));
-assertEquals(12323, nf.v8Parse('123,23'));
+
+// a misplaced comma without a decimal point is not tolerated any more.
+assertEquals(undefined, nf.v8Parse('123,23'));
assertEquals(12323.456, nf.v8Parse('123,23.456'));
assertEquals(12323.456, nf.v8Parse('0000000123,23.456'));
assertEquals(-12323.456, nf.v8Parse('-123,23.456'));
Index: test/intl/number-format/parse-percent.js
diff --git a/test/intl/number-format/parse-percent.js
b/test/intl/number-format/parse-percent.js
index
4964da4ae73db5b36cf996139020202f40c44808..104c003860e65dd386d65bae732f06302829055e
100644
--- a/test/intl/number-format/parse-percent.js
+++ b/test/intl/number-format/parse-percent.js
@@ -30,7 +30,9 @@ var nf = new Intl.NumberFormat(['en'],
{style: 'percent'});
assertEquals(1.2343, nf.v8Parse('123.43%'));
assertEquals(1.23, nf.v8Parse('123%'));
assertEquals(NaN, nf.v8Parse(NaN));
-assertEquals(123.23, nf.v8Parse('123,23%'));
+
+// a misplaced comma without a decimal point is not tolerated any more.
+assertEquals(undefined, nf.v8Parse('123,23%'));
assertEquals(123.23456, nf.v8Parse('123,23.456%'));
assertEquals(123.23456, nf.v8Parse('0000000123,23.456%'));
assertEquals(-123.23456, nf.v8Parse('-123,23.456%'));
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.