提交 bdee5dcf 编写于 作者: 杜庆泉's avatar 杜庆泉

Math.ceil 增加NaN 测试示例

上级 e3a4d4f4
...@@ -113,6 +113,7 @@ export function testMath(): Result { ...@@ -113,6 +113,7 @@ export function testMath(): Result {
}) })
test('ceil', () => { test('ceil', () => {
expect(Math.ceil(0.95)).toEqual(1); expect(Math.ceil(0.95)).toEqual(1);
expect(Math.ceil(NaN)).toEqual(NaN);
expect(Math.ceil(4)).toEqual(4); expect(Math.ceil(4)).toEqual(4);
expect(Math.ceil(7.004)).toEqual(8); expect(Math.ceil(7.004)).toEqual(8);
expect(Math.ceil(-7.004)).toEqual(-7); expect(Math.ceil(-7.004)).toEqual(-7);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册