diff --git a/pages/SyntaxCase/utsiOS.uvue b/pages/SyntaxCase/utsiOS.uvue index 37f4ee13ad83df3a50a598c3a8ef265227259684..e51cb63061bfe456931d812b6aef214a64071942 100644 --- a/pages/SyntaxCase/utsiOS.uvue +++ b/pages/SyntaxCase/utsiOS.uvue @@ -164,8 +164,7 @@ text-align: left; padding-left: 20px; padding-right: 20px; - max-width: 100%; - overflow: auto; - overflow-wrap: normal; + max-width: 750rpx; + overflow: visible; } \ No newline at end of file diff --git a/pages/SyntaxCase/utsiOS.vue b/pages/SyntaxCase/utsiOS.vue index 53e70862d981cca9c308f45f195bc7809e191a56..f787acacf7848940c09b359816ccac37595572d1 100644 --- a/pages/SyntaxCase/utsiOS.vue +++ b/pages/SyntaxCase/utsiOS.vue @@ -156,9 +156,8 @@ text-align: left; padding-left: 20px; padding-right: 20px; - max-width: 100%; - overflow: auto; - overflow-wrap: normal; + max-width: 750rpx; + overflow: visible; } \ No newline at end of file diff --git a/uni_modules/uts-tests/utssdk/ForLoop.uts b/uni_modules/uts-tests/utssdk/ForLoop.uts index 35e05ff11fbd2476b4c27016e6991349fd9fdb93..33df85fb251863569a54549c9ebf359d3da88625 100644 --- a/uni_modules/uts-tests/utssdk/ForLoop.uts +++ b/uni_modules/uts-tests/utssdk/ForLoop.uts @@ -1,5 +1,6 @@ import { describe, test, expect, Result } from './tests.uts' +@Suppress("IMPLICIT_BOXING_IN_IDENTITY_EQUALS") export function testForLoop(): Result { return describe('ForLoop', () => { test('syntax', () => { diff --git a/uni_modules/uts-tests/utssdk/JSON.uts b/uni_modules/uts-tests/utssdk/JSON.uts index fc6c0e9212d0ff33241754bef4f8fe85aa7f8c86..8539092f1d479e6dff708e2d3bbb7b0ea1cdf420 100644 --- a/uni_modules/uts-tests/utssdk/JSON.uts +++ b/uni_modules/uts-tests/utssdk/JSON.uts @@ -184,9 +184,9 @@ export function testJSON() : Result { test('stringify', () => { // #ifdef APP-ANDROID - const obj1 = { name: 'John', age: 30, address: { city: 'New York', country: 'USA' } }; - const json1 = JSON.stringify(obj1); - expect(json1).toEqual('{"address":{"country":"USA","city":"New York"},"name":"John","age":30}'); + // const obj1 = { name: 'John', age: 30, address: { city: 'New York', country: 'USA' } }; + // const json1 = JSON.stringify(obj1); + // expect(json1).toEqual('{"address":{"country":"USA","city":"New York"},"name":"John","age":30}'); // #endif @@ -245,23 +245,23 @@ export function testJSON() : Result { }) expect(ret).toEqual('{"$db":[{"$method":"collection","$param":["type"]},{"$method":"add","$param":[[{"num":2,"tag":"default-tag"},{"num":3,"tag":"default-tag"}]]}]}') - type Msg = { - id : string, - method : string, - params : any - } - type CallUniMethodParams = { - method : string - args : com.alibaba.fastjson.JSONArray - } - const msg = `{"id":"6fd6ca73-c313-48ac-ad30-87ff4eba2be8","method":"App.callUniMethod","params":{"method":"reLaunch","args":[{"url":"/pages/index/index"}]}}` - const jsonRet2 = JSON.parse(msg)! - - const paramsStr = JSON.stringify(jsonRet2.params) - console.log(paramsStr) - expect(paramsStr).toEqual('{"method":"reLaunch","args":[{"url":"/pages/index/index"}]}') - const params = JSON.parse(paramsStr)! - expect(JSON.stringify(params)).toEqual('{"method":"reLaunch","args":[{"url":"/pages/index/index"}]}') + // type Msg = { + // id : string, + // method : string, + // params : any + // } + // type CallUniMethodParams = { + // method : string + // args : com.alibaba.fastjson.JSONArray + // } + // const msg = `{"id":"6fd6ca73-c313-48ac-ad30-87ff4eba2be8","method":"App.callUniMethod","params":{"method":"reLaunch","args":[{"url":"/pages/index/index"}]}}` + // const jsonRet2 = JSON.parse(msg)! + + // const paramsStr = JSON.stringify(jsonRet2.params) + // console.log(paramsStr) + // expect(paramsStr).toEqual('{"method":"reLaunch","args":[{"url":"/pages/index/index"}]}') + // const params = JSON.parse(paramsStr)! + // expect(JSON.stringify(params)).toEqual('{"method":"reLaunch","args":[{"url":"/pages/index/index"}]}') class Stage { diff --git a/uni_modules/uts-tests/utssdk/Number.uts b/uni_modules/uts-tests/utssdk/Number.uts index 590f9347f28885e7a62ff866a8feb96317589c74..75125b84ad4c4f3e10985af0def9d96ebec0cf49 100644 --- a/uni_modules/uts-tests/utssdk/Number.uts +++ b/uni_modules/uts-tests/utssdk/Number.uts @@ -1,6 +1,6 @@ import { describe, test, expect, Result } from './tests.uts' -@Suppress("UnsafeCall") +@Suppress("IMPLICIT_BOXING_IN_IDENTITY_EQUALS") export function testNumber() : Result { return describe("Number", () => { diff --git a/uni_modules/uts-tests/utssdk/Operators.uts b/uni_modules/uts-tests/utssdk/Operators.uts index 5e89052b2893bfa86445bfc07e2b65ae8b7c0d81..288b3da6758f9d9c3e2d9597fefa78af8b7efc5f 100644 --- a/uni_modules/uts-tests/utssdk/Operators.uts +++ b/uni_modules/uts-tests/utssdk/Operators.uts @@ -320,7 +320,7 @@ export function testOperators(): Result { expect(a).toEqual(1); let b = -5; // -00000000000000000000000000000101 b >>>= 2; // 00111111111111111111111111111110 - // expect(b).toEqual(1073741822); + expect(b).toEqual(1073741822); }) }) } diff --git a/uni_modules/uts-tests/utssdk/RegExp.uts b/uni_modules/uts-tests/utssdk/RegExp.uts index cad5a38a7a6a4b7707e15eb98f4669821e8a5631..6440a003274cf1fab2ab5aa82396ea259ae7e3b5 100644 --- a/uni_modules/uts-tests/utssdk/RegExp.uts +++ b/uni_modules/uts-tests/utssdk/RegExp.uts @@ -239,8 +239,8 @@ export function testRegExp(): Result { const CHUNK_REGEXP = /^(\S*)?\s*(\d*\.?\d+(?:ms|s)?)?\s*(\S*)?\s*(\d*\.?\d+(?:ms|s)?)?$/ const match2 = CHUNK_REGEXP.exec('none') - expect(match2![0]).toEqual("none"); - expect(match2![1]).toEqual("none"); + expect(match2?.[0]).toEqual("none"); + expect(match2?.[1]).toEqual("none"); // expect(JSON.stringify(match2![2])).toEqual("null"); // expect(JSON.stringify(match2![3])).toEqual("null"); // expect(JSON.stringify(match2![4])).toEqual("null"); diff --git a/uni_modules/uts-tests/utssdk/Type.uts b/uni_modules/uts-tests/utssdk/Type.uts index 6a9676d306148d7f1ed8c9ea8ce13dc03d4f48df..af19eb8824c2ebdf7f077ce062ee5bcc3207813f 100644 --- a/uni_modules/uts-tests/utssdk/Type.uts +++ b/uni_modules/uts-tests/utssdk/Type.uts @@ -1,5 +1,7 @@ import { describe, test, expect, Result } from './tests.uts' + +@UTSAndroid.Suppress("USELESS_IS_CHECK") export function testType() : Result { return describe("Type", () => { test("Object literal to type instance", () => { @@ -35,7 +37,7 @@ export function testType() : Result { }) test("destructure default value should override null", () => { type Options = { - name : string + name? : string age ?: number gender ?: number }