Skip to content

Commit 27f9774

Browse files
committed
add tests for not rounding big numbers in the second step
1 parent 671b578 commit 27f9774

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/jasmine/tests/lib_increment_test.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -768,4 +768,12 @@ describe('increment', function() {
768768
examine({ start: 12345, step: 0.01, expected: [12345.01, 12345.02, 12345.03] });
769769
examine({ start: 12345, step: 0.1, expected: [12345.1, 12345.2, 12345.3] });
770770
});
771+
772+
it('should not round very big numbers in certain cases', function() {
773+
examine({ start: 1e+21, step: 1e+6, expected: [
774+
1.000000000000001e+21,
775+
1.0000000000000021e+21,
776+
1.0000000000000031e+21
777+
]});
778+
});
771779
});

0 commit comments

Comments
 (0)