Index: test/intl/number-format/parse-decimal.js |
diff --git a/src/extensions/i18n/footer.js b/test/intl/number-format/parse-decimal.js |
similarity index 77% |
copy from src/extensions/i18n/footer.js |
copy to test/intl/number-format/parse-decimal.js |
index ac33f1e24224957ff05d2cddef072987dd96942d..2a7fd37366ef75d635926d8814999900d2987eb4 100644 |
--- a/src/extensions/i18n/footer.js |
+++ b/test/intl/number-format/parse-decimal.js |
@@ -26,15 +26,15 @@ |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
// limitations under the License. |
-// ECMAScript 402 API implementation is broken into separate files for |
-// each service. The build system combines them together into one |
-// Intl namespace. |
+var nf = new Intl.NumberFormat(['en'], {style: 'decimal'}); |
-// Fix RegExp global state so we don't fail WebKit layout test: |
-// fast/js/regexp-caching.html |
-// It seems that 'g' or test() operations leave state changed. |
-var CLEANUP_RE = new RegExp(''); |
-CLEANUP_RE.test(''); |
+assertEquals(123.43, nf.v8Parse('123.43')); |
+assertEquals(123, nf.v8Parse('123')); |
+assertEquals(NaN, nf.v8Parse(NaN)); |
+assertEquals(12323, 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')); |
-return Intl; |
-}()); |
+// Scientific notation gets ignored. |
+assertEquals(123.456, nf.v8Parse('123.456e-3')); |