diff --git a/uni_modules/uts-tests/utssdk/Number.uts b/uni_modules/uts-tests/utssdk/Number.uts index 3bee37925d6564edbc51740a23e455905d667c03..bd72af1288fc682f3e0cd24d03ecd864fa5cd271 100644 --- a/uni_modules/uts-tests/utssdk/Number.uts +++ b/uni_modules/uts-tests/utssdk/Number.uts @@ -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', () => {