From df57be63aef5465d2e8ba4a3284fdc271fab4614 Mon Sep 17 00:00:00 2001 From: rex <1491721419@qq.com> Date: Thu, 16 Oct 2025 10:13:41 +0800 Subject: [PATCH] =?UTF-8?q?BptaUseSoftware=E5=B7=A5=E7=A8=8B=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BptaUseSoftware/.gitignore | 12 ------- BptaUseSoftware/entry/.gitignore | 6 ---- .../entry/src/main/ets/pages/Audio.ets | 15 ++++++++ .../entry/src/main/ets/pages/Download.ets | 15 ++++++++ .../entry/src/main/ets/pages/GpsOne.ets | 15 ++++++++ .../entry/src/main/ets/pages/GpsTwo.ets | 15 ++++++++ .../entry/src/main/ets/pages/Index.ets | 15 ++++++++ .../src/main/ets/pages/LockByApplication.ets | 15 ++++++++ .../entry/src/main/ets/pages/LockBySystem.ets | 15 ++++++++ .../entry/src/main/ets/pages/Upload.ets | 15 ++++++++ .../entry/src/mock/mock-config.json5 | 2 -- .../src/ohosTest/ets/test/Ability.test.ets | 35 ------------------- .../entry/src/ohosTest/ets/test/List.test.ets | 5 --- .../entry/src/ohosTest/module.json5 | 13 ------- BptaUseSoftware/entry/src/test/List.test.ets | 5 --- .../entry/src/test/LocalUnit.test.ets | 33 ----------------- 16 files changed, 120 insertions(+), 111 deletions(-) delete mode 100644 BptaUseSoftware/.gitignore delete mode 100644 BptaUseSoftware/entry/.gitignore delete mode 100644 BptaUseSoftware/entry/src/mock/mock-config.json5 delete mode 100644 BptaUseSoftware/entry/src/ohosTest/ets/test/Ability.test.ets delete mode 100644 BptaUseSoftware/entry/src/ohosTest/ets/test/List.test.ets delete mode 100644 BptaUseSoftware/entry/src/ohosTest/module.json5 delete mode 100644 BptaUseSoftware/entry/src/test/List.test.ets delete mode 100644 BptaUseSoftware/entry/src/test/LocalUnit.test.ets diff --git a/BptaUseSoftware/.gitignore b/BptaUseSoftware/.gitignore deleted file mode 100644 index d2ff2014..00000000 --- a/BptaUseSoftware/.gitignore +++ /dev/null @@ -1,12 +0,0 @@ -/node_modules -/oh_modules -/local.properties -/.idea -**/build -/.hvigor -.cxx -/.clangd -/.clang-format -/.clang-tidy -**/.test -/.appanalyzer \ No newline at end of file diff --git a/BptaUseSoftware/entry/.gitignore b/BptaUseSoftware/entry/.gitignore deleted file mode 100644 index e2713a27..00000000 --- a/BptaUseSoftware/entry/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -/node_modules -/oh_modules -/.preview -/build -/.cxx -/.test \ No newline at end of file diff --git a/BptaUseSoftware/entry/src/main/ets/pages/Audio.ets b/BptaUseSoftware/entry/src/main/ets/pages/Audio.ets index 78baa051..415bb3e6 100644 --- a/BptaUseSoftware/entry/src/main/ets/pages/Audio.ets +++ b/BptaUseSoftware/entry/src/main/ets/pages/Audio.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2025 Huawei Device 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. + */ + /** * 最佳实践:合理使用音频播放 */ diff --git a/BptaUseSoftware/entry/src/main/ets/pages/Download.ets b/BptaUseSoftware/entry/src/main/ets/pages/Download.ets index f8f13924..8691ab2a 100644 --- a/BptaUseSoftware/entry/src/main/ets/pages/Download.ets +++ b/BptaUseSoftware/entry/src/main/ets/pages/Download.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2025 Huawei Device 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. + */ + /** * 最佳实践:后台合理使用上传下载 * 场景二:下载 diff --git a/BptaUseSoftware/entry/src/main/ets/pages/GpsOne.ets b/BptaUseSoftware/entry/src/main/ets/pages/GpsOne.ets index 46c3c4f4..3ddcde79 100644 --- a/BptaUseSoftware/entry/src/main/ets/pages/GpsOne.ets +++ b/BptaUseSoftware/entry/src/main/ets/pages/GpsOne.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2025 Huawei Device 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. + */ + /** * 最佳实践:后台合理使用定位导航服务 * 场景一:方式1 diff --git a/BptaUseSoftware/entry/src/main/ets/pages/GpsTwo.ets b/BptaUseSoftware/entry/src/main/ets/pages/GpsTwo.ets index a3661fd5..fa912405 100644 --- a/BptaUseSoftware/entry/src/main/ets/pages/GpsTwo.ets +++ b/BptaUseSoftware/entry/src/main/ets/pages/GpsTwo.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2025 Huawei Device 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. + */ + /** * 最佳实践:后台合理使用定位导航服务 * 场景二:方式2 diff --git a/BptaUseSoftware/entry/src/main/ets/pages/Index.ets b/BptaUseSoftware/entry/src/main/ets/pages/Index.ets index 8e2d24ad..0f481f69 100644 --- a/BptaUseSoftware/entry/src/main/ets/pages/Index.ets +++ b/BptaUseSoftware/entry/src/main/ets/pages/Index.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2025 Huawei Device 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 { diff --git a/BptaUseSoftware/entry/src/main/ets/pages/LockByApplication.ets b/BptaUseSoftware/entry/src/main/ets/pages/LockByApplication.ets index 05b2736b..fe063ec6 100644 --- a/BptaUseSoftware/entry/src/main/ets/pages/LockByApplication.ets +++ b/BptaUseSoftware/entry/src/main/ets/pages/LockByApplication.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2025 Huawei Device 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. + */ + /** * 最佳实践:后台合理使用系统资源 * 场景一:应用直接持锁 diff --git a/BptaUseSoftware/entry/src/main/ets/pages/LockBySystem.ets b/BptaUseSoftware/entry/src/main/ets/pages/LockBySystem.ets index ba481213..37dd742f 100644 --- a/BptaUseSoftware/entry/src/main/ets/pages/LockBySystem.ets +++ b/BptaUseSoftware/entry/src/main/ets/pages/LockBySystem.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2025 Huawei Device 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. + */ + /** * 最佳实践:后台合理使用系统资源 * 场景一:系统帮助应用持锁 diff --git a/BptaUseSoftware/entry/src/main/ets/pages/Upload.ets b/BptaUseSoftware/entry/src/main/ets/pages/Upload.ets index 56f5cb42..902ecae1 100644 --- a/BptaUseSoftware/entry/src/main/ets/pages/Upload.ets +++ b/BptaUseSoftware/entry/src/main/ets/pages/Upload.ets @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2025 Huawei Device 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. + */ + /** * 最佳实践:后台合理使用上传下载 * 场景一:上传 diff --git a/BptaUseSoftware/entry/src/mock/mock-config.json5 b/BptaUseSoftware/entry/src/mock/mock-config.json5 deleted file mode 100644 index 7a73a41b..00000000 --- a/BptaUseSoftware/entry/src/mock/mock-config.json5 +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/BptaUseSoftware/entry/src/ohosTest/ets/test/Ability.test.ets b/BptaUseSoftware/entry/src/ohosTest/ets/test/Ability.test.ets deleted file mode 100644 index 85c78f67..00000000 --- a/BptaUseSoftware/entry/src/ohosTest/ets/test/Ability.test.ets +++ /dev/null @@ -1,35 +0,0 @@ -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/BptaUseSoftware/entry/src/ohosTest/ets/test/List.test.ets b/BptaUseSoftware/entry/src/ohosTest/ets/test/List.test.ets deleted file mode 100644 index 794c7dc4..00000000 --- a/BptaUseSoftware/entry/src/ohosTest/ets/test/List.test.ets +++ /dev/null @@ -1,5 +0,0 @@ -import abilityTest from './Ability.test'; - -export default function testsuite() { - abilityTest(); -} \ No newline at end of file diff --git a/BptaUseSoftware/entry/src/ohosTest/module.json5 b/BptaUseSoftware/entry/src/ohosTest/module.json5 deleted file mode 100644 index 55725a92..00000000 --- a/BptaUseSoftware/entry/src/ohosTest/module.json5 +++ /dev/null @@ -1,13 +0,0 @@ -{ - "module": { - "name": "entry_test", - "type": "feature", - "deviceTypes": [ - "phone", - "tablet", - "2in1" - ], - "deliveryWithInstall": true, - "installationFree": false - } -} diff --git a/BptaUseSoftware/entry/src/test/List.test.ets b/BptaUseSoftware/entry/src/test/List.test.ets deleted file mode 100644 index bb5b5c37..00000000 --- a/BptaUseSoftware/entry/src/test/List.test.ets +++ /dev/null @@ -1,5 +0,0 @@ -import localUnitTest from './LocalUnit.test'; - -export default function testsuite() { - localUnitTest(); -} \ No newline at end of file diff --git a/BptaUseSoftware/entry/src/test/LocalUnit.test.ets b/BptaUseSoftware/entry/src/test/LocalUnit.test.ets deleted file mode 100644 index 165fc161..00000000 --- a/BptaUseSoftware/entry/src/test/LocalUnit.test.ets +++ /dev/null @@ -1,33 +0,0 @@ -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; - -export default function localUnitTest() { - describe('localUnitTest', () => { - // 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. - 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 -- Gitee