diff options
author | Richard Gibson <richard.gibson@gmail.com> | 2014-06-07 14:22:49 -0400 |
---|---|---|
committer | Richard Gibson <richard.gibson@gmail.com> | 2014-06-07 14:35:01 -0400 |
commit | e1192af8726bcd25da58aba64b20d89e919230b9 (patch) | |
tree | acc247fb6c9480639220d1cbc38a64eca3177324 /test | |
parent | c18c6229c84cd2f0c9fe9f6fc3749e2c93608cc7 (diff) | |
download | jquery-e1192af8726bcd25da58aba64b20d89e919230b9.tar.gz jquery-e1192af8726bcd25da58aba64b20d89e919230b9.zip |
Core: Work around loss of precision from parseFloat
Fixes #15100
(cherry picked from commit b6e99eb43c35a3cd048c5c56d31c7e871f299a77)
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/core.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/unit/core.js b/test/unit/core.js index d8631b02f..dac59d3d6 100644 --- a/test/unit/core.js +++ b/test/unit/core.js @@ -457,7 +457,7 @@ test("isFunction", function() { }); test( "isNumeric", function() { - expect( 37 ); + expect( 38 ); var t = jQuery.isNumeric, Traditionalists = /** @constructor */ function(n) { @@ -485,6 +485,7 @@ test( "isNumeric", function() { ok( t("4.536"), "Positive floating point string"); ok( t(-2.6), "Negative floating point number"); ok( t(3.1415), "Positive floating point number"); + ok( t(1.5999999999999999), "Very precise floating point number" ); ok( t(8e5), "Exponential notation"); ok( t("123e-2"), "Exponential notation string"); ok( t(answer), "Custom .toString returning number"); |