diff --git a/OAT.xml b/OAT.xml index cca980dbf288f6caf3990c6eb5eab0a99da7b038..95ccfe17b99f30de08f4ec2866dffa9cfdb1245f 100644 --- a/OAT.xml +++ b/OAT.xml @@ -25,13 +25,21 @@ desc="" name="projectPolicy"> + @@ -41,11 +49,9 @@ - - @@ -57,68 +63,64 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + - - - - - - - - - - - + - - - - diff --git a/README.OpenSource b/README.OpenSource index bc2f1421706cd76891239199c357f14930e822e8..22c99bd05854071eaca35f0e9ffbead1ef431359 100644 --- a/README.OpenSource +++ b/README.OpenSource @@ -3,7 +3,7 @@ "Name": "yfree", "License": "BSD-3-Clause License", "License File": "LICENSE", - "Version Number": "4ffb77ed5f560fe34b866c45ca05a85ff44d0299", + "Version Number": "2.2.11", "Owner": "george.lihui@huawei.com", "Upstream URL": "https://gitee.com/2425116357/YFree", "Description": "YFree_Flutter." diff --git a/YFree_Flutter/Lite/example/ohos/entry/build-profile.json5 b/YFree_Flutter/Lite/example/ohos/entry/build-profile.json5 index 633d360fbc91a3186a23b66ab71b27e5618944cb..20c75049f2d45e57d267899b6547c79fb6aa84c1 100644 --- a/YFree_Flutter/Lite/example/ohos/entry/build-profile.json5 +++ b/YFree_Flutter/Lite/example/ohos/entry/build-profile.json5 @@ -1,18 +1,3 @@ -/* -* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - { "apiType": 'stageMode', "buildOption": { diff --git a/YFree_Flutter/Lite/example/ohos/entry/hvigorfile.ts b/YFree_Flutter/Lite/example/ohos/entry/hvigorfile.ts index 5bda56eeac3f79703639db986e2faaa433b0e48c..80e4ec5b81689f238c34614b167a0b9e9c83e8d9 100644 --- a/YFree_Flutter/Lite/example/ohos/entry/hvigorfile.ts +++ b/YFree_Flutter/Lite/example/ohos/entry/hvigorfile.ts @@ -1,17 +1,2 @@ -/* -* Copyright (c) 2024 SwanLink (Jiangsu) Technology Development Co., LTD. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - // Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently. export { hapTasks } from '@ohos/hvigor-ohos-plugin'; diff --git a/YFree_Flutter/Lite/example/ohos/hvigor/hvigor-config.json5 b/YFree_Flutter/Lite/example/ohos/hvigor/hvigor-config.json5 index 541ba35711b75986f9295410ee38fdb8f2572878..5ed0b910cce4b7e776973a892bf714f89085978e 100644 --- a/YFree_Flutter/Lite/example/ohos/hvigor/hvigor-config.json5 +++ b/YFree_Flutter/Lite/example/ohos/hvigor/hvigor-config.json5 @@ -1,18 +1,3 @@ -/* -* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - { "modelVersion": "5.0.0", "dependencies": { diff --git a/YFree_Flutter/Lite/example/ohos/hvigorfile.ts b/YFree_Flutter/Lite/example/ohos/hvigorfile.ts index 38626e385a5b47dd3cba0e1e83c614f091b7cc9e..0a7e3d8d74177458336fa2f524032b873cbe9552 100644 --- a/YFree_Flutter/Lite/example/ohos/hvigorfile.ts +++ b/YFree_Flutter/Lite/example/ohos/hvigorfile.ts @@ -1,18 +1,3 @@ -/* -* Copyright (c) 2024 SwanLink (Jiangsu) Technology Development Co., LTD. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - import { appTasks } from '@ohos/hvigor-ohos-plugin'; export default { diff --git a/YFree_Flutter/Lite/ohos/BuildProfile.ets b/YFree_Flutter/Lite/ohos/BuildProfile.ets index fde84590b4cebb8b75f4d038e944f120c643fe2c..2cd4826d9abeae13299c43ac2525b2edf2eb583d 100644 --- a/YFree_Flutter/Lite/ohos/BuildProfile.ets +++ b/YFree_Flutter/Lite/ohos/BuildProfile.ets @@ -1,21 +1,3 @@ -/* -* Copyright (c) 2024 SwanLink (Jiangsu) Technology Development Co., LTD. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/** - * Use these variables when you tailor your ArkTS code. They must be of the const type. - */ export const HAR_VERSION = '1.0.0'; export const BUILD_MODE_NAME = 'debug'; export const DEBUG = true; diff --git a/YFree_Flutter/Lite/ohos/Index.ets b/YFree_Flutter/Lite/ohos/Index.ets index 0f149e3c9bf8bbb17091d3994e95fd05dc438f00..ca3611b74d52f143e76fde3c23f83e922cfe0ed6 100644 --- a/YFree_Flutter/Lite/ohos/Index.ets +++ b/YFree_Flutter/Lite/ohos/Index.ets @@ -1,18 +1,3 @@ -/* -* Copyright (c) 2024 SwanLink (Jiangsu) Technology Development Co., LTD. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - import { YFlutterPlugin} from './src/main/ets/com/flutter_yfree/YFlutterPlugin' export { FlutterYFreePlugin} from './src/main/ets/com/flutter_yfree/FlutterYFreePlugin'; diff --git a/YFree_Flutter/Lite/ohos/build-profile.json5 b/YFree_Flutter/Lite/ohos/build-profile.json5 index 697dff23e224373edb713dc2b8a08ed7341d5b4c..312d38eb08629793b3484c7373213f22840c8d82 100644 --- a/YFree_Flutter/Lite/ohos/build-profile.json5 +++ b/YFree_Flutter/Lite/ohos/build-profile.json5 @@ -23,9 +23,6 @@ "targets": [ { "name": "default" - }, - { - "name": "ohosTest" } ] } diff --git a/YFree_Flutter/Lite/ohos/hvigorfile.ts b/YFree_Flutter/Lite/ohos/hvigorfile.ts index 12a327db0aeeb9462eb1dc098f5e808df40e3dce..42187071482d292588ad40babeda74f7b8d97a23 100644 --- a/YFree_Flutter/Lite/ohos/hvigorfile.ts +++ b/YFree_Flutter/Lite/ohos/hvigorfile.ts @@ -1,18 +1,3 @@ -/* -* Copyright (c) 2024 SwanLink (Jiangsu) Technology Development Co., LTD. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - import { harTasks } from '@ohos/hvigor-ohos-plugin'; export default { diff --git a/YFree_Flutter/Lite/ohos/oh-package-lock.json5 b/YFree_Flutter/Lite/ohos/oh-package-lock.json5 deleted file mode 100644 index 663044926ae562920054d42f1c9dc15dd2456139..0000000000000000000000000000000000000000 --- a/YFree_Flutter/Lite/ohos/oh-package-lock.json5 +++ /dev/null @@ -1,18 +0,0 @@ -{ - "meta": { - "stableOrder": true - }, - "lockfileVersion": 3, - "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", - "specifiers": { - "@ohos/flutter_ohos@../example/ohos/har/flutter.har": "@ohos/flutter_ohos@../example/ohos/har/flutter.har" - }, - "packages": { - "@ohos/flutter_ohos@../example/ohos/har/flutter.har": { - "name": "flutter", - "version": "1.0.0-584adb1509", - "resolved": "../example/ohos/har/flutter.har", - "registryType": "local" - } - } -} \ No newline at end of file diff --git a/YFree_Flutter/Lite/ohos/src/ohosTest/ets/test/Ability.test.ets b/YFree_Flutter/Lite/ohos/src/ohosTest/ets/test/Ability.test.ets deleted file mode 100644 index 40eab016e599b3fde160825d05015e9388598f93..0000000000000000000000000000000000000000 --- a/YFree_Flutter/Lite/ohos/src/ohosTest/ets/test/Ability.test.ets +++ /dev/null @@ -1,50 +0,0 @@ -/* -* Copyright (c) 2024 SwanLink (Jiangsu) Technology Development Co., LTD. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -import { hilog } from '@kit.PerformanceAnalysisKit'; -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; - -export default function abilityTest() { - describe('ActsAbilityTest', () => { - // Defines a test suite. Two parameters are supported: test suite name and test suite function. - beforeAll(() => { - // Presets an action, which is performed only once before all test cases of the test suite start. - // This API supports only one parameter: preset action function. - }) - beforeEach(() => { - // Presets an action, which is performed before each unit test case starts. - // The number of execution times is the same as the number of test cases defined by **it**. - // This API supports only one parameter: preset action function. - }) - afterEach(() => { - // Presets a clear action, which is performed after each unit test case ends. - // The number of execution times is the same as the number of test cases defined by **it**. - // This API supports only one parameter: clear action function. - }) - afterAll(() => { - // Presets a clear action, which is performed after all test cases of the test suite end. - // This API supports only one parameter: clear action function. - }) - it('assertContain', 0, () => { - // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. - hilog.info(0x0000, 'testTag', '%{public}s', 'it begin'); - let a = 'abc'; - let b = 'b'; - // Defines a variety of assertion methods, which are used to declare expected boolean conditions. - expect(a).assertContain(b); - expect(a).assertEqual(a); - }) - }) -} \ No newline at end of file diff --git a/YFree_Flutter/Lite/ohos/src/ohosTest/ets/test/List.test.ets b/YFree_Flutter/Lite/ohos/src/ohosTest/ets/test/List.test.ets deleted file mode 100644 index a88ef7e80505428a44812fceb130b4f31d51960d..0000000000000000000000000000000000000000 --- a/YFree_Flutter/Lite/ohos/src/ohosTest/ets/test/List.test.ets +++ /dev/null @@ -1,20 +0,0 @@ -/* -* Copyright (c) 2024 SwanLink (Jiangsu) Technology Development Co., LTD. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -import abilityTest from './Ability.test'; - -export default function testsuite() { - abilityTest(); -} \ No newline at end of file diff --git a/YFree_Flutter/Lite/ohos/src/ohosTest/ets/testability/TestAbility.ets b/YFree_Flutter/Lite/ohos/src/ohosTest/ets/testability/TestAbility.ets deleted file mode 100644 index f723ba3ec6c41570c0fdfd65d1f1fd12066c5107..0000000000000000000000000000000000000000 --- a/YFree_Flutter/Lite/ohos/src/ohosTest/ets/testability/TestAbility.ets +++ /dev/null @@ -1,70 +0,0 @@ -/* -* Copyright (c) 2024 SwanLink (Jiangsu) Technology Development Co., LTD. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -import { AbilityConstant, UIAbility, Want } from '@kit.AbilityKit'; -import { abilityDelegatorRegistry } from '@kit.TestKit'; -import { hilog } from '@kit.PerformanceAnalysisKit'; -import { window } from '@kit.ArkUI'; -import { Hypium } from '@ohos/hypium'; -import testsuite from '../test/List.test'; - -const ON_DESTROY_ERROR = -2; - -export default class TestAbility extends UIAbility { - abilityDelegator: abilityDelegatorRegistry.AbilityDelegator; - - constructor() { - super(); - this.abilityDelegator = abilityDelegatorRegistry.getAbilityDelegator(); - } - - onCreate(want: Want, launchParam: AbilityConstant.LaunchParam) { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onCreate'); - hilog.info(0x0000, 'testTag', '%{public}s', 'want param:' + JSON.stringify(want) ?? ''); - hilog.info(0x0000, 'testTag', '%{public}s', 'launchParam:' + JSON.stringify(launchParam) ?? ''); - let abilityDelegatorArguments: abilityDelegatorRegistry.AbilityDelegatorArgs; - abilityDelegatorArguments = abilityDelegatorRegistry.getArguments(); - hilog.info(0x0000, 'testTag', '%{public}s', 'start run testcase!!!'); - Hypium.hypiumTest(this.abilityDelegator, abilityDelegatorArguments, testsuite); - } - - onDestroy() { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onDestroy'); - this.abilityDelegator.finishTest('TestAbility onDestroy unexpectedly!', ON_DESTROY_ERROR, () => {}); - } - - onWindowStageCreate(windowStage: window.WindowStage) { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageCreate'); - windowStage.loadContent('testability/pages/Index', (err) => { - if (err.code) { - hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? ''); - return; - } - hilog.info(0x0000, 'testTag', 'Succeeded in loading the content.'); - }); - } - - onWindowStageDestroy() { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageDestroy'); - } - - onForeground() { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onForeground'); - } - - onBackground() { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onBackground'); - } -} \ No newline at end of file diff --git a/YFree_Flutter/Lite/ohos/src/ohosTest/ets/testability/pages/Index.ets b/YFree_Flutter/Lite/ohos/src/ohosTest/ets/testability/pages/Index.ets deleted file mode 100644 index 075d6598efae5d79d186a2b28d49db18661d136a..0000000000000000000000000000000000000000 --- a/YFree_Flutter/Lite/ohos/src/ohosTest/ets/testability/pages/Index.ets +++ /dev/null @@ -1,32 +0,0 @@ -/* -* Copyright (c) 2024 SwanLink (Jiangsu) Technology Development Co., LTD. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -@Entry -@Component -struct Index { - @State message: string = 'Hello World'; - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - } - .width('100%') - } - .height('100%') - } -} \ No newline at end of file diff --git a/YFree_Flutter/Lite/ohos/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ets b/YFree_Flutter/Lite/ohos/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ets deleted file mode 100644 index 064ad91e281b63be7d6cd23dad9f49478a25e710..0000000000000000000000000000000000000000 --- a/YFree_Flutter/Lite/ohos/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ets +++ /dev/null @@ -1,107 +0,0 @@ -/* -* Copyright (c) 2024 SwanLink (Jiangsu) Technology Development Co., LTD. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -import { abilityDelegatorRegistry, TestRunner } from '@kit.TestKit'; -import { UIAbility, Want } from '@kit.AbilityKit'; -import { BusinessError } from '@kit.BasicServicesKit'; -import { hilog } from '@kit.PerformanceAnalysisKit'; -import { resourceManager } from '@kit.LocalizationKit'; -import { util } from '@kit.ArkTS'; - -let abilityDelegator: abilityDelegatorRegistry.AbilityDelegator; -let abilityDelegatorArguments: abilityDelegatorRegistry.AbilityDelegatorArgs; -let jsonPath: string = 'mock/mock-config.json'; -let tag: string = 'testTag'; - -async function onAbilityCreateCallback(data: UIAbility) { - hilog.info(0x0000, 'testTag', 'onAbilityCreateCallback, data: ${}', JSON.stringify(data)); -} - -async function addAbilityMonitorCallback(err: BusinessError) { - hilog.info(0x0000, 'testTag', 'addAbilityMonitorCallback : %{public}s', JSON.stringify(err) ?? ''); -} - -export default class OpenHarmonyTestRunner implements TestRunner { - constructor() { - } - - onPrepare() { - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner OnPrepare'); - } - - async onRun() { - let tag = 'testTag'; - hilog.info(0x0000, tag, '%{public}s', 'OpenHarmonyTestRunner onRun run'); - abilityDelegatorArguments = abilityDelegatorRegistry.getArguments() - abilityDelegator = abilityDelegatorRegistry.getAbilityDelegator() - let moduleName = abilityDelegatorArguments.parameters['-m']; - let context = abilityDelegator.getAppContext().getApplicationContext().createModuleContext(moduleName); - let mResourceManager = context.resourceManager; - await checkMock(abilityDelegator, mResourceManager); - const bundleName = abilityDelegatorArguments.bundleName; - const testAbilityName: string = 'TestAbility'; - let lMonitor: abilityDelegatorRegistry.AbilityMonitor = { - abilityName: testAbilityName, - onAbilityCreate: onAbilityCreateCallback, - moduleName: moduleName - }; - abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) - const want: Want = { - bundleName: bundleName, - abilityName: testAbilityName, - moduleName: moduleName - }; - abilityDelegator.startAbility(want, (err: BusinessError, data: void) => { - hilog.info(0x0000, tag, 'startAbility : err : %{public}s', JSON.stringify(err) ?? ''); - hilog.info(0x0000, tag, 'startAbility : data : %{public}s', JSON.stringify(data) ?? ''); - }) - hilog.info(0x0000, tag, '%{public}s', 'OpenHarmonyTestRunner onRun end'); - } -} - -async function checkMock(abilityDelegator: abilityDelegatorRegistry.AbilityDelegator, - resourceManager: resourceManager.ResourceManager) { - let rawFile: Uint8Array; - try { - rawFile = resourceManager.getRawFileContentSync(jsonPath); - hilog.info(0x0000, tag, 'MockList file exists'); - let mockStr: string = util.TextDecoder.create('utf-8', { ignoreBOM: true }).decodeWithStream(rawFile); - let mockMap: Record = getMockList(mockStr); - try { - abilityDelegator.setMockList(mockMap) - } catch (error) { - let code = (error as BusinessError).code; - let message = (error as BusinessError).message; - hilog.error(0x0000, tag, `abilityDelegator.setMockList failed, error code: ${code}, message: ${message}.`); - } - } catch (error) { - let code = (error as BusinessError).code; - let message = (error as BusinessError).message; - hilog.error(0x0000, tag, - `ResourceManager:callback getRawFileContent failed, error code: ${code}, message: ${message}.`); - } -} - -function getMockList(jsonStr: string) { - let jsonObj: Record = JSON.parse(jsonStr); - let map: Map = new Map(Object.entries(jsonObj)); - let mockList: Record = {}; - map.forEach((value: object, key: string) => { - let realValue: string = value['source'].toString(); - mockList[key] = realValue; - }); - hilog.info(0x0000, tag, '%{public}s', 'mock-json value:' + JSON.stringify(mockList) ?? ''); - return mockList; -} \ No newline at end of file diff --git a/YFree_Flutter/Lite/ohos/src/ohosTest/module.json5 b/YFree_Flutter/Lite/ohos/src/ohosTest/module.json5 deleted file mode 100644 index 1c2ec42dc397ab612b5c383bb6c31e869be9c88b..0000000000000000000000000000000000000000 --- a/YFree_Flutter/Lite/ohos/src/ohosTest/module.json5 +++ /dev/null @@ -1,28 +0,0 @@ -{ - "module": { - "name": "yfree_test", - "type": "feature", - "description": "$string:module_test_desc", - "mainElement": "TestAbility", - "deviceTypes": [ - "default", - "tablet", - "2in1" - ], - "deliveryWithInstall": true, - "installationFree": false, - "pages": "$profile:test_pages", - "abilities": [ - { - "name": "TestAbility", - "srcEntry": "./ets/testability/TestAbility.ets", - "description": "$string:TestAbility_desc", - "icon": "$media:icon", - "label": "$string:TestAbility_label", - "exported": true, - "startWindowIcon": "$media:icon", - "startWindowBackground": "$color:start_window_background" - } - ] - } -} diff --git a/YFree_Flutter/Lite/ohos/src/ohosTest/resources/base/element/color.json b/YFree_Flutter/Lite/ohos/src/ohosTest/resources/base/element/color.json deleted file mode 100644 index 3c712962da3c2751c2b9ddb53559afcbd2b54a02..0000000000000000000000000000000000000000 --- a/YFree_Flutter/Lite/ohos/src/ohosTest/resources/base/element/color.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "color": [ - { - "name": "start_window_background", - "value": "#FFFFFF" - } - ] -} \ No newline at end of file diff --git a/YFree_Flutter/Lite/ohos/src/ohosTest/resources/base/element/string.json b/YFree_Flutter/Lite/ohos/src/ohosTest/resources/base/element/string.json deleted file mode 100644 index 65d8fa5a7cf54aa3943dcd0214f58d1771bc1f6c..0000000000000000000000000000000000000000 --- a/YFree_Flutter/Lite/ohos/src/ohosTest/resources/base/element/string.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "string": [ - { - "name": "module_test_desc", - "value": "test ability description" - }, - { - "name": "TestAbility_desc", - "value": "the test ability" - }, - { - "name": "TestAbility_label", - "value": "test label" - } - ] -} \ No newline at end of file diff --git a/YFree_Flutter/Lite/ohos/src/ohosTest/resources/base/media/icon.png b/YFree_Flutter/Lite/ohos/src/ohosTest/resources/base/media/icon.png deleted file mode 100644 index a39445dc87828b76fed6d2ec470dd455c45319e3..0000000000000000000000000000000000000000 Binary files a/YFree_Flutter/Lite/ohos/src/ohosTest/resources/base/media/icon.png and /dev/null differ diff --git a/YFree_Flutter/Lite/ohos/src/ohosTest/resources/base/profile/test_pages.json b/YFree_Flutter/Lite/ohos/src/ohosTest/resources/base/profile/test_pages.json deleted file mode 100644 index b7e7343cacb32ce982a45e76daad86e435e054fe..0000000000000000000000000000000000000000 --- a/YFree_Flutter/Lite/ohos/src/ohosTest/resources/base/profile/test_pages.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "src": [ - "testability/pages/Index" - ] -} diff --git a/YFree_Flutter/Lite/ohos/src/test/List.test.ets b/YFree_Flutter/Lite/ohos/src/test/List.test.ets index e3f1904373eb8182a07290c5b9a1287d1a9dd219..bb5b5c3731e283dd507c847560ee59bde477bbc7 100644 --- a/YFree_Flutter/Lite/ohos/src/test/List.test.ets +++ b/YFree_Flutter/Lite/ohos/src/test/List.test.ets @@ -1,18 +1,3 @@ -/* -* Copyright (c) 2024 SwanLink (Jiangsu) Technology Development Co., LTD. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - import localUnitTest from './LocalUnit.test'; export default function testsuite() { diff --git a/YFree_Flutter/Lite/ohos/src/test/LocalUnit.test.ets b/YFree_Flutter/Lite/ohos/src/test/LocalUnit.test.ets index 13b2128b8428b9368a257451baf665e38434bbac..165fc1615ee8618b4cb6a622f144a9a707eee99f 100644 --- a/YFree_Flutter/Lite/ohos/src/test/LocalUnit.test.ets +++ b/YFree_Flutter/Lite/ohos/src/test/LocalUnit.test.ets @@ -1,18 +1,3 @@ -/* -* Copyright (c) 2024 SwanLink (Jiangsu) Technology Development Co., LTD. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; export default function localUnitTest() {