提交 f07b25f9 编写于 作者: lizhongyi_'s avatar lizhongyi_

增加 parseFloat 测试用例

上级 d0cf394f
......@@ -50,6 +50,11 @@ export function testNumber(): Result {
})
test('parseFloat', () => {
expect(parseFloat("11.20")).toEqual(11.2);
expect(parseFloat("3.14")).toEqual(3.14);
expect(parseFloat(" 3.14 ")).toEqual(3.14);
expect(parseFloat("314e-2")).toEqual(3.14);
expect(parseFloat("0.0314E+2")).toEqual(3.14);
expect(parseFloat("3.14some non-digit characters")).toEqual(3.14);
})
test('isFinite', () => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册