diff --git a/arkoala-arkts/arkui/src/NativeLog.ets b/arkoala-arkts/arkui/src/NativeLog.ets index cfb54ac8fedcd17c4ba5f8e66a698a54d50e73e0..e868cf6864d19408459d94a38658e16519c2ff9a 100644 --- a/arkoala-arkts/arkui/src/NativeLog.ets +++ b/arkoala-arkts/arkui/src/NativeLog.ets @@ -61,13 +61,13 @@ export function nLog(...data: (object|int32|float32|boolean|string|undefined)[]) let result = new StringBuilder("") for (let i = 0; i < data.length; i++) { const fragment = data[i] == undefined ? "undefined" : data[i]!.toString() - if (fragment == "") return + if (fragment == "") continue result.append(fragment) if (i < data.length -1 ) { result.append(" ") } - result.append("\n") } + result.append("\n") NativeLog.Default.appendNativeLog(TEST_LOG_NUMBER, result.toString()) } diff --git a/ets-tests/ets/environment-tests/suites/WatchDecoratorTest.ets b/ets-tests/ets/environment-tests/suites/WatchDecoratorTest.ets index 168734736dacebc6cf92dc4d9eb8e099498c7370..241fd66f44fd02fae548d93610a914b7562fbc5d 100644 --- a/ets-tests/ets/environment-tests/suites/WatchDecoratorTest.ets +++ b/ets-tests/ets/environment-tests/suites/WatchDecoratorTest.ets @@ -39,6 +39,8 @@ export function suiteWatchDecorator(control: TestController) { testPageOnChange(control, 'WatchProp', [100, 100, 200, 200, 100], [ + '', + '', 'WatchC 1: propValue = 1', 'WatchP 2: value = 2', 'WatchC 3: propValue = 2', @@ -55,6 +57,8 @@ export function suiteWatchDecorator(control: TestController) { testPageOnChange(control, 'WatchLink', [100, 100, 200, 200, 100], [ + '', + '', 'WatchP 1: value = 2', 'WatchC 2: linkValue = 2', 'WatchP 3: value = 3', @@ -72,6 +76,9 @@ export function suiteWatchDecorator(control: TestController) { testPageOnChange(control, 'WatchProvideConsume', [100, 101, 200, 201, 202, 302, 301, 300, 101, 100], [ + '', + '', + '', 'WatchC1[200] 2: value1 = 56', 'WatchP1 1: value1 = 56', 'WatchC1[300] 3: value1 = 56', @@ -129,6 +136,7 @@ export function suiteWatchDecorator(control: TestController) { testPageOnChange(control, 'WatchAppStorageLink', [140, 130, 120,110,100], [ + '', 'WatchA 1: linkValueA = 140; storage = 140', 'WatchA 2: linkValueA = 120; storage = 120', 'WatchA 3: linkValueA = 110; storage = 110', @@ -158,6 +166,7 @@ export function suiteWatchDecorator(control: TestController) { testPageOnChange(control, 'WatchAppStorageProp', [141, 131, 121, 111, 101], [ + '', 'WatchB 1: propValueB = 141; storage = 141', 'WatchB 2: propValueB = 121; storage = 121', 'WatchB 3: propValueB = 111; storage = 111', @@ -169,6 +178,7 @@ export function suiteWatchDecorator(control: TestController) { testPageOnChange(control, 'WatchLocalStorage', [100, 101, 110, 111, 120, 121, 130, 131, 140, 141, 101, 100], [ + '', 'WatchA 1: linkValueA = 2; storage = 2', 'WatchB 2: propValueB = 12; storage = 11', 'WatchA 3: linkValueA = 110; storage = 110', @@ -186,6 +196,7 @@ export function suiteWatchDecorator(control: TestController) { testPageOnChange(control, 'WatchObjectLink', [100, 100, 200, 200], [ + '', 'value: 0', 'step: 0', 'value: 1', 'step: 1', // 100 'value: 2', 'step: 2', // 100