diff --git a/uni_modules/uts-advance/utssdk/app-ios/index.uts b/uni_modules/uts-advance/utssdk/app-ios/index.uts index 49a201e2b48c5669ff15d6deb275c190dfdd83a8..2497c1a0c279416c88116c7feb8edba02f4d95c1 100644 --- a/uni_modules/uts-advance/utssdk/app-ios/index.uts +++ b/uni_modules/uts-advance/utssdk/app-ios/index.uts @@ -214,3 +214,20 @@ export function logFunctionTest(){ } console.log(testFun) } + + +export class User { + + private name : string; + private age : Int; + + constructor(hostP : string, port : Int) { + this.name = hostP; + this.age = port; + } + + describeSelf():string{ + let text = "name = " + this.name + ";age = " + `${this.age}` + return text + } +} \ No newline at end of file diff --git a/uni_modules/uts-tests/utssdk/Number.uts b/uni_modules/uts-tests/utssdk/Number.uts index 302dbe2919fb42e8ec024360d814baca2b5641d9..8e762416bc3b63f6a371789d55fc2b7d8ad45b6e 100644 --- a/uni_modules/uts-tests/utssdk/Number.uts +++ b/uni_modules/uts-tests/utssdk/Number.uts @@ -88,6 +88,12 @@ export function testNumber() : Result { expect((-10.22).toString(8)).toEqual("-12.16050753412172704"); expect((123456789987654).toString(16)).toEqual("7048861cc146"); expect((-0xff).toString(2)).toEqual("-11111111"); + const a = 1e38 + expect(a.toString(16)).toEqual("4b3b4ca85a86c4000000000000000000"); + expect(a.toString(2)).toEqual("1001011001110110100110010101000010110101000011011000100000000000000000000000000000000000000000000000000000000000000000000000000") + const b = 1e22 + expect(b.toString(12)).toEqual("27373a86ba1a194a65054"); + }) test('valueOf', () => {