diff --git a/uni_modules/uts-tests/utssdk/Global.uts b/uni_modules/uts-tests/utssdk/Global.uts index 843b1839bae33bbaa2ca6801d4a3e54872bb093b..8267142a01cc66d9866529efbe4e85a1785edeaa 100644 --- a/uni_modules/uts-tests/utssdk/Global.uts +++ b/uni_modules/uts-tests/utssdk/Global.uts @@ -35,6 +35,9 @@ export function testGlobal(): Result { expect(parseInt("9223372036854775807")).toEqual(9.223372036854778e+18) expect(parseInt("9223372036854775807000")).toEqual(9.223372036854777e+21) expect(parseInt("922337203685477580700099999999999999999999999999999999999999999999999999999999999999999")).toEqual(9.223372036854776e+86) + expect(parseInt("50") / 100).toEqual(0.5); + expect(parseInt("500") / 100).toEqual(5); + }) test('parseFloat', () => { @@ -44,6 +47,8 @@ export function testGlobal(): Result { 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); + expect(parseFloat("100") / 50).toEqual(2.0); + }) test('encodeURI', () => { diff --git a/uni_modules/uts-tests/utssdk/KeyWord.uts b/uni_modules/uts-tests/utssdk/KeyWord.uts index b760fcaa0c08d26fc776ed769fb5435bea5c7eb7..fe191108b925c777caa4c77ce6b62452cc5d3fc7 100644 --- a/uni_modules/uts-tests/utssdk/KeyWord.uts +++ b/uni_modules/uts-tests/utssdk/KeyWord.uts @@ -48,6 +48,11 @@ class Parent { } class ChildrenTest extends Parent { + + constructor(weight: number) { + super(weight) + } + override eat(): string { super.eat() return "children instance method"