From e6145f289cc0f6d761fc3d8bae98b6efe0bf0683 Mon Sep 17 00:00:00 2001 From: buzhuyu Date: Fri, 28 Jul 2023 10:44:31 +0800 Subject: [PATCH] delete crossplatform in commonlibrary description:delete crossplatform in commonlibrary issue:https://gitee.com/openharmony/xts_acts/issues/I7OO4P Signed-off-by: buzhuyu --- commonlibrary/BUILD.gn | 2 - commonlibrary/crossplatform/BUILD.gn | 42 - .../AppScope/app.json | 16 - .../resources/base/element/string.json | 8 - .../resources/base/media/app_icon.png | 0 .../commonlibraryArrayListetstest/BUILD.gn | 49 - .../commonlibraryArrayListetstest/Test.json | 19 - .../signature/openharmony_sx.p7b | Bin 3468 -> 0 bytes .../src/main/ets/TestAbility/TestAbility.ets | 62 - .../src/main/ets/TestAbility/pages/Index.ets | 48 - .../ets/TestRunner/OpenHarmonyTestRunner.ts | 49 - .../src/main/ets/test/ArrayList.test.ets | 1300 --- .../src/main/ets/test/List.test.ets | 19 - .../src/main/module.json | 36 - .../main/resources/base/element/color.json | 8 - .../main/resources/base/element/string.json | 16 - .../src/main/resources/base/media/icon.png | 0 .../resources/base/profile/test_pages.json | 5 - .../AppScope/app.json | 16 - .../resources/base/element/string.json | 8 - .../resources/base/media/app_icon.png | Bin 6790 -> 0 bytes .../BUILD.gn | 50 - .../Test.json | 27 - .../signature/openharmony_sx.p7b | Bin 3472 -> 0 bytes .../src/main/ets/TestAbility/TestAbility.ets | 62 - .../src/main/ets/TestAbility/pages/Index.ets | 48 - .../ets/TestRunner/OpenHarmonyTestRunner.ts | 49 - .../src/main/ets/test/LightWeightMap.test.ets | 1194 --- .../src/main/ets/test/List.test.ets | 19 - .../src/main/module.json | 36 - .../main/resources/base/element/color.json | 8 - .../main/resources/base/element/string.json | 16 - .../src/main/resources/base/media/icon.png | Bin 6790 -> 0 bytes .../resources/base/profile/test_pages.json | 5 - .../AppScope/app.json | 16 - .../resources/base/element/string.json | 8 - .../resources/base/media/app_icon.png | 0 .../BUILD.gn | 49 - .../Test.json | 27 - .../signature/openharmony_sx.p7b | Bin 3472 -> 0 bytes .../src/main/ets/TestAbility/TestAbility.ets | 62 - .../src/main/ets/TestAbility/pages/Index.ets | 48 - .../ets/TestRunner/OpenHarmonyTestRunner.ts | 49 - .../src/main/ets/test/LightWeightSet.test.ets | 799 -- .../src/main/ets/test/List.test.ets | 19 - .../src/main/module.json | 36 - .../main/resources/base/element/color.json | 8 - .../main/resources/base/element/string.json | 16 - .../src/main/resources/base/media/icon.png | 0 .../resources/base/profile/test_pages.json | 5 - .../AppScope/app.json | 16 - .../resources/base/element/string.json | 8 - .../resources/base/media/app_icon.png | Bin 6790 -> 0 bytes .../commonlibraryLinkedListetstest/BUILD.gn | 49 - .../commonlibraryLinkedListetstest/Test.json | 27 - .../signature/openharmony_sx.p7b | Bin 3468 -> 0 bytes .../src/main/ets/TestAbility/TestAbility.ets | 62 - .../src/main/ets/TestAbility/pages/Index.ets | 48 - .../ets/TestRunner/OpenHarmonyTestRunner.ts | 49 - .../src/main/ets/test/LinkedList.test.ets | 2411 ----- .../src/main/ets/test/List.test.ets | 19 - .../src/main/module.json | 36 - .../main/resources/base/element/color.json | 8 - .../main/resources/base/element/string.json | 16 - .../src/main/resources/base/media/icon.png | Bin 6790 -> 0 bytes .../resources/base/profile/test_pages.json | 5 - .../AppScope/app.json | 16 - .../resources/base/element/string.json | 8 - .../resources/base/media/app_icon.png | 0 .../commonlibraryListetstest/BUILD.gn | 49 - .../commonlibraryListetstest/Test.json | 27 - .../signature/openharmony_sx.p7b | Bin 3464 -> 0 bytes .../src/main/ets/TestAbility/TestAbility.ets | 62 - .../src/main/ets/TestAbility/pages/Index.ets | 48 - .../ets/TestRunner/OpenHarmonyTestRunner.ts | 49 - .../src/main/ets/test/List.test.ets | 19 - .../src/main/ets/test/List2.test.ets | 1271 --- .../src/main/module.json | 36 - .../main/resources/base/element/color.json | 8 - .../main/resources/base/element/string.json | 16 - .../src/main/resources/base/media/icon.png | 0 .../resources/base/profile/test_pages.json | 5 - .../AppScope/app.json | 16 - .../resources/base/element/string.json | 8 - .../resources/base/media/app_icon.png | Bin 6790 -> 0 bytes .../commonlibraryTreeMapetstest/BUILD.gn | 49 - .../commonlibraryTreeMapetstest/Test.json | 20 - .../signature/openharmony_sx.p7b | Bin 3466 -> 0 bytes .../src/main/ets/TestAbility/TestAbility.ets | 62 - .../src/main/ets/TestAbility/pages/Index.ets | 48 - .../ets/TestRunner/OpenHarmonyTestRunner.ts | 49 - .../src/main/ets/test/List.test.ets | 19 - .../src/main/ets/test/TreeMap.test.ets | 732 -- .../src/main/module.json | 36 - .../main/resources/base/element/color.json | 8 - .../main/resources/base/element/string.json | 16 - .../src/main/resources/base/media/icon.png | Bin 6790 -> 0 bytes .../resources/base/profile/test_pages.json | 5 - .../AppScope/app.json | 16 - .../resources/base/element/string.json | 8 - .../resources/base/media/app_icon.png | Bin 6790 -> 0 bytes .../commonlibraryWorkeretstest/BUILD.gn | 49 - .../commonlibraryWorkeretstest/Test.json | 21 - .../signature/openharmony_sx.p7b | Bin 3463 -> 0 bytes .../src/main/ets/TestAbility/TestAbility.ets | 62 - .../src/main/ets/TestAbility/pages/Index.ets | 48 - .../ets/TestRunner/OpenHarmonyTestRunner.ts | 49 - .../src/main/ets/test/List.test.ets | 18 - .../src/main/ets/test/Worker.test.ets | 1555 ---- .../src/main/ets/workers/newworker.js | 51 - .../src/main/ets/workers/newworker_002.js | 22 - .../src/main/ets/workers/newworker_003.js | 21 - .../src/main/ets/workers/newworker_004.js | 22 - .../src/main/ets/workers/newworker_005.js | 20 - .../src/main/ets/workers/newworker_006.js | 20 - .../src/main/ets/workers/newworker_007.js | 20 - .../src/main/ets/workers/newworker_008.js | 20 - .../src/main/ets/workers/newworker_009.js | 42 - .../src/main/ets/workers/newworker_0091.js | 21 - .../src/main/ets/workers/newworker_010.js | 38 - .../src/main/ets/workers/newworker_0101.js | 22 - .../src/main/ets/workers/newworker_011.js | 49 - .../src/main/ets/workers/newworker_0111.js | 22 - .../src/main/ets/workers/newworker_012.js | 49 - .../src/main/ets/workers/newworker_0121.js | 36 - .../src/main/ets/workers/newworker_0122.js | 25 - .../src/main/ets/workers/newworker_013.js | 50 - .../src/main/ets/workers/newworker_0131.js | 22 - .../src/main/ets/workers/newworker_014.js | 50 - .../src/main/ets/workers/newworker_0141.js | 23 - .../src/main/ets/workers/newworker_015.js | 46 - .../src/main/ets/workers/newworker_0151.js | 39 - .../src/main/ets/workers/newworker_0152.js | 22 - .../src/main/ets/workers/newworker_016.js | 23 - .../src/main/ets/workers/newworker_017.js | 29 - .../src/main/ets/workers/newworker_018.js | 24 - .../src/main/ets/workers/newworker_019.js | 23 - .../src/main/ets/workers/newworker_020.js | 23 - .../src/main/ets/workers/newworker_021.js | 24 - .../src/main/ets/workers/newworker_022.js | 26 - .../src/main/ets/workers/newworker_023.js | 26 - .../src/main/ets/workers/newworker_024.js | 27 - .../src/main/ets/workers/newworker_025.js | 21 - .../src/main/ets/workers/newworker_026.js | 23 - .../src/main/ets/workers/newworker_027.js | 22 - .../src/main/ets/workers/newworker_028.js | 43 - .../src/main/ets/workers/newworker_029.js | 24 - .../src/main/ets/workers/newworker_030.js | 21 - .../src/main/ets/workers/newworker_031.js | 21 - .../src/main/ets/workers/newworker_032.js | 46 - .../src/main/ets/workers/newworker_033.js | 51 - .../src/main/ets/workers/newworker_034.js | 22 - .../src/main/ets/workers/newworker_035.js | 38 - .../src/main/ets/workers/newworker_036.js | 51 - .../src/main/module.json | 36 - .../main/resources/base/element/color.json | 8 - .../main/resources/base/element/string.json | 16 - .../src/main/resources/base/media/icon.png | Bin 6790 -> 0 bytes .../resources/base/profile/test_pages.json | 5 - .../AppScope/app.json | 16 - .../resources/base/element/string.json | 8 - .../resources/base/media/app_icon.png | Bin 6790 -> 0 bytes .../commonlibrarybufferetstest/BUILD.gn | 49 - .../commonlibrarybufferetstest/Test.json | 19 - .../signature/openharmony_sx.p7b | Bin 3463 -> 0 bytes .../src/main/ets/TestAbility/TestAbility.ets | 62 - .../src/main/ets/TestAbility/pages/Index.ets | 48 - .../ets/TestRunner/OpenHarmonyTestRunner.ts | 49 - .../src/main/ets/test/Buffer.test.ets | 4003 -------- .../src/main/ets/test/List.test.ets | 19 - .../src/main/module.json | 36 - .../main/resources/base/element/color.json | 8 - .../main/resources/base/element/string.json | 16 - .../src/main/resources/base/media/icon.png | Bin 6790 -> 0 bytes .../resources/base/profile/test_pages.json | 5 - .../AppScope/app.json | 16 - .../resources/base/element/string.json | 8 - .../resources/base/media/app_icon.png | Bin 6790 -> 0 bytes .../commonlibraryconvertxmletstest/BUILD.gn | 49 - .../commonlibraryconvertxmletstest/Test.json | 27 - .../signature/openharmony_sx.p7b | Bin 3468 -> 0 bytes .../src/main/ets/TestAbility/TestAbility.ets | 62 - .../src/main/ets/TestAbility/pages/Index.ets | 48 - .../ets/TestRunner/OpenHarmonyTestRunner.ts | 49 - .../src/main/ets/test/List.test.ets | 19 - .../src/main/ets/test/convertxml.test.ets | 213 - .../src/main/module.json | 36 - .../main/resources/base/element/color.json | 8 - .../main/resources/base/element/string.json | 16 - .../src/main/resources/base/media/icon.png | Bin 6790 -> 0 bytes .../resources/base/profile/test_pages.json | 5 - .../AppScope/app.json | 16 - .../resources/base/element/string.json | 8 - .../resources/base/media/app_icon.png | Bin 6790 -> 0 bytes .../commonlibrarydequeetstest/BUILD.gn | 49 - .../commonlibrarydequeetstest/Test.json | 27 - .../signature/openharmony_sx.p7b | Bin 3463 -> 0 bytes .../src/main/ets/TestAbility/TestAbility.ets | 62 - .../src/main/ets/TestAbility/pages/Index.ets | 48 - .../ets/TestRunner/OpenHarmonyTestRunner.ts | 49 - .../src/main/ets/test/Deque.test.ets | 596 -- .../src/main/ets/test/List.test.ets | 19 - .../src/main/module.json | 36 - .../main/resources/base/element/color.json | 8 - .../main/resources/base/element/string.json | 16 - .../src/main/resources/base/media/icon.png | Bin 6790 -> 0 bytes .../resources/base/profile/test_pages.json | 5 - .../AppScope/app.json | 16 - .../resources/base/element/string.json | 8 - .../resources/base/media/app_icon.png | Bin 6790 -> 0 bytes .../commonlibraryhashmapetstest/BUILD.gn | 49 - .../commonlibraryhashmapetstest/Test.json | 27 - .../signature/openharmony_sx.p7b | Bin 3465 -> 0 bytes .../src/main/ets/TestAbility/TestAbility.ets | 62 - .../src/main/ets/TestAbility/pages/Index.ets | 48 - .../ets/TestRunner/OpenHarmonyTestRunner.ts | 49 - .../src/main/ets/test/HashMap.test.ets | 973 -- .../src/main/ets/test/List.test.ets | 19 - .../src/main/module.json | 36 - .../main/resources/base/element/color.json | 8 - .../main/resources/base/element/string.json | 16 - .../src/main/resources/base/media/icon.png | Bin 6790 -> 0 bytes .../resources/base/profile/test_pages.json | 5 - .../AppScope/app.json | 16 - .../resources/base/element/string.json | 8 - .../resources/base/media/app_icon.png | Bin 6790 -> 0 bytes .../commonlibraryhashsetetstest/BUILD.gn | 49 - .../commonlibraryhashsetetstest/Test.json | 27 - .../signature/openharmony_sx.p7b | Bin 3465 -> 0 bytes .../src/main/ets/TestAbility/TestAbility.ets | 62 - .../src/main/ets/TestAbility/pages/Index.ets | 48 - .../ets/TestRunner/OpenHarmonyTestRunner.ts | 49 - .../src/main/ets/test/HashSet.test.ets | 605 -- .../src/main/ets/test/List.test.ets | 19 - .../src/main/module.json | 36 - .../main/resources/base/element/color.json | 8 - .../main/resources/base/element/string.json | 16 - .../src/main/resources/base/media/icon.png | Bin 6790 -> 0 bytes .../resources/base/profile/test_pages.json | 5 - .../AppScope/app.json | 16 - .../resources/base/element/string.json | 8 - .../resources/base/media/app_icon.png | Bin 6790 -> 0 bytes .../commonlibraryplainarrayetstest/BUILD.gn | 49 - .../commonlibraryplainarrayetstest/Test.json | 27 - .../signature/openharmony_sx.p7b | Bin 3469 -> 0 bytes .../src/main/ets/TestAbility/TestAbility.ets | 62 - .../src/main/ets/TestAbility/pages/Index.ets | 48 - .../ets/TestRunner/OpenHarmonyTestRunner.ts | 49 - .../src/main/ets/test/List.test.ets | 19 - .../src/main/ets/test/PlainArray.test.ets | 790 -- .../src/main/module.json | 36 - .../main/resources/base/element/color.json | 8 - .../main/resources/base/element/string.json | 16 - .../src/main/resources/base/media/icon.png | Bin 6790 -> 0 bytes .../resources/base/profile/test_pages.json | 5 - .../AppScope/app.json | 16 - .../resources/base/element/string.json | 8 - .../resources/base/media/app_icon.png | Bin 6790 -> 0 bytes .../commonlibraryprocessetstest/BUILD.gn | 49 - .../commonlibraryprocessetstest/Test.json | 27 - .../signature/openharmony_sx.p7b | Bin 3465 -> 0 bytes .../src/main/ets/TestAbility/TestAbility.ets | 62 - .../src/main/ets/TestAbility/pages/Index.ets | 48 - .../ets/TestRunner/OpenHarmonyTestRunner.ts | 49 - .../src/main/ets/test/List.test.ets | 19 - .../src/main/ets/test/Process.test.ets | 1099 --- .../src/main/module.json | 36 - .../main/resources/base/element/color.json | 8 - .../main/resources/base/element/string.json | 16 - .../src/main/resources/base/media/icon.png | Bin 6790 -> 0 bytes .../resources/base/profile/test_pages.json | 5 - .../AppScope/app.json | 16 - .../resources/base/element/string.json | 8 - .../resources/base/media/app_icon.png | Bin 6790 -> 0 bytes .../commonlibraryqueueetstest/BUILD.gn | 38 - .../commonlibraryqueueetstest/Test.json | 19 - .../signature/openharmony_sx.p7b | Bin 3464 -> 0 bytes .../src/main/ets/TestAbility/TestAbility.ets | 62 - .../src/main/ets/TestAbility/pages/Index.ets | 48 - .../ets/TestRunner/OpenHarmonyTestRunner.ts | 49 - .../src/main/ets/test/List.test.ets | 19 - .../src/main/ets/test/Queue.test.ets | 401 - .../src/main/module.json | 36 - .../main/resources/base/element/color.json | 8 - .../main/resources/base/element/string.json | 16 - .../src/main/resources/base/media/icon.png | Bin 6790 -> 0 bytes .../resources/base/profile/test_pages.json | 5 - .../AppScope/app.json | 16 - .../resources/base/element/string.json | 8 - .../resources/base/media/app_icon.png | Bin 6790 -> 0 bytes .../commonlibrarystacketstest/BUILD.gn | 38 - .../commonlibrarystacketstest/Test.json | 19 - .../signature/openharmony_sx.p7b | Bin 3463 -> 0 bytes .../src/main/ets/TestAbility/TestAbility.ets | 62 - .../src/main/ets/TestAbility/pages/Index.ets | 48 - .../ets/TestRunner/OpenHarmonyTestRunner.ts | 49 - .../src/main/ets/test/List.test.ets | 19 - .../src/main/ets/test/Stack.test.ets | 532 -- .../src/main/module.json | 36 - .../main/resources/base/element/color.json | 8 - .../main/resources/base/element/string.json | 16 - .../src/main/resources/base/media/icon.png | Bin 6790 -> 0 bytes .../resources/base/profile/test_pages.json | 5 - .../AppScope/app.json | 16 - .../resources/base/element/string.json | 8 - .../resources/base/media/app_icon.png | Bin 6790 -> 0 bytes .../commonlibrarytaskpooletstest/BUILD.gn | 38 - .../commonlibrarytaskpooletstest/Test.json | 19 - .../signature/openharmony_sx.p7b | Bin 3466 -> 0 bytes .../src/main/ets/TestAbility/TestAbility.ets | 62 - .../src/main/ets/TestAbility/pages/Index.ets | 48 - .../ets/TestRunner/OpenHarmonyTestRunner.ts | 49 - .../src/main/ets/test/List.test.ets | 19 - .../src/main/ets/test/Taskpool.test.ets | 1772 ---- .../src/main/module.json | 36 - .../main/resources/base/element/color.json | 8 - .../main/resources/base/element/string.json | 16 - .../src/main/resources/base/media/icon.png | Bin 6790 -> 0 bytes .../resources/base/profile/test_pages.json | 5 - .../AppScope/app.json | 16 - .../resources/base/element/string.json | 8 - .../resources/base/media/app_icon.png | Bin 6790 -> 0 bytes .../commonlibrarytreesetetstest/BUILD.gn | 49 - .../commonlibrarytreesetetstest/Test.json | 27 - .../signature/openharmony_sx.p7b | Bin 3465 -> 0 bytes .../src/main/ets/TestAbility/TestAbility.ets | 62 - .../src/main/ets/TestAbility/pages/Index.ets | 48 - .../ets/TestRunner/OpenHarmonyTestRunner.ts | 49 - .../src/main/ets/test/List.test.ets | 19 - .../src/main/ets/test/TreeSet.test.ets | 780 -- .../src/main/module.json | 36 - .../main/resources/base/element/color.json | 8 - .../main/resources/base/element/string.json | 16 - .../src/main/resources/base/media/icon.png | Bin 6790 -> 0 bytes .../resources/base/profile/test_pages.json | 5 - .../commonlibraryurietstest/AppScope/app.json | 16 - .../resources/base/element/string.json | 8 - .../resources/base/media/app_icon.png | Bin 6790 -> 0 bytes .../commonlibraryurietstest/BUILD.gn | 49 - .../commonlibraryurietstest/Test.json | 27 - .../signature/openharmony_sx.p7b | Bin 3461 -> 0 bytes .../src/main/ets/TestAbility/TestAbility.ets | 62 - .../src/main/ets/TestAbility/pages/Index.ets | 48 - .../ets/TestRunner/OpenHarmonyTestRunner.ts | 49 - .../src/main/ets/test/List.test.ets | 19 - .../src/main/ets/test/uri.test.ets | 521 -- .../src/main/module.json | 36 - .../main/resources/base/element/color.json | 8 - .../main/resources/base/element/string.json | 16 - .../src/main/resources/base/media/icon.png | Bin 6790 -> 0 bytes .../resources/base/profile/test_pages.json | 5 - .../commonlibraryurletstest/AppScope/app.json | 16 - .../resources/base/element/string.json | 8 - .../resources/base/media/app_icon.png | Bin 6790 -> 0 bytes .../commonlibraryurletstest/BUILD.gn | 49 - .../commonlibraryurletstest/Test.json | 27 - .../signature/openharmony_sx.p7b | Bin 3461 -> 0 bytes .../src/main/ets/TestAbility/TestAbility.ets | 62 - .../src/main/ets/TestAbility/pages/Index.ets | 48 - .../ets/TestRunner/OpenHarmonyTestRunner.ts | 49 - .../src/main/ets/test/List.test.ets | 19 - .../src/main/ets/test/url.test.ets | 1737 ---- .../src/main/module.json | 36 - .../main/resources/base/element/color.json | 8 - .../main/resources/base/element/string.json | 16 - .../src/main/resources/base/media/icon.png | Bin 6790 -> 0 bytes .../resources/base/profile/test_pages.json | 5 - .../AppScope/app.json | 16 - .../resources/base/element/string.json | 8 - .../resources/base/media/app_icon.png | Bin 6790 -> 0 bytes .../commonlibraryutiletstest/BUILD.gn | 49 - .../commonlibraryutiletstest/Test.json | 27 - .../signature/openharmony_sx.p7b | Bin 3463 -> 0 bytes .../src/main/ets/TestAbility/TestAbility.ets | 62 - .../src/main/ets/TestAbility/pages/Index.ets | 48 - .../ets/TestRunner/OpenHarmonyTestRunner.ts | 49 - .../src/main/ets/test/List.test.ets | 19 - .../src/main/ets/test/util.test.ets | 8226 ----------------- .../src/main/module.json | 36 - .../main/resources/base/element/color.json | 8 - .../main/resources/base/element/string.json | 16 - .../src/main/resources/base/media/icon.png | Bin 6790 -> 0 bytes .../resources/base/profile/test_pages.json | 5 - .../commonlibraryxmletstest/AppScope/app.json | 16 - .../resources/base/element/string.json | 8 - .../resources/base/media/app_icon.png | Bin 6790 -> 0 bytes .../commonlibraryxmletstest/BUILD.gn | 38 - .../commonlibraryxmletstest/Test.json | 19 - .../signature/openharmony_sx.p7b | Bin 3468 -> 0 bytes .../src/main/ets/TestAbility/TestAbility.ets | 62 - .../src/main/ets/TestAbility/pages/Index.ets | 48 - .../ets/TestRunner/OpenHarmonyTestRunner.ts | 49 - .../src/main/ets/test/List.test.ets | 23 - .../src/main/ets/test/xml.test.ets | 1667 ---- .../src/main/ets/test/xmlEventType.test.ets | 171 - .../src/main/ets/test/xmlParseOption.test.ets | 165 - .../src/main/module.json | 36 - .../main/resources/base/element/color.json | 8 - .../main/resources/base/element/string.json | 16 - .../src/main/resources/base/media/icon.png | Bin 6790 -> 0 bytes .../resources/base/profile/test_pages.json | 5 - 401 files changed, 42362 deletions(-) delete mode 100755 commonlibrary/crossplatform/BUILD.gn delete mode 100755 commonlibrary/crossplatform/commonlibraryArrayListetstest/AppScope/app.json delete mode 100755 commonlibrary/crossplatform/commonlibraryArrayListetstest/AppScope/resources/base/element/string.json delete mode 100755 commonlibrary/crossplatform/commonlibraryArrayListetstest/AppScope/resources/base/media/app_icon.png delete mode 100755 commonlibrary/crossplatform/commonlibraryArrayListetstest/BUILD.gn delete mode 100755 commonlibrary/crossplatform/commonlibraryArrayListetstest/Test.json delete mode 100755 commonlibrary/crossplatform/commonlibraryArrayListetstest/signature/openharmony_sx.p7b delete mode 100755 commonlibrary/crossplatform/commonlibraryArrayListetstest/src/main/ets/TestAbility/TestAbility.ets delete mode 100755 commonlibrary/crossplatform/commonlibraryArrayListetstest/src/main/ets/TestAbility/pages/Index.ets delete mode 100755 commonlibrary/crossplatform/commonlibraryArrayListetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts delete mode 100755 commonlibrary/crossplatform/commonlibraryArrayListetstest/src/main/ets/test/ArrayList.test.ets delete mode 100755 commonlibrary/crossplatform/commonlibraryArrayListetstest/src/main/ets/test/List.test.ets delete mode 100755 commonlibrary/crossplatform/commonlibraryArrayListetstest/src/main/module.json delete mode 100755 commonlibrary/crossplatform/commonlibraryArrayListetstest/src/main/resources/base/element/color.json delete mode 100755 commonlibrary/crossplatform/commonlibraryArrayListetstest/src/main/resources/base/element/string.json delete mode 100755 commonlibrary/crossplatform/commonlibraryArrayListetstest/src/main/resources/base/media/icon.png delete mode 100755 commonlibrary/crossplatform/commonlibraryArrayListetstest/src/main/resources/base/profile/test_pages.json delete mode 100755 commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/AppScope/app.json delete mode 100755 commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/AppScope/resources/base/element/string.json delete mode 100755 commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/AppScope/resources/base/media/app_icon.png delete mode 100755 commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/BUILD.gn delete mode 100755 commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/Test.json delete mode 100755 commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/signature/openharmony_sx.p7b delete mode 100755 commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/src/main/ets/TestAbility/TestAbility.ets delete mode 100755 commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/src/main/ets/TestAbility/pages/Index.ets delete mode 100755 commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts delete mode 100755 commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/src/main/ets/test/LightWeightMap.test.ets delete mode 100755 commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/src/main/ets/test/List.test.ets delete mode 100755 commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/src/main/module.json delete mode 100755 commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/src/main/resources/base/element/color.json delete mode 100755 commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/src/main/resources/base/element/string.json delete mode 100755 commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/src/main/resources/base/media/icon.png delete mode 100755 commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/src/main/resources/base/profile/test_pages.json delete mode 100755 commonlibrary/crossplatform/commonlibraryLightWeightSetetstest/AppScope/app.json delete mode 100755 commonlibrary/crossplatform/commonlibraryLightWeightSetetstest/AppScope/resources/base/element/string.json delete mode 100755 commonlibrary/crossplatform/commonlibraryLightWeightSetetstest/AppScope/resources/base/media/app_icon.png delete mode 100755 commonlibrary/crossplatform/commonlibraryLightWeightSetetstest/BUILD.gn delete mode 100755 commonlibrary/crossplatform/commonlibraryLightWeightSetetstest/Test.json delete mode 100755 commonlibrary/crossplatform/commonlibraryLightWeightSetetstest/signature/openharmony_sx.p7b delete mode 100755 commonlibrary/crossplatform/commonlibraryLightWeightSetetstest/src/main/ets/TestAbility/TestAbility.ets delete mode 100755 commonlibrary/crossplatform/commonlibraryLightWeightSetetstest/src/main/ets/TestAbility/pages/Index.ets delete mode 100755 commonlibrary/crossplatform/commonlibraryLightWeightSetetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts delete mode 100755 commonlibrary/crossplatform/commonlibraryLightWeightSetetstest/src/main/ets/test/LightWeightSet.test.ets delete mode 100755 commonlibrary/crossplatform/commonlibraryLightWeightSetetstest/src/main/ets/test/List.test.ets delete mode 100755 commonlibrary/crossplatform/commonlibraryLightWeightSetetstest/src/main/module.json delete mode 100755 commonlibrary/crossplatform/commonlibraryLightWeightSetetstest/src/main/resources/base/element/color.json delete mode 100755 commonlibrary/crossplatform/commonlibraryLightWeightSetetstest/src/main/resources/base/element/string.json delete mode 100755 commonlibrary/crossplatform/commonlibraryLightWeightSetetstest/src/main/resources/base/media/icon.png delete mode 100755 commonlibrary/crossplatform/commonlibraryLightWeightSetetstest/src/main/resources/base/profile/test_pages.json delete mode 100755 commonlibrary/crossplatform/commonlibraryLinkedListetstest/AppScope/app.json delete mode 100755 commonlibrary/crossplatform/commonlibraryLinkedListetstest/AppScope/resources/base/element/string.json delete mode 100755 commonlibrary/crossplatform/commonlibraryLinkedListetstest/AppScope/resources/base/media/app_icon.png delete mode 100755 commonlibrary/crossplatform/commonlibraryLinkedListetstest/BUILD.gn delete mode 100755 commonlibrary/crossplatform/commonlibraryLinkedListetstest/Test.json delete mode 100755 commonlibrary/crossplatform/commonlibraryLinkedListetstest/signature/openharmony_sx.p7b delete mode 100755 commonlibrary/crossplatform/commonlibraryLinkedListetstest/src/main/ets/TestAbility/TestAbility.ets delete mode 100755 commonlibrary/crossplatform/commonlibraryLinkedListetstest/src/main/ets/TestAbility/pages/Index.ets delete mode 100755 commonlibrary/crossplatform/commonlibraryLinkedListetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts delete mode 100755 commonlibrary/crossplatform/commonlibraryLinkedListetstest/src/main/ets/test/LinkedList.test.ets delete mode 100755 commonlibrary/crossplatform/commonlibraryLinkedListetstest/src/main/ets/test/List.test.ets delete mode 100755 commonlibrary/crossplatform/commonlibraryLinkedListetstest/src/main/module.json delete mode 100755 commonlibrary/crossplatform/commonlibraryLinkedListetstest/src/main/resources/base/element/color.json delete mode 100755 commonlibrary/crossplatform/commonlibraryLinkedListetstest/src/main/resources/base/element/string.json delete mode 100755 commonlibrary/crossplatform/commonlibraryLinkedListetstest/src/main/resources/base/media/icon.png delete mode 100755 commonlibrary/crossplatform/commonlibraryLinkedListetstest/src/main/resources/base/profile/test_pages.json delete mode 100755 commonlibrary/crossplatform/commonlibraryListetstest/AppScope/app.json delete mode 100755 commonlibrary/crossplatform/commonlibraryListetstest/AppScope/resources/base/element/string.json delete mode 100755 commonlibrary/crossplatform/commonlibraryListetstest/AppScope/resources/base/media/app_icon.png delete mode 100755 commonlibrary/crossplatform/commonlibraryListetstest/BUILD.gn delete mode 100755 commonlibrary/crossplatform/commonlibraryListetstest/Test.json delete mode 100755 commonlibrary/crossplatform/commonlibraryListetstest/signature/openharmony_sx.p7b delete mode 100755 commonlibrary/crossplatform/commonlibraryListetstest/src/main/ets/TestAbility/TestAbility.ets delete mode 100755 commonlibrary/crossplatform/commonlibraryListetstest/src/main/ets/TestAbility/pages/Index.ets delete mode 100755 commonlibrary/crossplatform/commonlibraryListetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts delete mode 100755 commonlibrary/crossplatform/commonlibraryListetstest/src/main/ets/test/List.test.ets delete mode 100755 commonlibrary/crossplatform/commonlibraryListetstest/src/main/ets/test/List2.test.ets delete mode 100755 commonlibrary/crossplatform/commonlibraryListetstest/src/main/module.json delete mode 100755 commonlibrary/crossplatform/commonlibraryListetstest/src/main/resources/base/element/color.json delete mode 100755 commonlibrary/crossplatform/commonlibraryListetstest/src/main/resources/base/element/string.json delete mode 100755 commonlibrary/crossplatform/commonlibraryListetstest/src/main/resources/base/media/icon.png delete mode 100755 commonlibrary/crossplatform/commonlibraryListetstest/src/main/resources/base/profile/test_pages.json delete mode 100644 commonlibrary/crossplatform/commonlibraryTreeMapetstest/AppScope/app.json delete mode 100644 commonlibrary/crossplatform/commonlibraryTreeMapetstest/AppScope/resources/base/element/string.json delete mode 100644 commonlibrary/crossplatform/commonlibraryTreeMapetstest/AppScope/resources/base/media/app_icon.png delete mode 100644 commonlibrary/crossplatform/commonlibraryTreeMapetstest/BUILD.gn delete mode 100644 commonlibrary/crossplatform/commonlibraryTreeMapetstest/Test.json delete mode 100644 commonlibrary/crossplatform/commonlibraryTreeMapetstest/signature/openharmony_sx.p7b delete mode 100644 commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/ets/TestAbility/TestAbility.ets delete mode 100644 commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/ets/TestAbility/pages/Index.ets delete mode 100644 commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts delete mode 100644 commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/ets/test/List.test.ets delete mode 100644 commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/ets/test/TreeMap.test.ets delete mode 100644 commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/module.json delete mode 100644 commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/resources/base/element/color.json delete mode 100644 commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/resources/base/element/string.json delete mode 100644 commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/resources/base/media/icon.png delete mode 100644 commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/resources/base/profile/test_pages.json delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/AppScope/app.json delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/AppScope/resources/base/element/string.json delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/AppScope/resources/base/media/app_icon.png delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/BUILD.gn delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/Test.json delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/signature/openharmony_sx.p7b delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/TestAbility/TestAbility.ets delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/TestAbility/pages/Index.ets delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/test/List.test.ets delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/test/Worker.test.ets delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker.js delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_002.js delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_003.js delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_004.js delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_005.js delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_006.js delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_007.js delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_008.js delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_009.js delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_0091.js delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_010.js delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_0101.js delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_011.js delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_0111.js delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_012.js delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_0121.js delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_0122.js delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_013.js delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_0131.js delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_014.js delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_0141.js delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_015.js delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_0151.js delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_0152.js delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_016.js delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_017.js delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_018.js delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_019.js delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_020.js delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_021.js delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_022.js delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_023.js delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_024.js delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_025.js delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_026.js delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_027.js delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_028.js delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_029.js delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_030.js delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_031.js delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_032.js delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_033.js delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_034.js delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_035.js delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_036.js delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/module.json delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/resources/base/element/color.json delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/resources/base/element/string.json delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/resources/base/media/icon.png delete mode 100755 commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/resources/base/profile/test_pages.json delete mode 100755 commonlibrary/crossplatform/commonlibrarybufferetstest/AppScope/app.json delete mode 100755 commonlibrary/crossplatform/commonlibrarybufferetstest/AppScope/resources/base/element/string.json delete mode 100755 commonlibrary/crossplatform/commonlibrarybufferetstest/AppScope/resources/base/media/app_icon.png delete mode 100755 commonlibrary/crossplatform/commonlibrarybufferetstest/BUILD.gn delete mode 100755 commonlibrary/crossplatform/commonlibrarybufferetstest/Test.json delete mode 100755 commonlibrary/crossplatform/commonlibrarybufferetstest/signature/openharmony_sx.p7b delete mode 100755 commonlibrary/crossplatform/commonlibrarybufferetstest/src/main/ets/TestAbility/TestAbility.ets delete mode 100755 commonlibrary/crossplatform/commonlibrarybufferetstest/src/main/ets/TestAbility/pages/Index.ets delete mode 100755 commonlibrary/crossplatform/commonlibrarybufferetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts delete mode 100755 commonlibrary/crossplatform/commonlibrarybufferetstest/src/main/ets/test/Buffer.test.ets delete mode 100755 commonlibrary/crossplatform/commonlibrarybufferetstest/src/main/ets/test/List.test.ets delete mode 100755 commonlibrary/crossplatform/commonlibrarybufferetstest/src/main/module.json delete mode 100755 commonlibrary/crossplatform/commonlibrarybufferetstest/src/main/resources/base/element/color.json delete mode 100755 commonlibrary/crossplatform/commonlibrarybufferetstest/src/main/resources/base/element/string.json delete mode 100755 commonlibrary/crossplatform/commonlibrarybufferetstest/src/main/resources/base/media/icon.png delete mode 100755 commonlibrary/crossplatform/commonlibrarybufferetstest/src/main/resources/base/profile/test_pages.json delete mode 100644 commonlibrary/crossplatform/commonlibraryconvertxmletstest/AppScope/app.json delete mode 100644 commonlibrary/crossplatform/commonlibraryconvertxmletstest/AppScope/resources/base/element/string.json delete mode 100644 commonlibrary/crossplatform/commonlibraryconvertxmletstest/AppScope/resources/base/media/app_icon.png delete mode 100644 commonlibrary/crossplatform/commonlibraryconvertxmletstest/BUILD.gn delete mode 100644 commonlibrary/crossplatform/commonlibraryconvertxmletstest/Test.json delete mode 100644 commonlibrary/crossplatform/commonlibraryconvertxmletstest/signature/openharmony_sx.p7b delete mode 100644 commonlibrary/crossplatform/commonlibraryconvertxmletstest/src/main/ets/TestAbility/TestAbility.ets delete mode 100644 commonlibrary/crossplatform/commonlibraryconvertxmletstest/src/main/ets/TestAbility/pages/Index.ets delete mode 100644 commonlibrary/crossplatform/commonlibraryconvertxmletstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts delete mode 100644 commonlibrary/crossplatform/commonlibraryconvertxmletstest/src/main/ets/test/List.test.ets delete mode 100644 commonlibrary/crossplatform/commonlibraryconvertxmletstest/src/main/ets/test/convertxml.test.ets delete mode 100644 commonlibrary/crossplatform/commonlibraryconvertxmletstest/src/main/module.json delete mode 100644 commonlibrary/crossplatform/commonlibraryconvertxmletstest/src/main/resources/base/element/color.json delete mode 100644 commonlibrary/crossplatform/commonlibraryconvertxmletstest/src/main/resources/base/element/string.json delete mode 100644 commonlibrary/crossplatform/commonlibraryconvertxmletstest/src/main/resources/base/media/icon.png delete mode 100644 commonlibrary/crossplatform/commonlibraryconvertxmletstest/src/main/resources/base/profile/test_pages.json delete mode 100644 commonlibrary/crossplatform/commonlibrarydequeetstest/AppScope/app.json delete mode 100644 commonlibrary/crossplatform/commonlibrarydequeetstest/AppScope/resources/base/element/string.json delete mode 100644 commonlibrary/crossplatform/commonlibrarydequeetstest/AppScope/resources/base/media/app_icon.png delete mode 100644 commonlibrary/crossplatform/commonlibrarydequeetstest/BUILD.gn delete mode 100644 commonlibrary/crossplatform/commonlibrarydequeetstest/Test.json delete mode 100644 commonlibrary/crossplatform/commonlibrarydequeetstest/signature/openharmony_sx.p7b delete mode 100644 commonlibrary/crossplatform/commonlibrarydequeetstest/src/main/ets/TestAbility/TestAbility.ets delete mode 100644 commonlibrary/crossplatform/commonlibrarydequeetstest/src/main/ets/TestAbility/pages/Index.ets delete mode 100644 commonlibrary/crossplatform/commonlibrarydequeetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts delete mode 100644 commonlibrary/crossplatform/commonlibrarydequeetstest/src/main/ets/test/Deque.test.ets delete mode 100644 commonlibrary/crossplatform/commonlibrarydequeetstest/src/main/ets/test/List.test.ets delete mode 100644 commonlibrary/crossplatform/commonlibrarydequeetstest/src/main/module.json delete mode 100644 commonlibrary/crossplatform/commonlibrarydequeetstest/src/main/resources/base/element/color.json delete mode 100644 commonlibrary/crossplatform/commonlibrarydequeetstest/src/main/resources/base/element/string.json delete mode 100644 commonlibrary/crossplatform/commonlibrarydequeetstest/src/main/resources/base/media/icon.png delete mode 100644 commonlibrary/crossplatform/commonlibrarydequeetstest/src/main/resources/base/profile/test_pages.json delete mode 100644 commonlibrary/crossplatform/commonlibraryhashmapetstest/AppScope/app.json delete mode 100644 commonlibrary/crossplatform/commonlibraryhashmapetstest/AppScope/resources/base/element/string.json delete mode 100644 commonlibrary/crossplatform/commonlibraryhashmapetstest/AppScope/resources/base/media/app_icon.png delete mode 100644 commonlibrary/crossplatform/commonlibraryhashmapetstest/BUILD.gn delete mode 100644 commonlibrary/crossplatform/commonlibraryhashmapetstest/Test.json delete mode 100644 commonlibrary/crossplatform/commonlibraryhashmapetstest/signature/openharmony_sx.p7b delete mode 100644 commonlibrary/crossplatform/commonlibraryhashmapetstest/src/main/ets/TestAbility/TestAbility.ets delete mode 100644 commonlibrary/crossplatform/commonlibraryhashmapetstest/src/main/ets/TestAbility/pages/Index.ets delete mode 100644 commonlibrary/crossplatform/commonlibraryhashmapetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts delete mode 100644 commonlibrary/crossplatform/commonlibraryhashmapetstest/src/main/ets/test/HashMap.test.ets delete mode 100644 commonlibrary/crossplatform/commonlibraryhashmapetstest/src/main/ets/test/List.test.ets delete mode 100644 commonlibrary/crossplatform/commonlibraryhashmapetstest/src/main/module.json delete mode 100644 commonlibrary/crossplatform/commonlibraryhashmapetstest/src/main/resources/base/element/color.json delete mode 100644 commonlibrary/crossplatform/commonlibraryhashmapetstest/src/main/resources/base/element/string.json delete mode 100644 commonlibrary/crossplatform/commonlibraryhashmapetstest/src/main/resources/base/media/icon.png delete mode 100644 commonlibrary/crossplatform/commonlibraryhashmapetstest/src/main/resources/base/profile/test_pages.json delete mode 100644 commonlibrary/crossplatform/commonlibraryhashsetetstest/AppScope/app.json delete mode 100644 commonlibrary/crossplatform/commonlibraryhashsetetstest/AppScope/resources/base/element/string.json delete mode 100644 commonlibrary/crossplatform/commonlibraryhashsetetstest/AppScope/resources/base/media/app_icon.png delete mode 100644 commonlibrary/crossplatform/commonlibraryhashsetetstest/BUILD.gn delete mode 100644 commonlibrary/crossplatform/commonlibraryhashsetetstest/Test.json delete mode 100644 commonlibrary/crossplatform/commonlibraryhashsetetstest/signature/openharmony_sx.p7b delete mode 100644 commonlibrary/crossplatform/commonlibraryhashsetetstest/src/main/ets/TestAbility/TestAbility.ets delete mode 100644 commonlibrary/crossplatform/commonlibraryhashsetetstest/src/main/ets/TestAbility/pages/Index.ets delete mode 100644 commonlibrary/crossplatform/commonlibraryhashsetetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts delete mode 100644 commonlibrary/crossplatform/commonlibraryhashsetetstest/src/main/ets/test/HashSet.test.ets delete mode 100644 commonlibrary/crossplatform/commonlibraryhashsetetstest/src/main/ets/test/List.test.ets delete mode 100644 commonlibrary/crossplatform/commonlibraryhashsetetstest/src/main/module.json delete mode 100644 commonlibrary/crossplatform/commonlibraryhashsetetstest/src/main/resources/base/element/color.json delete mode 100644 commonlibrary/crossplatform/commonlibraryhashsetetstest/src/main/resources/base/element/string.json delete mode 100644 commonlibrary/crossplatform/commonlibraryhashsetetstest/src/main/resources/base/media/icon.png delete mode 100644 commonlibrary/crossplatform/commonlibraryhashsetetstest/src/main/resources/base/profile/test_pages.json delete mode 100644 commonlibrary/crossplatform/commonlibraryplainarrayetstest/AppScope/app.json delete mode 100644 commonlibrary/crossplatform/commonlibraryplainarrayetstest/AppScope/resources/base/element/string.json delete mode 100644 commonlibrary/crossplatform/commonlibraryplainarrayetstest/AppScope/resources/base/media/app_icon.png delete mode 100644 commonlibrary/crossplatform/commonlibraryplainarrayetstest/BUILD.gn delete mode 100644 commonlibrary/crossplatform/commonlibraryplainarrayetstest/Test.json delete mode 100644 commonlibrary/crossplatform/commonlibraryplainarrayetstest/signature/openharmony_sx.p7b delete mode 100644 commonlibrary/crossplatform/commonlibraryplainarrayetstest/src/main/ets/TestAbility/TestAbility.ets delete mode 100644 commonlibrary/crossplatform/commonlibraryplainarrayetstest/src/main/ets/TestAbility/pages/Index.ets delete mode 100644 commonlibrary/crossplatform/commonlibraryplainarrayetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts delete mode 100644 commonlibrary/crossplatform/commonlibraryplainarrayetstest/src/main/ets/test/List.test.ets delete mode 100644 commonlibrary/crossplatform/commonlibraryplainarrayetstest/src/main/ets/test/PlainArray.test.ets delete mode 100644 commonlibrary/crossplatform/commonlibraryplainarrayetstest/src/main/module.json delete mode 100644 commonlibrary/crossplatform/commonlibraryplainarrayetstest/src/main/resources/base/element/color.json delete mode 100644 commonlibrary/crossplatform/commonlibraryplainarrayetstest/src/main/resources/base/element/string.json delete mode 100644 commonlibrary/crossplatform/commonlibraryplainarrayetstest/src/main/resources/base/media/icon.png delete mode 100644 commonlibrary/crossplatform/commonlibraryplainarrayetstest/src/main/resources/base/profile/test_pages.json delete mode 100755 commonlibrary/crossplatform/commonlibraryprocessetstest/AppScope/app.json delete mode 100755 commonlibrary/crossplatform/commonlibraryprocessetstest/AppScope/resources/base/element/string.json delete mode 100755 commonlibrary/crossplatform/commonlibraryprocessetstest/AppScope/resources/base/media/app_icon.png delete mode 100755 commonlibrary/crossplatform/commonlibraryprocessetstest/BUILD.gn delete mode 100755 commonlibrary/crossplatform/commonlibraryprocessetstest/Test.json delete mode 100755 commonlibrary/crossplatform/commonlibraryprocessetstest/signature/openharmony_sx.p7b delete mode 100755 commonlibrary/crossplatform/commonlibraryprocessetstest/src/main/ets/TestAbility/TestAbility.ets delete mode 100755 commonlibrary/crossplatform/commonlibraryprocessetstest/src/main/ets/TestAbility/pages/Index.ets delete mode 100755 commonlibrary/crossplatform/commonlibraryprocessetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts delete mode 100755 commonlibrary/crossplatform/commonlibraryprocessetstest/src/main/ets/test/List.test.ets delete mode 100755 commonlibrary/crossplatform/commonlibraryprocessetstest/src/main/ets/test/Process.test.ets delete mode 100755 commonlibrary/crossplatform/commonlibraryprocessetstest/src/main/module.json delete mode 100755 commonlibrary/crossplatform/commonlibraryprocessetstest/src/main/resources/base/element/color.json delete mode 100755 commonlibrary/crossplatform/commonlibraryprocessetstest/src/main/resources/base/element/string.json delete mode 100755 commonlibrary/crossplatform/commonlibraryprocessetstest/src/main/resources/base/media/icon.png delete mode 100755 commonlibrary/crossplatform/commonlibraryprocessetstest/src/main/resources/base/profile/test_pages.json delete mode 100755 commonlibrary/crossplatform/commonlibraryqueueetstest/AppScope/app.json delete mode 100755 commonlibrary/crossplatform/commonlibraryqueueetstest/AppScope/resources/base/element/string.json delete mode 100755 commonlibrary/crossplatform/commonlibraryqueueetstest/AppScope/resources/base/media/app_icon.png delete mode 100755 commonlibrary/crossplatform/commonlibraryqueueetstest/BUILD.gn delete mode 100755 commonlibrary/crossplatform/commonlibraryqueueetstest/Test.json delete mode 100755 commonlibrary/crossplatform/commonlibraryqueueetstest/signature/openharmony_sx.p7b delete mode 100755 commonlibrary/crossplatform/commonlibraryqueueetstest/src/main/ets/TestAbility/TestAbility.ets delete mode 100755 commonlibrary/crossplatform/commonlibraryqueueetstest/src/main/ets/TestAbility/pages/Index.ets delete mode 100755 commonlibrary/crossplatform/commonlibraryqueueetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts delete mode 100755 commonlibrary/crossplatform/commonlibraryqueueetstest/src/main/ets/test/List.test.ets delete mode 100755 commonlibrary/crossplatform/commonlibraryqueueetstest/src/main/ets/test/Queue.test.ets delete mode 100755 commonlibrary/crossplatform/commonlibraryqueueetstest/src/main/module.json delete mode 100755 commonlibrary/crossplatform/commonlibraryqueueetstest/src/main/resources/base/element/color.json delete mode 100755 commonlibrary/crossplatform/commonlibraryqueueetstest/src/main/resources/base/element/string.json delete mode 100755 commonlibrary/crossplatform/commonlibraryqueueetstest/src/main/resources/base/media/icon.png delete mode 100755 commonlibrary/crossplatform/commonlibraryqueueetstest/src/main/resources/base/profile/test_pages.json delete mode 100755 commonlibrary/crossplatform/commonlibrarystacketstest/AppScope/app.json delete mode 100755 commonlibrary/crossplatform/commonlibrarystacketstest/AppScope/resources/base/element/string.json delete mode 100755 commonlibrary/crossplatform/commonlibrarystacketstest/AppScope/resources/base/media/app_icon.png delete mode 100755 commonlibrary/crossplatform/commonlibrarystacketstest/BUILD.gn delete mode 100755 commonlibrary/crossplatform/commonlibrarystacketstest/Test.json delete mode 100755 commonlibrary/crossplatform/commonlibrarystacketstest/signature/openharmony_sx.p7b delete mode 100755 commonlibrary/crossplatform/commonlibrarystacketstest/src/main/ets/TestAbility/TestAbility.ets delete mode 100755 commonlibrary/crossplatform/commonlibrarystacketstest/src/main/ets/TestAbility/pages/Index.ets delete mode 100755 commonlibrary/crossplatform/commonlibrarystacketstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts delete mode 100755 commonlibrary/crossplatform/commonlibrarystacketstest/src/main/ets/test/List.test.ets delete mode 100755 commonlibrary/crossplatform/commonlibrarystacketstest/src/main/ets/test/Stack.test.ets delete mode 100755 commonlibrary/crossplatform/commonlibrarystacketstest/src/main/module.json delete mode 100755 commonlibrary/crossplatform/commonlibrarystacketstest/src/main/resources/base/element/color.json delete mode 100755 commonlibrary/crossplatform/commonlibrarystacketstest/src/main/resources/base/element/string.json delete mode 100755 commonlibrary/crossplatform/commonlibrarystacketstest/src/main/resources/base/media/icon.png delete mode 100755 commonlibrary/crossplatform/commonlibrarystacketstest/src/main/resources/base/profile/test_pages.json delete mode 100755 commonlibrary/crossplatform/commonlibrarytaskpooletstest/AppScope/app.json delete mode 100755 commonlibrary/crossplatform/commonlibrarytaskpooletstest/AppScope/resources/base/element/string.json delete mode 100755 commonlibrary/crossplatform/commonlibrarytaskpooletstest/AppScope/resources/base/media/app_icon.png delete mode 100755 commonlibrary/crossplatform/commonlibrarytaskpooletstest/BUILD.gn delete mode 100755 commonlibrary/crossplatform/commonlibrarytaskpooletstest/Test.json delete mode 100755 commonlibrary/crossplatform/commonlibrarytaskpooletstest/signature/openharmony_sx.p7b delete mode 100755 commonlibrary/crossplatform/commonlibrarytaskpooletstest/src/main/ets/TestAbility/TestAbility.ets delete mode 100755 commonlibrary/crossplatform/commonlibrarytaskpooletstest/src/main/ets/TestAbility/pages/Index.ets delete mode 100755 commonlibrary/crossplatform/commonlibrarytaskpooletstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts delete mode 100755 commonlibrary/crossplatform/commonlibrarytaskpooletstest/src/main/ets/test/List.test.ets delete mode 100755 commonlibrary/crossplatform/commonlibrarytaskpooletstest/src/main/ets/test/Taskpool.test.ets delete mode 100755 commonlibrary/crossplatform/commonlibrarytaskpooletstest/src/main/module.json delete mode 100755 commonlibrary/crossplatform/commonlibrarytaskpooletstest/src/main/resources/base/element/color.json delete mode 100755 commonlibrary/crossplatform/commonlibrarytaskpooletstest/src/main/resources/base/element/string.json delete mode 100755 commonlibrary/crossplatform/commonlibrarytaskpooletstest/src/main/resources/base/media/icon.png delete mode 100755 commonlibrary/crossplatform/commonlibrarytaskpooletstest/src/main/resources/base/profile/test_pages.json delete mode 100644 commonlibrary/crossplatform/commonlibrarytreesetetstest/AppScope/app.json delete mode 100644 commonlibrary/crossplatform/commonlibrarytreesetetstest/AppScope/resources/base/element/string.json delete mode 100644 commonlibrary/crossplatform/commonlibrarytreesetetstest/AppScope/resources/base/media/app_icon.png delete mode 100644 commonlibrary/crossplatform/commonlibrarytreesetetstest/BUILD.gn delete mode 100644 commonlibrary/crossplatform/commonlibrarytreesetetstest/Test.json delete mode 100644 commonlibrary/crossplatform/commonlibrarytreesetetstest/signature/openharmony_sx.p7b delete mode 100644 commonlibrary/crossplatform/commonlibrarytreesetetstest/src/main/ets/TestAbility/TestAbility.ets delete mode 100644 commonlibrary/crossplatform/commonlibrarytreesetetstest/src/main/ets/TestAbility/pages/Index.ets delete mode 100644 commonlibrary/crossplatform/commonlibrarytreesetetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts delete mode 100644 commonlibrary/crossplatform/commonlibrarytreesetetstest/src/main/ets/test/List.test.ets delete mode 100644 commonlibrary/crossplatform/commonlibrarytreesetetstest/src/main/ets/test/TreeSet.test.ets delete mode 100644 commonlibrary/crossplatform/commonlibrarytreesetetstest/src/main/module.json delete mode 100644 commonlibrary/crossplatform/commonlibrarytreesetetstest/src/main/resources/base/element/color.json delete mode 100644 commonlibrary/crossplatform/commonlibrarytreesetetstest/src/main/resources/base/element/string.json delete mode 100644 commonlibrary/crossplatform/commonlibrarytreesetetstest/src/main/resources/base/media/icon.png delete mode 100644 commonlibrary/crossplatform/commonlibrarytreesetetstest/src/main/resources/base/profile/test_pages.json delete mode 100644 commonlibrary/crossplatform/commonlibraryurietstest/AppScope/app.json delete mode 100644 commonlibrary/crossplatform/commonlibraryurietstest/AppScope/resources/base/element/string.json delete mode 100644 commonlibrary/crossplatform/commonlibraryurietstest/AppScope/resources/base/media/app_icon.png delete mode 100644 commonlibrary/crossplatform/commonlibraryurietstest/BUILD.gn delete mode 100644 commonlibrary/crossplatform/commonlibraryurietstest/Test.json delete mode 100644 commonlibrary/crossplatform/commonlibraryurietstest/signature/openharmony_sx.p7b delete mode 100644 commonlibrary/crossplatform/commonlibraryurietstest/src/main/ets/TestAbility/TestAbility.ets delete mode 100644 commonlibrary/crossplatform/commonlibraryurietstest/src/main/ets/TestAbility/pages/Index.ets delete mode 100644 commonlibrary/crossplatform/commonlibraryurietstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts delete mode 100644 commonlibrary/crossplatform/commonlibraryurietstest/src/main/ets/test/List.test.ets delete mode 100644 commonlibrary/crossplatform/commonlibraryurietstest/src/main/ets/test/uri.test.ets delete mode 100644 commonlibrary/crossplatform/commonlibraryurietstest/src/main/module.json delete mode 100644 commonlibrary/crossplatform/commonlibraryurietstest/src/main/resources/base/element/color.json delete mode 100644 commonlibrary/crossplatform/commonlibraryurietstest/src/main/resources/base/element/string.json delete mode 100644 commonlibrary/crossplatform/commonlibraryurietstest/src/main/resources/base/media/icon.png delete mode 100644 commonlibrary/crossplatform/commonlibraryurietstest/src/main/resources/base/profile/test_pages.json delete mode 100644 commonlibrary/crossplatform/commonlibraryurletstest/AppScope/app.json delete mode 100644 commonlibrary/crossplatform/commonlibraryurletstest/AppScope/resources/base/element/string.json delete mode 100644 commonlibrary/crossplatform/commonlibraryurletstest/AppScope/resources/base/media/app_icon.png delete mode 100644 commonlibrary/crossplatform/commonlibraryurletstest/BUILD.gn delete mode 100644 commonlibrary/crossplatform/commonlibraryurletstest/Test.json delete mode 100644 commonlibrary/crossplatform/commonlibraryurletstest/signature/openharmony_sx.p7b delete mode 100644 commonlibrary/crossplatform/commonlibraryurletstest/src/main/ets/TestAbility/TestAbility.ets delete mode 100644 commonlibrary/crossplatform/commonlibraryurletstest/src/main/ets/TestAbility/pages/Index.ets delete mode 100644 commonlibrary/crossplatform/commonlibraryurletstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts delete mode 100644 commonlibrary/crossplatform/commonlibraryurletstest/src/main/ets/test/List.test.ets delete mode 100644 commonlibrary/crossplatform/commonlibraryurletstest/src/main/ets/test/url.test.ets delete mode 100644 commonlibrary/crossplatform/commonlibraryurletstest/src/main/module.json delete mode 100644 commonlibrary/crossplatform/commonlibraryurletstest/src/main/resources/base/element/color.json delete mode 100644 commonlibrary/crossplatform/commonlibraryurletstest/src/main/resources/base/element/string.json delete mode 100644 commonlibrary/crossplatform/commonlibraryurletstest/src/main/resources/base/media/icon.png delete mode 100644 commonlibrary/crossplatform/commonlibraryurletstest/src/main/resources/base/profile/test_pages.json delete mode 100644 commonlibrary/crossplatform/commonlibraryutiletstest/AppScope/app.json delete mode 100644 commonlibrary/crossplatform/commonlibraryutiletstest/AppScope/resources/base/element/string.json delete mode 100644 commonlibrary/crossplatform/commonlibraryutiletstest/AppScope/resources/base/media/app_icon.png delete mode 100644 commonlibrary/crossplatform/commonlibraryutiletstest/BUILD.gn delete mode 100644 commonlibrary/crossplatform/commonlibraryutiletstest/Test.json delete mode 100644 commonlibrary/crossplatform/commonlibraryutiletstest/signature/openharmony_sx.p7b delete mode 100644 commonlibrary/crossplatform/commonlibraryutiletstest/src/main/ets/TestAbility/TestAbility.ets delete mode 100644 commonlibrary/crossplatform/commonlibraryutiletstest/src/main/ets/TestAbility/pages/Index.ets delete mode 100644 commonlibrary/crossplatform/commonlibraryutiletstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts delete mode 100644 commonlibrary/crossplatform/commonlibraryutiletstest/src/main/ets/test/List.test.ets delete mode 100644 commonlibrary/crossplatform/commonlibraryutiletstest/src/main/ets/test/util.test.ets delete mode 100644 commonlibrary/crossplatform/commonlibraryutiletstest/src/main/module.json delete mode 100644 commonlibrary/crossplatform/commonlibraryutiletstest/src/main/resources/base/element/color.json delete mode 100644 commonlibrary/crossplatform/commonlibraryutiletstest/src/main/resources/base/element/string.json delete mode 100644 commonlibrary/crossplatform/commonlibraryutiletstest/src/main/resources/base/media/icon.png delete mode 100644 commonlibrary/crossplatform/commonlibraryutiletstest/src/main/resources/base/profile/test_pages.json delete mode 100644 commonlibrary/crossplatform/commonlibraryxmletstest/AppScope/app.json delete mode 100644 commonlibrary/crossplatform/commonlibraryxmletstest/AppScope/resources/base/element/string.json delete mode 100644 commonlibrary/crossplatform/commonlibraryxmletstest/AppScope/resources/base/media/app_icon.png delete mode 100644 commonlibrary/crossplatform/commonlibraryxmletstest/BUILD.gn delete mode 100644 commonlibrary/crossplatform/commonlibraryxmletstest/Test.json delete mode 100644 commonlibrary/crossplatform/commonlibraryxmletstest/signature/openharmony_sx.p7b delete mode 100644 commonlibrary/crossplatform/commonlibraryxmletstest/src/main/ets/TestAbility/TestAbility.ets delete mode 100644 commonlibrary/crossplatform/commonlibraryxmletstest/src/main/ets/TestAbility/pages/Index.ets delete mode 100644 commonlibrary/crossplatform/commonlibraryxmletstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts delete mode 100644 commonlibrary/crossplatform/commonlibraryxmletstest/src/main/ets/test/List.test.ets delete mode 100644 commonlibrary/crossplatform/commonlibraryxmletstest/src/main/ets/test/xml.test.ets delete mode 100644 commonlibrary/crossplatform/commonlibraryxmletstest/src/main/ets/test/xmlEventType.test.ets delete mode 100644 commonlibrary/crossplatform/commonlibraryxmletstest/src/main/ets/test/xmlParseOption.test.ets delete mode 100644 commonlibrary/crossplatform/commonlibraryxmletstest/src/main/module.json delete mode 100644 commonlibrary/crossplatform/commonlibraryxmletstest/src/main/resources/base/element/color.json delete mode 100644 commonlibrary/crossplatform/commonlibraryxmletstest/src/main/resources/base/element/string.json delete mode 100644 commonlibrary/crossplatform/commonlibraryxmletstest/src/main/resources/base/media/icon.png delete mode 100644 commonlibrary/crossplatform/commonlibraryxmletstest/src/main/resources/base/profile/test_pages.json diff --git a/commonlibrary/BUILD.gn b/commonlibrary/BUILD.gn index 9c99b6cee..29ab23f0d 100644 --- a/commonlibrary/BUILD.gn +++ b/commonlibrary/BUILD.gn @@ -16,8 +16,6 @@ group("commonlibrary") { testonly = true if (is_standard_system) { deps = [ - "crossplatform:crossplatform", - "crossplatform/commonlibraryxmletstest:ActsCrossplatformXmlTest", "ets_utils:ets_utils", "toolchain:toolchain", ] diff --git a/commonlibrary/crossplatform/BUILD.gn b/commonlibrary/crossplatform/BUILD.gn deleted file mode 100755 index 1fb136da2..000000000 --- a/commonlibrary/crossplatform/BUILD.gn +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright (C) 2023 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. -import("//test/xts/tools/build/suite.gni") - -group("crossplatform") { - testonly = true - if (is_standard_system) { - deps = [ - "commonlibraryArrayListetstest:ActsCrossPlatformArrayListTest", - "commonlibraryLightWeightMapetstest:ActsCrossplatformLightWeightMapTest", - "commonlibraryLightWeightSetetstest:ActsCrossPlatformLightWeightSetTest", - "commonlibraryLinkedListetstest:ActsCrossplatformLinkedListTest", - "commonlibraryListetstest:ActsCrossPlatformList2Test", - "commonlibraryTreeMapetstest:ActsCrossplatformTreeMapTest", - "commonlibraryWorkeretstest:ActsCrossplatformWorkerTest", - "commonlibrarybufferetstest:ActsCrossplatformBufferTest", - "commonlibraryconvertxmletstest:ActsCrossplatformConvertxmlTest", - "commonlibrarydequeetstest:ActsCrossplatformDequeTest", - "commonlibraryhashmapetstest:ActsCrossplatformHashMapTest", - "commonlibraryhashsetetstest:ActsCrossplatformHashSetTest", - "commonlibraryplainarrayetstest:ActsCrossplatformPlainArrayTest", - "commonlibraryprocessetstest:ActsCrossplatformProcessTest", - "commonlibraryqueueetstest:ActsCrossplatformCommonlibraryQueueTest", - "commonlibrarystacketstest:ActsCrossplatformCommonlibraryStackTest", - "commonlibrarytaskpooletstest:ActsCrossplatformCommonlibraryTaskpoolTest", - "commonlibrarytreesetetstest:ActsCrossplatformTreeSetTest", - "commonlibraryurietstest:ActsCrossplatformUriTest", - "commonlibraryurletstest:ActsCrossplatformUrlTest", - "commonlibraryutiletstest:ActsCrossplatformUtilTest", - ] - } -} diff --git a/commonlibrary/crossplatform/commonlibraryArrayListetstest/AppScope/app.json b/commonlibrary/crossplatform/commonlibraryArrayListetstest/AppScope/app.json deleted file mode 100755 index 30deb8017..000000000 --- a/commonlibrary/crossplatform/commonlibraryArrayListetstest/AppScope/app.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "app": { - "bundleName": "ohos.acts.commonlibrary.crossplatform.ArrayList.normal", - "vendor": "example", - "versionCode": 1000000, - "versionName": "1.0.0", - "icon": "$media:app_icon", - "label": "$string:app_name", - "minAPIVersion": 10, - "targetAPIVersion": 10, - "car": { - "apiCompatibleVersion": 10, - "singleUser": false - } - } -} diff --git a/commonlibrary/crossplatform/commonlibraryArrayListetstest/AppScope/resources/base/element/string.json b/commonlibrary/crossplatform/commonlibraryArrayListetstest/AppScope/resources/base/element/string.json deleted file mode 100755 index 3811bc441..000000000 --- a/commonlibrary/crossplatform/commonlibraryArrayListetstest/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "xtsDemo1" - } - ] -} diff --git a/commonlibrary/crossplatform/commonlibraryArrayListetstest/AppScope/resources/base/media/app_icon.png b/commonlibrary/crossplatform/commonlibraryArrayListetstest/AppScope/resources/base/media/app_icon.png deleted file mode 100755 index e69de29bb..000000000 diff --git a/commonlibrary/crossplatform/commonlibraryArrayListetstest/BUILD.gn b/commonlibrary/crossplatform/commonlibraryArrayListetstest/BUILD.gn deleted file mode 100755 index 18f0880fb..000000000 --- a/commonlibrary/crossplatform/commonlibraryArrayListetstest/BUILD.gn +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright (C) 2023 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. -import("//test/xts/tools/build/suite.gni") - -ohos_js_hap_suite("ActsCrossPlatformArrayListTest") { - hap_profile = "src/main/module.json" - deps = [ - ":windowStage_js_assets", - ":windowStage_resources", - ] - ets2abc = true - certificate_profile = "./signature/openharmony_sx.p7b" - - # hap_name: HAP的名字,可选,默认为目标名 - hap_name = "ActsCrossPlatformArrayListTest" - subsystem_name = "commonlibrary" - part_name = "ets_utils" -} -ohos_app_scope("windowStage_app_profile") { - # app_profile: HAP的AppScope中的app.json,只在Stage模型下使用 - app_profile = "AppScope/app.json" - - # sources: 资源文件路径 - sources = [ "AppScope/resources" ] -} -ohos_js_assets("windowStage_js_assets") { - # source_dir: js或ets代码路径,兼容FA模型的单ability配置到ability目录 - source_dir = "src/main/ets" -} -ohos_resources("windowStage_resources") { - # sources: 资源文件路径 - sources = [ "src/main/resources" ] - - # deps: 当前目标的依赖 - deps = [ ":windowStage_app_profile" ] - - # hap_profile: HAP的config.json,Stage模型对应module.json - hap_profile = "src/main/module.json" -} diff --git a/commonlibrary/crossplatform/commonlibraryArrayListetstest/Test.json b/commonlibrary/crossplatform/commonlibraryArrayListetstest/Test.json deleted file mode 100755 index bee2895d3..000000000 --- a/commonlibrary/crossplatform/commonlibraryArrayListetstest/Test.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests", - "driver": { - "type": "OHJSUnitTest", - "test-timeout": "60000", - "shell-timeout": "60000", - "bundle-name": "ohos.acts.commonlibrary.crossplatform.ArrayList.normal", - "module-name": "entry_test" - }, - "kits": [ - { - "test-file-name": [ - "ActsDemoStageTest.hap" - ], - "type": "AppInstallKit", - "cleanup-apps": true - } - ] -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryArrayListetstest/signature/openharmony_sx.p7b b/commonlibrary/crossplatform/commonlibraryArrayListetstest/signature/openharmony_sx.p7b deleted file mode 100755 index 149759f9c0576334c34eba3eb851803015409659..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3468 zcmcgvYj6|S6}BF>V~oJWfPnx8L9h$R+?6F;astV&w0hx{yh5@qN5rh8)x(x{*Q=FR z7J*QaxV#LdX@Q1E%*#Llrvn5-J3R7&LK+wzWjYj`0`(+N8k#~98V1^x?Sjp~k4|RT zAG>qTJ@?*k&-u=G=YphcQAXC}W>fR`GEt_uH7RQXNm)!R57F^`V0zB7#E>6@elkpDK^VLO#J%17)d4 zt0fg`zwlC(sC^2p8fX-RmIP3-%I_y3jS$T>F{#Nc877G+DL4p*QTRepjtzNYTx!4G z2s&CDqBt_Z5-G0`*hqv!z7W?WFPkf;XiniF{WP0Grq-%7C2FNwGqu}K_&Jgl+$9>V zse&zmau#3)~wRD>u$oto|=8_6)ukgTE`x{VUF ziqwOkMzeLC4z)YX2D1)!pxs_Kg_+GdETPlE9x?#)W&{qHQNpI1me9i(5(qQ|>+5V4 zIIf3zCyW`fxGn)(kbt!kfn5%`-f9z8u;V-$aOo>?d?w0s6<%XyY?jf`g(fJ9TtD+t3zlEkMcUa8>12BEqX^C z>ckLp53V3q?xr5wGj4Ri)jj_ib)cx0uc=a-UDX!Oqg1QS27B051>!UHaHJ;&bGRuJ zcq|Gv@Lpq_aVZUe5OQHQSi&CRf4xd4U*&)uNWj~hT{Du(w43V5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D5i-Lhcqj^ia8t{u)fej)eTJb#X@ z%jEoG@q&@T4)edx-{=^2_Qr)Ff><4Uj^=liu^a6jlN9$psNVJIs#Q53gh_GnZJ$))4YoUVBN4T^1d9$DL2n6oiceCYRU zx7&sv?x?lYEo&Y+8Vq=Nl8dD#U=WW_TX!Mfz2(D8SC34EZ7<9%xmevfJ=%Wt%j8!t vA6@au4)0naF10rv2ZBZ^AbME6IXMWjS-^tv=$o$>-ft^cEwWt3V5gB5% diff --git a/commonlibrary/crossplatform/commonlibraryArrayListetstest/src/main/ets/TestAbility/TestAbility.ets b/commonlibrary/crossplatform/commonlibraryArrayListetstest/src/main/ets/TestAbility/TestAbility.ets deleted file mode 100755 index cb027d692..000000000 --- a/commonlibrary/crossplatform/commonlibraryArrayListetstest/src/main/ets/TestAbility/TestAbility.ets +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright (c) 2023 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. - */ -import UIAbility from '@ohos.app.ability.UIAbility'; -import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; -import hilog from '@ohos.hilog'; -import { Hypium } from '@ohos/hypium'; -import testsuite from '../test/List.test'; -import window from '@ohos.window'; - -export default class TestAbility extends UIAbility { - onCreate(want, 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) ?? ''); - var abilityDelegator: any - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var abilityDelegatorArguments: any - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - hilog.info(0x0000, 'testTag', '%{public}s', 'start run testcase!!!'); - Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) - } - - onDestroy() { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onDestroy'); - } - - onWindowStageCreate(windowStage: window.WindowStage) { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageCreate'); - windowStage.loadContent('TestAbility/pages/Index', (err, data) => { - 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. Data: %{public}s', - JSON.stringify(data) ?? ''); - }); - } - - 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/commonlibrary/crossplatform/commonlibraryArrayListetstest/src/main/ets/TestAbility/pages/Index.ets b/commonlibrary/crossplatform/commonlibraryArrayListetstest/src/main/ets/TestAbility/pages/Index.ets deleted file mode 100755 index 8cbc4b3b9..000000000 --- a/commonlibrary/crossplatform/commonlibraryArrayListetstest/src/main/ets/TestAbility/pages/Index.ets +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (c) 2023 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. - */ -import hilog from '@ohos.hilog'; - -@Entry -@Component -struct Index { - aboutToAppear() { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility index aboutToAppear'); - } - @State message: string = 'Hello World' - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Button() { - Text('next page') - .fontSize(20) - .fontWeight(FontWeight.Bold) - }.type(ButtonType.Capsule) - .margin({ - top: 20 - }) - .backgroundColor('#0D9FFB') - .width('35%') - .height('5%') - .onClick(()=>{ - }) - } - .width('100%') - } - .height('100%') - } - } \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryArrayListetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/commonlibrary/crossplatform/commonlibraryArrayListetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts deleted file mode 100755 index 92a16d84e..000000000 --- a/commonlibrary/crossplatform/commonlibraryArrayListetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts +++ /dev/null @@ -1,49 +0,0 @@ -import hilog from '@ohos.hilog'; -import TestRunner from '@ohos.application.testRunner'; -import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; - -var abilityDelegator = undefined -var abilityDelegatorArguments = undefined - -async function onAbilityCreateCallback() { - hilog.info(0x0000, 'testTag', '%{public}s', 'onAbilityCreateCallback'); -} - -async function addAbilityMonitorCallback(err: any) { - 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() { - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun run'); - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var testAbilityName = abilityDelegatorArguments.bundleName + '.TestAbility' - let lMonitor = { - abilityName: testAbilityName, - onAbilityCreate: onAbilityCreateCallback, - }; - abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) - var cmd = 'aa start -d 0 -a TestAbility' + ' -b ' + abilityDelegatorArguments.bundleName - var debug = abilityDelegatorArguments.parameters['-D'] - if (debug == 'true') - { - cmd += ' -D' - } - hilog.info(0x0000, 'testTag', 'cmd : %{public}s', cmd); - abilityDelegator.executeShellCommand(cmd, - (err: any, d: any) => { - hilog.info(0x0000, 'testTag', 'executeShellCommand : err : %{public}s', JSON.stringify(err) ?? ''); - hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.stdResult ?? ''); - hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.exitCode ?? ''); - }) - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun end'); - } -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryArrayListetstest/src/main/ets/test/ArrayList.test.ets b/commonlibrary/crossplatform/commonlibraryArrayListetstest/src/main/ets/test/ArrayList.test.ets deleted file mode 100755 index faa19339e..000000000 --- a/commonlibrary/crossplatform/commonlibraryArrayListetstest/src/main/ets/test/ArrayList.test.ets +++ /dev/null @@ -1,1300 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import ArrayList from "@ohos.util.ArrayList"; -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' -export default function ArraylistTest() { - describe("ArraylistTest", function () { - - /** - * @tc.number: TEST_CONSTRUCTOR_001 - * @tc.name : testConstructor001 - * @tc.desc : Create an ArrayList instance. For example: let arrayList = new ArrayList(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testConstructor001", 0, function () { - try { - let arrayList = new ArrayList(); - expect(arrayList != undefined).assertEqual(true); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200012); - expect(err.message).assertEqual("The ArrayList's constructor cannot be directly invoked"); - } - }); - - /** - * @tc.number: TEST_LENGTH_001 - * @tc.name : testLength001 - * @tc.desc : Get the number of elements contained in the ArrayList instance. For example: arrayList.length. - * @tc.size : MediumTest - * @tc.type : Field - * @tc.level : Level 0 - * */ - it("testLength001", 0, function () { - let arrayList = new ArrayList(); - arrayList.add("四"); - arrayList.add("三"); - arrayList.add(1); - arrayList.add("a"); - arrayList.insert(8, 2); - let res = arrayList.length; - expect(res).assertEqual(5); - }); - - /** - * @tc.number: TEST_ADD_001 - * @tc.name : testAdd001 - * @tc.desc : Add a string type element to the end of the ArrayList instance. For example: arrayList.add("四"). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd001", 0, function () { - let arrayList = new ArrayList(); - arrayList.add("四"); - let res = arrayList.has("四"); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_ADD_002 - * @tc.name : testAdd002 - * @tc.desc : Add a number type element to the end of the ArrayList instance. For example: arrayList.add(8). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd002", 0, function () { - let arrayList = new ArrayList(); - arrayList.add(8); - let res = arrayList.has(8); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_ADD_003 - * @tc.name : testAdd003 - * @tc.desc : Add a object type element to the end of the ArrayList instance. - * For example: let a = {name: "lala", age: "13岁"}; arrayList.add(a). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd003", 0, function () { - let arrayList = new ArrayList(); - let a = {name: "lala", age: "13岁"}; - arrayList.add(a); - let res = arrayList.has(a); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_ADD_004 - * @tc.name : testAdd004 - * @tc.desc : Add a array type element to the end of the ArrayList instance. - * For example: let a = [1, 2, 3, 4]; arrayList.add(a). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd004", 0, function () { - let arrayList = new ArrayList(); - let a = [1, 2, 3, 4]; - arrayList.add(a); - let res = arrayList.has(a); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_ADD_005 - * @tc.name : testAdd005 - * @tc.desc : Add a boolean type element to the end of the ArrayList instance. - * For example: let a = true; arrayList.add(a). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd005", 0, function () { - let arrayList = new ArrayList(); - let a = true; - arrayList.add(a); - let res = arrayList.has(a); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_ADD_006 - * @tc.name : testAdd006 - * @tc.desc : Add a string element to the end of the ArrayList instance. - * For example: for (let i = 0; i < 100; i++) {arrayList.add(i);}. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd006", 0, function () { - let arrayList = new ArrayList(); - for (let i = 0; i < 100; i++) { - arrayList.add(i); - } - let res = arrayList.getIndexOf(99); - let res1 = arrayList.length; - expect(res).assertEqual(99); - expect(res1).assertEqual(100); - }); - - /** - * @tc.number: TEST_ADD_007 - * @tc.name : testAdd007 - * @tc.desc : Add a symbol type element to the end of the ArrayList instance. - * For example: let a = "*";arrayList.add(a). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd007", 0, function () { - let arrayList = new ArrayList(); - let a = "*"; - arrayList.add(a); - let res = arrayList.has(a); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_ADD_008 - * @tc.name : testAdd008 - * @tc.desc : Add a decimal type to the end of the ArrayList instance. For example: let a = "3.14";arrayList.add(a). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd008", 0, function () { - let arrayList = new ArrayList(); - let a = "3.14"; - arrayList.add(a); - let res = arrayList.has(a); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_ADD_009 - * @tc.name : testAdd009 - * @tc.desc : Add a null character element to the end of the ArrayList instance. - * For example: let a = "";arrayList.add(a). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd009", 0, function () { - let arrayList = new ArrayList(); - let a = ""; - arrayList.add(a); - let res = arrayList.has(a); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_ADD_010 - * @tc.name : testAdd010 - * @tc.desc : Add a boolean type element to the end of the ArrayList instance. - * For example: arrayList.add.bind({})(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd010", 0, function () { - let arrayList = new ArrayList(); - try { - arrayList.add.bind({}, "a")() - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200011); - expect(err.message).assertEqual(`The add method cannot be bound`); - } - }); - - /** - * @tc.number: TEST_INSERT_001 - * @tc.name : testInsert001 - * @tc.desc : Insert an element into the middle of the ArrayList instance. For example: arrayList.insert(8, 2). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testInsert001", 0, function () { - let arrayList = new ArrayList(); - arrayList.add("四"); - arrayList.add("三"); - arrayList.add(1); - arrayList.add("a"); - arrayList.insert(8, 2); - let arr = []; - arrayList.forEach((item, index) => { - arr.push(item); - }); - let a = ["四", "三", 8, 1, "a"]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number: TEST_INSERT_002 - * @tc.name : testInsert002 - * @tc.desc : Inserting an element with an index less than 0 will throw an exception. - * For example: arrayList.insert(8, -1). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testInsert002", 0, function () { - let arrayList = new ArrayList(); - arrayList.add("四"); - arrayList.add("三"); - arrayList.add(1); - arrayList.add("a"); - try { - let res = arrayList.insert(8, -1); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200001); - expect(err.message).assertEqual(`The value of "index" is out of range. It must be >= 0 && <= 4. Received value is: -1`); - } - }); - - /** - * @tc.number: TEST_INSERT_003 - * @tc.name : testInsert003 - * @tc.desc : Inserting an element with an index greater than or equal to the length of - * the ArrayList instance will throw an exception. For example: arrayList.insert(8, 10). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testInsert003", 0, function () { - let arrayList = new ArrayList(); - arrayList.add("四"); - arrayList.add("三"); - arrayList.add(1); - arrayList.add("a"); - try { - let res = arrayList.insert(8, 10); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200001); - expect(err.message).assertEqual(`The value of "index" is out of range. It must be >= 0 && <= 4. Received value is: 10`); - } - }); - - /** - * @tc.number: TEST_INSERT_004 - * @tc.name : testInsert004 - * @tc.desc : Inserting an element with an index greater than or equal to the length of - * the ArrayList instance will throw an exception. For example: arrayList.insert(8, 11). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testInsert004", 0, function () { - let arrayList = new ArrayList(); - arrayList.add("四"); - arrayList.add("三"); - arrayList.add(1); - arrayList.add("a"); - try { - let res = arrayList.insert(8, 11); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200001); - expect(err.message).assertEqual(`The value of "index" is out of range. It must be >= 0 && <= 4. Received value is: 11`); - } - }); - - /** - * @tc.number: TEST_HAS_001 - * @tc.name : testHas001 - * @tc.desc : Check whether the ArrayList contains a specified element. For example: arrayList.has(8). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testHas001", 0, function () { - let arrayList = new ArrayList(); - arrayList.add("四"); - arrayList.add("三"); - arrayList.add(1); - arrayList.add("a"); - arrayList.insert(8, 2); - let res = arrayList.has(8); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_HAS_002 - * @tc.name : testHas002 - * @tc.desc : Check whether the ArrayList contains a specified element. - * For example: arrayList.has.bind({})(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it('testHas002', 0, function () { - let arrayList = new ArrayList(); - try { - arrayList.has.bind({}, "a")(); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200011); - expect(err.message).assertEqual(`The has method cannot be bound`); - } - }); - - /** - * @tc.number: TEST_HAS_003 - * @tc.name : testHas003 - * @tc.desc : Check whether the ArrayList contains a specified element. For example: arrayList.has("二"). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testHas003", 0, function () { - let arrayList = new ArrayList(); - arrayList.add("四"); - arrayList.add("三"); - arrayList.add(1); - arrayList.add("a"); - arrayList.insert(8, 2); - let res = arrayList.has("二"); - expect(res).assertEqual(false); - }); - - /** - * @tc.number: TEST_GET_INDEX_OF_001 - * @tc.name : testGetIndexOf001 - * @tc.desc : In the ArrayList instance, find the index of a specified element from front to back, - * and return the index found for the first time. If not found, return -1. For example: arrayList.getIndexOf(1). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetIndexOf001", 0, function () { - let arrayList = new ArrayList(); - arrayList.add(1); - arrayList.add("三"); - arrayList.add(1); - arrayList.add("a"); - arrayList.insert(1, 2); - let res1 = arrayList.getIndexOf(1); - expect(res1).assertEqual(0); - }); - - /** - * @tc.number: TEST_GET_INDEX_OF_002 - * @tc.name : testGetIndexOf002 - * @tc.desc : In the ArrayList instance, find the index of a specified element from front to back, - * and return the index found for the first time. If not found, return -1. For example: arrayList.getIndexOf("A"). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetIndexOf002", 0, function () { - let arrayList = new ArrayList(); - arrayList.add(1); - arrayList.add("三"); - arrayList.add(1); - arrayList.add("a"); - arrayList.insert(1, 2); - let res = arrayList.getIndexOf("A"); - expect(res).assertEqual(-1); - }); - - /** - * @tc.number: TEST_REMOVE_BY_INDEX_001 - * @tc.name : testRemoveByIndex001 - * @tc.desc : In the ArrayList instance, delete the element based on its index. - * For example: arrayList.removeByIndex(2). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testRemoveByIndex001", 0, function () { - let arrayList = new ArrayList(); - arrayList.add("四"); - arrayList.add("三"); - arrayList.add(1); - arrayList.add("a"); - arrayList.removeByIndex(2); - let arr = []; - arrayList.forEach((item, index) => { - arr.push(item); - }); - let a = ["四", "三", "a"]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number: TEST_REMOVE_BY_INDEX_002 - * @tc.name : testRemoveByIndex002 - * @tc.desc : In the ArrayList instance, delete the element based on its index index. - * For example: arrayList.removeByIndex(5). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testRemoveByIndex002", 0, function () { - let arrayList = new ArrayList(); - arrayList.add("a"); - arrayList.add("b"); - arrayList.add("c"); - arrayList.add("a"); - arrayList.add("b"); - try { - let res = arrayList.removeByIndex(5); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200001); - expect(err.message).assertEqual(`The value of "index" is out of range. It must be >= 0 && <= 4. Received value is: 5`); - } - }); - - /** - * @tc.number: TEST_REMOVE_BY_INDEX_003 - * @tc.name : testRemoveByIndex003 - * @tc.desc : In the ArrayList instance, delete the element based on its index. - * For example: arrayList.removeByIndex.bind({})(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it('testRemoveByIndex003', 0, function () { - let arrayList = new ArrayList(); - try { - arrayList.removeByIndex.bind({}, "a")(); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200011); - expect(err.message).assertEqual(`The removeByIndex method cannot be bound`); - } - }); - - /** - * @tc.number: TEST_REMOVE_001 - * @tc.name : testRemove001 - * @tc.desc : Delete the specified element . For example: arrayList.remove("三"). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testRemove001", 0, function () { - let arrayList = new ArrayList(); - arrayList.add("四"); - arrayList.add("三"); - arrayList.add(1); - arrayList.add("a"); - arrayList.remove("三"); - let res = arrayList.has("三"); - expect(res).assertEqual(false); - }); - - /** - * @tc.number: TEST_REMOVE_002 - * @tc.name : testRemove002 - * @tc.desc : Delete the specified element.For example: arrayList.remove("A"). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testRemove002", 0, function () { - let arrayList = new ArrayList(); - arrayList.add("四"); - arrayList.add("三"); - arrayList.add(1); - arrayList.add("a"); - let res = arrayList.remove("A"); - expect(res).assertEqual(false); - }); - - /** - * @tc.number: TEST_REMOVE_003 - * @tc.name : testRemove003 - * @tc.desc : Delete the specified element. - * For example: arrayList.forEach((item, index) => {if (item == 1) {arrayList.remove(item);}}). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testRemove003", 0, function () { - let arrayList = new ArrayList(); - arrayList.add(0); - arrayList.add(1); - arrayList.add(2); - arrayList.add(1); - arrayList.add(3); - arrayList.add(1); - arrayList.forEach((item, index) => { - if (item == 1) { - arrayList.remove(item); - } - }); - let arr = []; - arrayList.forEach((item, index) => { - arr.push(item); - }); - let a = [0, 2, 3]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number: TEST_REMOVE_004 - * @tc.name : testRemove004 - * @tc.desc : Delete the specified element . For example: arrayList.remove.bind({})(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it('testRemove004', 0, function () { - let arrayList = new ArrayList(); - try { - arrayList.remove.bind({}, "a")(); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200011); - expect(err.message).assertEqual(`The remove method cannot be bound`); - } - }); - - /** - * @tc.number: TEST_GET_LAST_INDEX_OF_001 - * @tc.name : testGetLastIndexOf001 - * @tc.desc : In the ArrayList instance, find the index of a specified element from brack to front, - * and return the index found for the first time. If not found, return -1. For example: arrayList.add("四"). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetLastIndexOf001", 0, function () { - let arrayList = new ArrayList(); - arrayList.add("四"); - arrayList.add("三"); - arrayList.add(1); - arrayList.add("a"); - arrayList.add(1); - arrayList.add("b"); - let res = arrayList.getLastIndexOf(1); - expect(res).assertEqual(4); - }); - - /** - * @tc.number: TEST_REMOVE_BY_RANGE_001 - * @tc.name : testRemoveByRange001 - * @tc.desc : Deletes elements from a specified range, including elements at the start position and - * elements at the end position. For example: arrayList.removeByRange(1, 3). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testRemoveByRange001", 0, function () { - let arrayList = new ArrayList(); - arrayList.add("四"); - arrayList.add("三"); - arrayList.add(1); - arrayList.add("a"); - arrayList.add(1); - arrayList.add("b"); - arrayList.add("c"); - arrayList.add(1); - arrayList.removeByRange(1, 3); - let arr = []; - arrayList.forEach((item, index) => { - arr.push(item); - }); - let a = ["四", "a", 1, "b", "c", 1]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number: TEST_REMOVE_BY_RANGE_002 - * @tc.name : testRemoveByRange002 - * @tc.desc : Add a string element to the end of the ArrayList instance. For example: arrayList.add("四"). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testRemoveByRange002", 0, function () { - let arrayList = new ArrayList(); - arrayList.add("四"); - arrayList.add("三"); - arrayList.add(1); - arrayList.add("a"); - arrayList.add(1); - arrayList.add("b"); - arrayList.add("c"); - arrayList.add(1); - try { - let res = arrayList.removeByRange(3, 1); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200001); - expect(err.message).assertEqual(`The value of "fromIndex" is out of range. It must be >= 0 && <= 0. Received value is: 3`); - } - }); - - /** - * @tc.number: TEST_REMOVE_BY_RANGE_003 - * @tc.name : testRemoveByRange003 - * @tc.desc : Deletes elements from a specified range, including elements at the start position and - * elements at the end position. For example: removeByRange(6, 8). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testRemoveByRange003", 0, function () { - let arrayList = new ArrayList(); - arrayList.add("四"); - arrayList.add("三"); - arrayList.add(1); - arrayList.add("a"); - arrayList.add(1); - try { - let res = arrayList.removeByRange(6, 8); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200001); - expect(err.message).assertEqual(`The value of "fromIndex" is out of range. It must be >= 0 && <= 4. Received value is: 6`); - } - }); - - /** - * @tc.number: TEST_REMOVE_BY_RANGE_004 - * @tc.name : testRemoveByRange004 - * @tc.desc : Deletes elements from a specified range, including elements at the start position and - * elements at the end position. For example: removeByRange(0, 7). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testRemoveByRange004", 0, function () { - let arrayList = new ArrayList(); - arrayList.add("四"); - arrayList.add("三"); - arrayList.add(1); - arrayList.add("a"); - arrayList.add(1); - arrayList.add("b"); - arrayList.add("c"); - arrayList.add(1); - arrayList.removeByRange(0, 8); - let res = arrayList.length; - let res1 = arrayList.getLastIndexOf(1); - expect(res).assertEqual(0); - expect(res1).assertEqual(-1); - }); - - /** - * @tc.number: TEST_REMOVE_BY_RANGE_005 - * @tc.name : testRemoveByRange005 - * @tc.desc : Deletes elements from a specified range, including elements at the start position and - * elements at the end position. For example: removeByRange(0, 8). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testRemoveByRange005", 0, function () { - let arrayList = new ArrayList(); - arrayList.add("四"); - arrayList.add("三"); - arrayList.add(1); - arrayList.add("a"); - arrayList.add(1); - arrayList.add("b"); - arrayList.add("c"); - arrayList.add(1); - try { - arrayList.removeByRange(0, 9); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200001); - expect(err.message).assertEqual(`The value of "toIndex" is out of range. It must be >= 0 && <= 8. Received value is: 9`); - } - }); - - /** - * @tc.number: TEST_REPLACE_ALL_ELEMENTS_001 - * @tc.name : testReplaceAllElements001 - * @tc.desc : Perform some operation on the elements in the ArrayList instance and return the ArrayList instance - * after the operation. For example: arrayList.replaceAllElements((item, index) => {return (item = 2 * item);}). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testReplaceAllElements001", 0, function () { - let arrayList = new ArrayList(); - arrayList.add(4); - arrayList.add(3); - arrayList.add(1); - arrayList.add(2); - arrayList.add(14); - arrayList.replaceAllElements((item:number, index:number) => { - return (item = 2 * item); - }); - let arr = []; - arrayList.forEach((item, index) => { - arr.push(item); - }); - let a = [8, 6, 2, 4, 28]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number: TEST_FOR_EACH_001 - * @tc.name : testForEach001 - * @tc.desc : Traversing elements in an ArrayList instance. - * For example: arrayList.forEach((item, index) => {arr.push(item);}). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testForEach001", 0, function () { - let arrayList = new ArrayList(); - arrayList.add(4); - arrayList.add(3); - arrayList.add(1); - arrayList.add(2); - arrayList.add(14); - let arr = []; - arrayList.forEach((item, index) => { - arr.push(item); - }); - let a = [4, 3, 1, 2, 14]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number: TEST_FOR_EACH_002 - * @tc.name : testForEach002 - * @tc.desc : Traversing elements in an ArrayList instance. - * For example: arrayList.forEach.bind({}, "a")(() => {}). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it('testForEach002', 0, function () { - let arrayList = new ArrayList(); - try { - arrayList.forEach.bind({}, "a")(); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200011); - expect(err.message).assertEqual(`The forEach method cannot be bound`); - } - }); - - /** - * @tc.number: TEST_SORT_001 - * @tc.name : testSort001 - * @tc.desc : Arrange the elements in the ArrayList instance in descending order. - * For example: arrayList.sort((a, b) => a - b). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSort001", 0, function () { - let arrayList = new ArrayList(); - arrayList.add(4); - arrayList.add(3); - arrayList.add(1); - arrayList.add(2); - arrayList.add(14); - arrayList.sort((a:any, b:any) => a - b); - let arr = []; - arrayList.forEach((item, index) => { - arr.push(item); - }); - let a = [1, 2, 3, 4, 14]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number: TEST_SORT_002 - * @tc.name : testSort002 - * @tc.desc : Arrange the elements in the ArrayList instance in descending order. - * For example: arrayList.sort((a, b) => a - b). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSort002", 0, function () { - let arrayList = new ArrayList(); - arrayList.add("刘"); - arrayList.add("张三"); - arrayList.add(1); - arrayList.add(2); - arrayList.add("李四"); - arrayList.sort((a:any, b:any) => a - b); - let arr = []; - arrayList.forEach((item, index) => { - arr.push(item); - }); - let a = ["刘", "张三", 1, 2, "李四"]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number: TEST_SORT_003 - * @tc.name : testSort003 - * @tc.desc : Arrange the elements in the ArrayList instance in descending order. - * For example: arrayList.sort((a, b) => a - b). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSort003", 0, function () { - let arrayList = new ArrayList(); - arrayList.add("c"); - arrayList.add("a"); - arrayList.add("b"); - arrayList.add("e"); - arrayList.add("d"); - arrayList.sort((a:any, b:any) => a - b); - let arr = []; - arrayList.forEach((item, index) => { - arr.push(item); - }); - let a = ["c", "a", "b", "e", "d"]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number: TEST_SUB_ARRAY_LIST_001 - * @tc.name : testSubArrayList001 - * @tc.desc : Intercepts an element within the specified range, including the element with the - * starting index but not the element with the ending index. For example: arrayList.subArrayList(2, 4). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSubArrayList001", 0, function () { - let arrayList = new ArrayList(); - arrayList.add(4); - arrayList.add(3); - arrayList.add(1); - arrayList.add(2); - arrayList.add(14); - let subArr = arrayList.subArrayList(2, 4); - let arr = []; - subArr.forEach((item, index) => { - arr.push(item); - }); - let a = [1, 2]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number: TEST_SUB_ARRAY_LIST_002 - * @tc.name : testSubArrayList002 - * @tc.desc : Intercepts an element within the specified range, including the element with the - * starting index but not the element with the ending index. For example: arrayList.subArrayList(4, 2). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSubArrayList002", 0, function () { - let arrayList = new ArrayList(); - arrayList.add(4); - arrayList.add(3); - arrayList.add(1); - arrayList.add(2); - arrayList.add(14); - try { - let subArr = arrayList.subArrayList(4, 2); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200001); - expect(err.message).assertEqual(`The value of "fromIndex" is out of range. It must be >= 0 && <= 1. Received value is: 4`); - } - }); - - /** - * @tc.number: TEST_SUB_ARRAY_LIST_003 - * @tc.name : testSubArrayList003 - * @tc.desc : Intercepts an element within the specified range, including the element with the - * starting index but not the element with the ending index. For example: arrayList.subArrayList(0 ,6). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSubArrayList003", 0, function () { - let arrayList = new ArrayList(); - arrayList.add(4); - arrayList.add(3); - arrayList.add(1); - arrayList.add(2); - arrayList.add(14); - let subArr = arrayList.subArrayList(0, 5); - let arr = []; - arrayList.forEach((item, index) => { - arr.push(item); - }); - let a = [4, 3, 1, 2, 14]; - for (let i = 0; i < a.length; i++) { - expect(a[i]).assertEqual(arr[i]); - } - }); - - /** - * @tc.number: TEST_SUB_ARRAY_LIST_004 - * @tc.name : testSubArrayList004 - * @tc.desc : Intercepts an element within the specified range, including the element with the - * starting index but not the element with the ending index. For example: arrayList.subArrayList(6, 9). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSubArrayList004", 0, function () { - let arrayList = new ArrayList(); - arrayList.add(4); - arrayList.add(3); - arrayList.add(1); - arrayList.add(2); - arrayList.add(14); - try { - let subArr = arrayList.subArrayList(6, 9); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200001); - expect(err.message).assertEqual(`The value of "fromIndex" is out of range. It must be >= 0 && <= 4. Received value is: 6`); - } - }); - - /** - * @tc.number: TEST_CLEAR_001 - * @tc.name : testClear001 - * @tc.desc : Clear all elements in the ArrayList instance. For example: arrayList.clear(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testClear001", 0, function () { - let arrayList = new ArrayList(); - arrayList.add(4); - arrayList.add(3); - arrayList.add(1); - arrayList.add(2); - arrayList.add(14); - arrayList.clear(); - let res = arrayList.length; - expect(res).assertEqual(0); - }); - - /** - * @tc.number: TEST_CLEAR_002 - * @tc.name : testClear002 - * @tc.desc : Clear all elements in the ArrayList instance. For example: arrayList.clear.bind({}, "a")(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it('testClear002', 0, function () { - let arrayList = new ArrayList(); - try { - arrayList.clear.bind({}, "a")(); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200011); - expect(err.message).assertEqual(`The clear method cannot be bound`); - } - }); - - /** - * @tc.number: TEST_CLONE_001 - * @tc.name : testClone001 - * @tc.desc : Clone an ArrayList instance. For example: arrayList.clone(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testClone001", 0, function () { - let arrayList = new ArrayList(); - arrayList.add(4); - arrayList.add(3); - arrayList.add(1); - arrayList.add(2); - arrayList.add(14); - let res = arrayList.clone(); - let arr = []; - res.forEach((item, index) => { - arr.push(item); - }); - let a = [4, 3, 1, 2, 14]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number: TEST_GET_CAPACITY_001 - * @tc.name : testGetCapacity001 - * @tc.desc : Get the capacity of ArrayList instance. For example: arrayList.getCapacity(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetCapacity001", 0, function () { - let arrayList = new ArrayList(); - arrayList.add(4); - arrayList.add(3); - arrayList.add(1); - arrayList.add(2); - arrayList.add(14); - let res = arrayList.getCapacity(); - expect(res).assertEqual(10); - }); - - /** - * @tc.number: TEST_GET_CAPACITY_002 - * @tc.name : testGetCapacity002 - * @tc.desc : Get the capacity of the ArrayList instance after capacity expansion. - * For example: arrayList.getCapacity(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetCapacity002", 0, function () { - let arrayList = new ArrayList(); - arrayList.add(4); - arrayList.add(3); - arrayList.add(1); - arrayList.add(2); - arrayList.add(14); - arrayList.add("a"); - arrayList.add("b"); - arrayList.add("c"); - arrayList.add("d"); - arrayList.add("v"); - let a = [1, 2, 3, 4]; - arrayList.add(a); - let res = arrayList.getCapacity(); - expect(res).assertEqual(15); - }); - - /** - * @tc.number: TEST_CONVERT_TO_ARRAY_001 - * @tc.name : testConvertToArray001 - * @tc.desc : Convert an ArrayList instance to an array. For example: arrayList.convertToArray(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testConvertToArray001", 0, function () { - let arrayList = new ArrayList(); - arrayList.add(4); - arrayList.add(3); - arrayList.add(1); - arrayList.add(2); - arrayList.add(14); - let arr = arrayList.convertToArray(); - let a = [4, 3, 1, 2, 14]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number: TEST_IS_EMPTY_001 - * @tc.name : testIsEmpty001 - * @tc.desc : Determine whether the ArrayList instance is empty. For example: arrayList.isEmpty(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsEmpty001", 0, function () { - let arrayList = new ArrayList(); - arrayList.add(4); - arrayList.add(3); - arrayList.add(1); - arrayList.add(2); - arrayList.add(14); - arrayList.clear(); - let res = arrayList.isEmpty(); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_EMPTY_002 - * @tc.name : testIsEmpty002 - * @tc.desc : Determine whether the ArrayList instance is empty. For example: arrayList.isEmpty(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsEmpty002", 0, function () { - let arrayList = new ArrayList(); - arrayList.add(4); - arrayList.add(3); - arrayList.add(1); - arrayList.add(2); - arrayList.add(14); - let res = arrayList.isEmpty(); - expect(res).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_EMPTY_003 - * @tc.name : testIsEmpty003 - * @tc.desc : Determine whether the ArrayList instance is empty. For example: arrayList.isEmpty.bind({}, "a")(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it('testIsEmpty003', 0, function () { - let arrayList = new ArrayList(); - try { - arrayList.isEmpty.bind({}, "a")(); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200011); - expect(err.message).assertEqual(`The isEmpty method cannot be bound`); - } - }); - - /** - * @tc.number: TEST_INCREASE_CAPACITY_TO_001 - * @tc.name : testIncreaseCapacityTo001 - * @tc.desc : Expand the ArrayList instance capacity to the specified value. - * For example: arrayList.increaseCapacityTo(8). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIncreaseCapacityTo001", 0, function () { - let arrayList = new ArrayList(); - arrayList.add(4); - arrayList.add(3); - arrayList.add(1); - arrayList.add(2); - arrayList.add(14); - arrayList.increaseCapacityTo(8); - let res = arrayList.getCapacity(); - expect(res).assertEqual(8); - }); - - /** - * @tc.number: TEST_INCREASE_CAPACITY_TO_002 - * @tc.name : testIncreaseCapacityTo002 - * @tc.desc : Expand the ArrayList instance capacity to the specified value. - * For example: arrayList.increaseCapacityTo(-1). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIncreaseCapacityTo002", 0, function () { - let arrayList = new ArrayList(); - arrayList.add(4); - arrayList.add(3); - arrayList.add(1); - arrayList.add(2); - arrayList.add(14); - arrayList.increaseCapacityTo(-1); - let res = arrayList.getCapacity(); - expect(res).assertEqual(10); - }); - - /** - * @tc.number: TEST_TRIM_TO_CURRENT_LENGTH_001 - * @tc.name : testTrimToCurrentLength001 - * @tc.desc : Limit the ArrayList instance capacity to the length of the ArrayList instance. - * For example: arrayList.trimToCurrentLength(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testTrimToCurrentLength001", 0, function () { - let arrayList = new ArrayList(); - arrayList.add(4); - arrayList.add(3); - arrayList.add(1); - arrayList.add(2); - arrayList.add(14); - arrayList.trimToCurrentLength(); - let res = arrayList.getCapacity(); - expect(res).assertEqual(5); - }); - - /** - * @tc.number: TEST_ITERATOR_001 - * @tc.name : testIterator001 - * @tc.desc : Iterates over all elements in an ArrayList instance. For example: arrayList[Symbol.iterator](). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIterator001", 0, function () { - let arrayList = new ArrayList(); - arrayList.add("刘"); - arrayList.add("张三"); - arrayList.add(1); - arrayList.add(2); - arrayList.add("李四"); - let arr = []; - let itr = arrayList[Symbol.iterator](); - let tmp = undefined; - do { - tmp = itr.next().value; - arr.push(tmp); - } while (tmp != undefined); - let a = ["刘", "张三", 1, 2, "李四"]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - - }) -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryArrayListetstest/src/main/ets/test/List.test.ets b/commonlibrary/crossplatform/commonlibraryArrayListetstest/src/main/ets/test/List.test.ets deleted file mode 100755 index e6d815a64..000000000 --- a/commonlibrary/crossplatform/commonlibraryArrayListetstest/src/main/ets/test/List.test.ets +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Copyright (c) 2023 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. - */ -import ArraylistTest from './ArrayList.test' - -export default function testsuite() { - ArraylistTest() -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryArrayListetstest/src/main/module.json b/commonlibrary/crossplatform/commonlibraryArrayListetstest/src/main/module.json deleted file mode 100755 index a4443e713..000000000 --- a/commonlibrary/crossplatform/commonlibraryArrayListetstest/src/main/module.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "module": { - "name": "entry_test", - "type": "feature", - "description": "$string:module_test_desc", - "mainElement": "TestAbility", - "deviceTypes": [ - "phone" - ], - "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", - "skills": [ - { - "actions": [ - "action.system.home" - ], - "entities": [ - "entity.system.home" - ] - } - ] - } - ] - } -} diff --git a/commonlibrary/crossplatform/commonlibraryArrayListetstest/src/main/resources/base/element/color.json b/commonlibrary/crossplatform/commonlibraryArrayListetstest/src/main/resources/base/element/color.json deleted file mode 100755 index 3c712962d..000000000 --- a/commonlibrary/crossplatform/commonlibraryArrayListetstest/src/main/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/commonlibrary/crossplatform/commonlibraryArrayListetstest/src/main/resources/base/element/string.json b/commonlibrary/crossplatform/commonlibraryArrayListetstest/src/main/resources/base/element/string.json deleted file mode 100755 index 65d8fa5a7..000000000 --- a/commonlibrary/crossplatform/commonlibraryArrayListetstest/src/main/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/commonlibrary/crossplatform/commonlibraryArrayListetstest/src/main/resources/base/media/icon.png b/commonlibrary/crossplatform/commonlibraryArrayListetstest/src/main/resources/base/media/icon.png deleted file mode 100755 index e69de29bb..000000000 diff --git a/commonlibrary/crossplatform/commonlibraryArrayListetstest/src/main/resources/base/profile/test_pages.json b/commonlibrary/crossplatform/commonlibraryArrayListetstest/src/main/resources/base/profile/test_pages.json deleted file mode 100755 index 77e90731b..000000000 --- a/commonlibrary/crossplatform/commonlibraryArrayListetstest/src/main/resources/base/profile/test_pages.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "src": [ - "TestAbility/pages/Index" - ] -} diff --git a/commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/AppScope/app.json b/commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/AppScope/app.json deleted file mode 100755 index 850c82b46..000000000 --- a/commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/AppScope/app.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "app": { - "bundleName": "ohos.acts.commonlibrary.crossplatform.LightWeightMap.normal", - "vendor": "example", - "versionCode": 1000000, - "versionName": "1.0.0", - "icon": "$media:app_icon", - "label": "$string:app_name", - "minAPIVersion": 10, - "targetAPIVersion": 10, - "car": { - "apiCompatibleVersion": 10, - "singleUser": false - } - } -} diff --git a/commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/AppScope/resources/base/element/string.json b/commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/AppScope/resources/base/element/string.json deleted file mode 100755 index 3811bc441..000000000 --- a/commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "xtsDemo1" - } - ] -} diff --git a/commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/AppScope/resources/base/media/app_icon.png b/commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/AppScope/resources/base/media/app_icon.png deleted file mode 100755 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6BLrPFWk?s;$LOP{GmJpBl$qoSA!PUg~PA65-S00{{S`XKG6NkG0RgjEntPrmV+?0|00mu7;+5 zrdpa{2QLqPJ4Y{j7=Mrl{BaxrkdY69+c~(w{Fv-v&aR%aEI&JYSeRTLWm!zbv;?)_ ziZB;fwGbbeL5Q}YLx`J$lp~A09KK8t_z}PZ=4ZzgdeKtgoc+o5EvN9A1K1_<>M?MBqb#!ASf&# zEX?<)!RH(7>1P+j=jqG(58}TVN-$psA6K}atCuI!KTJD&FMmH-78ZejBm)0qc{ESp z|LuG1{QnBUJRg_E=h1#XMWt2%fcoN@l7eAS!Es?Q+;XsRNPhiiE=@AqlLkJzF`O18 zbsbSmKN=aaq8k3NFYZfDWpK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(Yulc9&OJoVBj<(y@mJ5!KGkM|G~#H&u(K49fbAqeQWD?#fk@>)HqY7g&&A0ssI2 diff --git a/commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/src/main/ets/TestAbility/TestAbility.ets b/commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/src/main/ets/TestAbility/TestAbility.ets deleted file mode 100755 index 368aef919..000000000 --- a/commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/src/main/ets/TestAbility/TestAbility.ets +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import UIAbility from '@ohos.app.ability.UIAbility'; -import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; -import hilog from '@ohos.hilog'; -import { Hypium } from '@ohos/hypium'; -import testsuite from '../test/List.test'; -import window from '@ohos.window'; - -export default class TestAbility extends UIAbility { - onCreate(want, 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) ?? ''); - var abilityDelegator: any - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var abilityDelegatorArguments: any - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - hilog.info(0x0000, 'testTag', '%{public}s', 'start run testcase!!!'); - Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) - } - - onDestroy() { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onDestroy'); - } - - onWindowStageCreate(windowStage: window.WindowStage) { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageCreate'); - windowStage.loadContent('TestAbility/pages/Index', (err, data) => { - 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. Data: %{public}s', - JSON.stringify(data) ?? ''); - }); - } - - 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/commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/src/main/ets/TestAbility/pages/Index.ets b/commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/src/main/ets/TestAbility/pages/Index.ets deleted file mode 100755 index dbc536ca8..000000000 --- a/commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/src/main/ets/TestAbility/pages/Index.ets +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import hilog from '@ohos.hilog'; - -@Entry -@Component -struct Index { - aboutToAppear() { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility index aboutToAppear'); - } - @State message: string = 'Hello World' - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Button() { - Text('next page') - .fontSize(20) - .fontWeight(FontWeight.Bold) - }.type(ButtonType.Capsule) - .margin({ - top: 20 - }) - .backgroundColor('#0D9FFB') - .width('35%') - .height('5%') - .onClick(()=>{ - }) - } - .width('100%') - } - .height('100%') - } - } \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts deleted file mode 100755 index 92a16d84e..000000000 --- a/commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts +++ /dev/null @@ -1,49 +0,0 @@ -import hilog from '@ohos.hilog'; -import TestRunner from '@ohos.application.testRunner'; -import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; - -var abilityDelegator = undefined -var abilityDelegatorArguments = undefined - -async function onAbilityCreateCallback() { - hilog.info(0x0000, 'testTag', '%{public}s', 'onAbilityCreateCallback'); -} - -async function addAbilityMonitorCallback(err: any) { - 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() { - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun run'); - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var testAbilityName = abilityDelegatorArguments.bundleName + '.TestAbility' - let lMonitor = { - abilityName: testAbilityName, - onAbilityCreate: onAbilityCreateCallback, - }; - abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) - var cmd = 'aa start -d 0 -a TestAbility' + ' -b ' + abilityDelegatorArguments.bundleName - var debug = abilityDelegatorArguments.parameters['-D'] - if (debug == 'true') - { - cmd += ' -D' - } - hilog.info(0x0000, 'testTag', 'cmd : %{public}s', cmd); - abilityDelegator.executeShellCommand(cmd, - (err: any, d: any) => { - hilog.info(0x0000, 'testTag', 'executeShellCommand : err : %{public}s', JSON.stringify(err) ?? ''); - hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.stdResult ?? ''); - hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.exitCode ?? ''); - }) - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun end'); - } -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/src/main/ets/test/LightWeightMap.test.ets b/commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/src/main/ets/test/LightWeightMap.test.ets deleted file mode 100755 index f97f2aa6c..000000000 --- a/commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/src/main/ets/test/LightWeightMap.test.ets +++ /dev/null @@ -1,1194 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ - -import LightWeightMap from "@ohos.util.LightWeightMap"; -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' -export default function LightWeightMapTest() { -describe("LightWeightMapTest", function () { - - /** - * @tc.number: TEST_CONSTRUCTOR_001 - * @tc.name: testConstructor001 - * @tc.desc: Create an LightWeightMap instance. For example: let lightWeightMap = new LightWeightMap(). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testConstructor001", 0, function () { - try { - let lightWeightMap = new LightWeightMap(); - expect(lightWeightMap != undefined).assertEqual(true); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200012); - expect(err.message).assertEqual("The LightWeightMap's constructor cannot be directly invoked"); - } - }); - - /** - * @tc.number: TEST_LENGTH_001 - * @tc.name: testLength001 - * @tc.desc: Get the number of key value pairs in the lightWeightMap instance. For example: lightWeightMap.length. - * @tc.size: MediumTest - * @tc.type: Field - * @tc.level: level 1 - */ - it("testLength001", 0, function () { - let lightWeightMap = new LightWeightMap(); - lightWeightMap.set(1, "A"); - lightWeightMap.set(2, "B"); - lightWeightMap.set(3, "C"); - lightWeightMap.set(4, "D"); - lightWeightMap.set(5, "E"); - let res = lightWeightMap.length; - expect(res).assertEqual(5); - }); - - /** - * @tc.number: TEST_HASALL_001 - * @tc.name: testHasAll001 - * @tc.desc: Judge whether a lightweightmap contains all key value pairs in another lightweightmap. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testHasAll001", 0, function () { - let lightWeightMap = new LightWeightMap(); - lightWeightMap.set("a", "A"); - lightWeightMap.set("b", "B"); - lightWeightMap.set("c", "C"); - lightWeightMap.set("d", "D"); - lightWeightMap.set("e", "E"); - let lightWeightMap1 = new LightWeightMap(); - lightWeightMap1.set("a", "A"); - lightWeightMap1.set("d", "D"); - let res = lightWeightMap.hasAll(lightWeightMap1); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_HASALL_002 - * @tc.name: testHasAll002 - * @tc.desc: Judge whether a lightweightmap contains all key value pairs in another lightweightmap. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testHasAll002", 0, function () { - let lightWeightMap = new LightWeightMap(); - lightWeightMap.set("a", "A"); - lightWeightMap.set("b", "B"); - lightWeightMap.set("c", "C"); - lightWeightMap.set("d", "D"); - lightWeightMap.set("e", "E"); - let lightWeightMap1 = new LightWeightMap(); - lightWeightMap1.set("a1", "A1"); - lightWeightMap1.set("d1", "D1"); - let res = lightWeightMap.hasAll(lightWeightMap1); - expect(res).assertEqual(false); - }); - - /** - * @tc.number: TEST_HASALL_003 - * @tc.name: testHasAll003 - * @tc.desc: Judge whether a lightweightmap contains all key value pairs in another lightweightmap. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testHasAll003", 0, function () { - let lightWeightMap = new LightWeightMap(); - lightWeightMap.set("a", "A"); - lightWeightMap.set("b", "B"); - lightWeightMap.set("c", "C"); - lightWeightMap.set("d", "D"); - lightWeightMap.set("e", "E"); - let lightWeightMap1 = new LightWeightMap(); - lightWeightMap1.set("a", "A1"); - lightWeightMap1.set("d", "D1"); - let res = lightWeightMap.hasAll(lightWeightMap1); - expect(res).assertEqual(false); - }); - - /** - * @tc.number: TEST_HASALL_004 - * @tc.name: testHasAll004 - * @tc.desc: Judge whether a lightweightmap contains all key value pairs in another lightweightmap. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testHasAll004", 0, function () { - let lightWeightMap = new LightWeightMap(); - let lightWeightMap1 = new LightWeightMap(); - let res = lightWeightMap.hasAll(lightWeightMap1); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_HASALL_005 - * @tc.name: testHasAll005 - * @tc.desc: Judge whether a lightweightmap contains all key value pairs in another lightweightmap. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testHasAll005", 0, function () { - let lightWeightMap = new LightWeightMap(); - lightWeightMap.set("a", "A"); - lightWeightMap.set("b", "B"); - lightWeightMap.set("c", "C"); - lightWeightMap.set("d", "D"); - lightWeightMap.set("e", "E"); - let lightWeightMap1 = new LightWeightMap(); - lightWeightMap1.set("a", "A"); - lightWeightMap1.set("d", "D1"); - let res = lightWeightMap.hasAll(lightWeightMap1); - expect(res).assertEqual(false); - }); - - /** - * @tc.number: TEST_HASALL_006 - * @tc.name: testHasAll006 - * @tc.desc: Judge whether a lightweightmap contains all key value pairs in another lightweightmap. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testHasAll006", 0, function () { - let lightWeightMap = new LightWeightMap(); - try { - //@ts-ignore - lightWeightMap.hasAll([1, 2, 3]); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(401); - expect(err.message).assertEqual(`The type of "map" must be LightWeightMap. Received value is: 1,2,3`); - } - }); - - /** - * @tc.number: TEST_HASKEY_001 - * @tc.name: testHasKey001 - * @tc.desc: Determine whether the LightWeightMap contains the specified key. For example: lightWeightMap.hasKey("a"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testHasKey001", 0, function () { - let lightWeightMap = new LightWeightMap(); - lightWeightMap.set("a", "A"); - lightWeightMap.set("b", "B"); - lightWeightMap.set("c", "C"); - lightWeightMap.set("d", "D"); - lightWeightMap.set("e", "E"); - let res = lightWeightMap.hasKey("a"); - expect(res).assertEqual(true); - let res1 = lightWeightMap.hasKey(1); - expect(res1).assertEqual(false); - }); - - /** - * @tc.number: TEST_HASVALUE_001 - * @tc.name: testHasValue001 - * @tc.desc: Determine whether the LightWeightMap contains the specified value. - * For example: lightWeightMap.hasValue("A"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testHasValue001", 0, function () { - let lightWeightMap = new LightWeightMap(); - lightWeightMap.set("a", "A"); - lightWeightMap.set("b", "B"); - lightWeightMap.set("c", "C"); - lightWeightMap.set("d", "D"); - lightWeightMap.set("e", "E"); - let res = lightWeightMap.hasValue("A"); - expect(res).assertEqual(true); - let res1 = lightWeightMap.hasValue(1); - expect(res1).assertEqual(false); - }); - - /** - * @tc.number: TEST_INCREASECAPACITYTO_001 - * @tc.name: testIncreaseCapacityTo001 - * @tc.desc: Expand the LightWeightMap instance capacity to the specified value. - * For example: lightWeightMap.increaseCapacityTo(3). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testIncreaseCapacityTo001", 0, function () { - let lightWeightMap = new LightWeightMap(); - lightWeightMap.set("a", "A"); - lightWeightMap.set("b", "B"); - lightWeightMap.set("c", "C"); - lightWeightMap.set("d", "D"); - lightWeightMap.set("e", "E"); - lightWeightMap.increaseCapacityTo(3); - let length = lightWeightMap.length; - expect(length).assertEqual(5); - }); - - /** - * @tc.number: TEST_INCREASECAPACITYTO_002 - * @tc.name: testIncreaseCapacityTo002 - * @tc.desc: Expand the LightWeightMap instance capacity to the specified value. - * For example: lightWeightMap.increaseCapacityTo(10). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testIncreaseCapacityTo002", 0, function () { - let lightWeightMap = new LightWeightMap(); - lightWeightMap.set("a", "A"); - lightWeightMap.set("b", "B"); - lightWeightMap.set("c", "C"); - lightWeightMap.set("d", "D"); - lightWeightMap.set("e", "E"); - let res = lightWeightMap.increaseCapacityTo(10); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_INCREASECAPACITYTO_003 - * @tc.name: testIncreaseCapacityTo003 - * @tc.desc: Expand the LightWeightMap instance capacity to the specified value. - * For example: lightWeightMap.increaseCapacityTo("qwe"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testIncreaseCapacityTo003", 0, function () { - let lightWeightMap = new LightWeightMap(); - lightWeightMap.set("a", "A"); - lightWeightMap.set("b", "B"); - lightWeightMap.set("c", "C"); - lightWeightMap.set("d", "D"); - lightWeightMap.set("e", "E"); - try { - //@ts-ignore - lightWeightMap.increaseCapacityTo("qwe"); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(401); - expect(err.message).assertEqual(`The type of "minimumCapacity" must be number. Received value is: qwe`); - } - }); - - /** - * @tc.number: TEST_ENTRIES_001 - * @tc.name: testEntries001 - * @tc.desc: Get all key value pairs collection in lightWeightMap. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testEntries001", 0, function () { - let lightWeightMap = new LightWeightMap(); - lightWeightMap.set(1, "A"); - lightWeightMap.set(2, "B"); - lightWeightMap.set(3, "C"); - lightWeightMap.set(4, "D"); - lightWeightMap.set(5, "E"); - let res = lightWeightMap.entries(); - expect(JSON.stringify(res.next().value)).assertEqual('[1,"A"]'); - expect(JSON.stringify(res.next().value)).assertEqual('[2,"B"]'); - expect(JSON.stringify(res.next().value)).assertEqual('[3,"C"]'); - expect(JSON.stringify(res.next().value)).assertEqual('[4,"D"]'); - expect(JSON.stringify(res.next().value)).assertEqual('[5,"E"]'); - }); - - /** - * @tc.number: TEST_GET_001 - * @tc.name: testGet001 - * @tc.desc: Get the corresponding value through the key. For example: lightWeightMap.get(4). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testGet001", 0, function () { - let lightWeightMap = new LightWeightMap(); - lightWeightMap.set(1, "A"); - lightWeightMap.set(2, "B"); - lightWeightMap.set(3, "C"); - lightWeightMap.set(4, "D"); - lightWeightMap.set(5, "E"); - let res = lightWeightMap.get(4); - expect(res).assertEqual("D"); - }); - - /** - * @tc.number: TEST_GET_002 - * @tc.name: testGet002 - * @tc.desc: Get the corresponding value through the key. For example: lightWeightMap.get(10). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testGet002", 0, function () { - let lightWeightMap = new LightWeightMap(); - lightWeightMap.set(1, "A"); - lightWeightMap.set(2, "B"); - lightWeightMap.set(3, "C"); - lightWeightMap.set(4, "D"); - lightWeightMap.set(5, "E"); - let res = lightWeightMap.get(10); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_GETINDEXOFKEY_001 - * @tc.name: testGetIndexOfKey001 - * @tc.desc: Find the index of the key value pair according to the corresponding key. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - * If no key is specified, return -1. - */ - it("testGetIndexOfKey001", 0, function () { - let lightWeightMap = new LightWeightMap(); - lightWeightMap.set(1, "A"); - lightWeightMap.set(2, "B"); - lightWeightMap.set(3, "C"); - lightWeightMap.set(4, "D"); - lightWeightMap.set(5, "E"); - let res = lightWeightMap.getIndexOfKey(2); - expect(res).assertEqual(1); - }); - - /** - * @tc.number: TEST_GETINDEXOFKEY_002 - * @tc.name: testGetIndexOfKey002 - * @tc.desc: Find the index of the key value pair according to the corresponding key. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - * If no key is specified, return -1. - */ - it("testGetIndexOfKey002", 0, function () { - let lightWeightMap = new LightWeightMap(); - lightWeightMap.set(1, "A"); - lightWeightMap.set(2, "B"); - lightWeightMap.set(3, "C"); - lightWeightMap.set(4, "D"); - lightWeightMap.set(5, "E"); - let res = lightWeightMap.getIndexOfKey(10); - expect(res).assertEqual(-1); - }); - - - - /** - * @tc.number: TEST_GETINDEXOFVALUE_001 - * @tc.name: testGetIndexOfValue001 - * @tc.desc: Find the index of the key value pair according to the corresponding value. - * If no key is specified, return -1. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testGetIndexOfValue001", 0, function () { - let lightWeightMap = new LightWeightMap(); - lightWeightMap.set(1, "A"); - lightWeightMap.set(2, "B"); - lightWeightMap.set(3, "C"); - lightWeightMap.set(4, "D"); - lightWeightMap.set(5, "E"); - lightWeightMap.setValueAt(4, "F"); - let res = lightWeightMap.getIndexOfValue("F"); - expect(res).assertEqual(4); - }); - - /** - * @tc.number: TEST_GETINDEXOFVALUE_002 - * @tc.name: testGetIndexOfValue002 - * @tc.desc: Find the index of the key value pair according to the corresponding value. - * If no key is specified, return -1. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testGetIndexOfValue002", 0, function () { - let lightWeightMap = new LightWeightMap(); - lightWeightMap.set(1, "A"); - lightWeightMap.set(2, "B"); - lightWeightMap.set(3, "C"); - lightWeightMap.set(4, "D"); - lightWeightMap.set(5, "E"); - lightWeightMap.setValueAt(4, "F"); - let res = lightWeightMap.getIndexOfValue("H"); - expect(res).assertEqual(-1); - }); - - /** - * @tc.number: TEST_ISEMPTY_001 - * @tc.name: testIsEmpty001 - * @tc.desc: Determine whether the LightWeightMap instance is empty. For example: lightWeightMap.isEmpty(). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testIsEmpty001", 0, function () { - let lightWeightMap = new LightWeightMap(); - let res1 = lightWeightMap.isEmpty(); - expect(res1).assertEqual(true); - lightWeightMap.set(1, "A"); - lightWeightMap.set(2, "B"); - lightWeightMap.set(3, "C"); - lightWeightMap.set(4, "D"); - lightWeightMap.set(5, "E"); - let res2 = lightWeightMap.isEmpty(); - expect(res2).assertEqual(false); - }); - - /** - * @tc.number: TEST_GETKEYAT_001 - * @tc.name: testGetKeyAt001 - * @tc.desc: Find the key of the key value pair according to the corresponding index. - * For example: lightWeightMap.getKeyAt(1). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testGetKeyAt001", 0, function () { - let lightWeightMap = new LightWeightMap(); - lightWeightMap.set(1, "A"); - lightWeightMap.set(2, "B"); - lightWeightMap.set(3, "C"); - lightWeightMap.set(4, "D"); - lightWeightMap.set(5, "E"); - let res = lightWeightMap.getKeyAt(1); - expect(res).assertEqual(2); - }); - - /** - * @tc.number: TEST_GETKEYAT_002 - * @tc.name: testGetKeyAt002 - * @tc.desc: Find the key of the key value pair according to the corresponding index. - * For example: lightWeightMap.getKeyAt("a"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testGetKeyAt002", 0, function () { - let lightWeightMap = new LightWeightMap(); - lightWeightMap.set(1, "A"); - lightWeightMap.set(2, "B"); - lightWeightMap.set(3, "C"); - lightWeightMap.set(4, "D"); - lightWeightMap.set(5, "E"); - try { - //@ts-ignore - let res = lightWeightMap.getKeyAt("a"); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(401); - expect(err.message).assertEqual(`The type of "index" must be number. Received value is: a`); - } - }); - - /** - * @tc.number: TEST_GETKEYAT_003 - * @tc.name: testGetKeyAt003 - * @tc.desc: Find the key of the key value pair according to the corresponding index. - * For example: lightWeightMap.getKeyAt(6). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testGetKeyAt003", 0, function () { - let lightWeightMap = new LightWeightMap(); - lightWeightMap.set(1, "A"); - lightWeightMap.set(2, "B"); - lightWeightMap.set(3, "C"); - lightWeightMap.set(4, "D"); - lightWeightMap.set(5, "E"); - try { - let res = lightWeightMap.getKeyAt(6); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200001); - expect(err.message).assertEqual(`The value of "index" is out of range. It must be >= 0 && <= 4. Received value is: 6`); - } - }); - - /** - * @tc.number: TEST_KEYS_001 - * @tc.name: testKeys001 - * @tc.desc: Get a collection of all the keys in the LightWeightMap. For example: lightWeightMap.keys(). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testKeys001", 0, function () { - let lightWeightMap = new LightWeightMap(); - lightWeightMap.set(1, "A"); - lightWeightMap.set(2, "B"); - lightWeightMap.set(3, "C"); - lightWeightMap.set(4, "D"); - lightWeightMap.set(5, "E"); - let res = lightWeightMap.keys(); - expect(res.next().value).assertEqual(1); - expect(res.next().value).assertEqual(2); - expect(res.next().value).assertEqual(3); - expect(res.next().value).assertEqual(4); - expect(res.next().value).assertEqual(5); - }); - - /** - * @tc.number: TEST_SETALL_001 - * @tc.name: testSetAll001 - * @tc.desc: Copy key value pairs from one LightWeightMap to another. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testSetAll001", 0, function () { - let lightWeightMap = new LightWeightMap(); - lightWeightMap.set(1, "A"); - lightWeightMap.set(2, "B"); - lightWeightMap.set(3, "C"); - lightWeightMap.set(4, "D"); - lightWeightMap.set(5, "E"); - let lightWeightMap1 = new LightWeightMap(); - lightWeightMap1.set(6, "A"); - lightWeightMap1.set(7, "B"); - lightWeightMap.setAll(lightWeightMap1); - for (let i = 1; i < 8; i++) { - expect(lightWeightMap.hasKey(i)).assertEqual(true); - } - }); - - /** - * @tc.number: TEST_SETALL_002 - * @tc.name: testSetAll002 - * @tc.desc: Copy key value pairs from one LightWeightMap to another. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testSetAll002", 0, function () { - let lightWeightMap = new LightWeightMap(); - lightWeightMap.set(1, "A"); - lightWeightMap.set(2, "B"); - try { - //@ts-ignore - lightWeightMap.setAll([1, 2, 3]); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(401); - expect(err.message).assertEqual(`The type of "map" must be LightWeightMap. Received value is: 1,2,3`); - } - }); - - /** - * @tc.number: TEST_SET_001 - * @tc.name: testSet001 - * @tc.desc: Add a pair of key value pairs to the LightWeightMap. For example: lightWeightMap.set(1, "A"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testSet001", 0, function () { - let lightWeightMap = new LightWeightMap(); - lightWeightMap.set(1, "A"); - let res = lightWeightMap.hasValue("A"); - expect(res).assertEqual(true); - let res1 = lightWeightMap.hasKey(1); - expect(res1).assertEqual(true); - }); - - /** - * @tc.number: TEST_SET_002 - * @tc.name: testSet002 - * @tc.desc: Add a pair of key value pairs to the LightWeightMap. For example: lightWeightMap.set("a", "A"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testSet002", 0, function () { - let lightWeightMap = new LightWeightMap(); - lightWeightMap.set("a", "A"); - let res = lightWeightMap.hasValue("A"); - expect(res).assertEqual(true); - let res1 = lightWeightMap.hasKey("a"); - expect(res1).assertEqual(true); - }); - - /** - * @tc.number: TEST_SET_003 - * @tc.name: testSet003 - * @tc.desc: Add a pair of key value pairs to the LightWeightMap. For example: lightWeightMap.set("a", "A"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testSet003", 0, function () { - let lightWeightMap = new LightWeightMap(); - let a = [1, 2, 3, 4]; - lightWeightMap.set(1, a); - let res = lightWeightMap.hasValue(a); - expect(res).assertEqual(true); - let res1 = lightWeightMap.hasKey(1); - expect(res1).assertEqual(true); - }); - - /** - * @tc.number: TEST_SET_004 - * @tc.name: testSet004 - * @tc.desc: Add a pair of key value pairs to the LightWeightMap. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testSet004", 0, function () { - let lightWeightMap = new LightWeightMap(); - let c = {name: "lili", age: "13"}; - lightWeightMap.set(1, c); - let res = lightWeightMap.hasValue(c); - expect(res).assertEqual(true); - let res1 = lightWeightMap.hasKey(1); - expect(res1).assertEqual(true); - }); - - /** - * @tc.number: TEST_SET_005 - * @tc.name: testSet005 - * @tc.desc: Add a pair of key value pairs to the LightWeightMap. For example: lightWeightMap.set(1, null). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testSet005", 0, function () { - let lightWeightMap = new LightWeightMap(); - lightWeightMap.set(1, null); - let res = lightWeightMap.hasValue(null); - expect(res).assertEqual(true); - let res1 = lightWeightMap.hasKey(1); - expect(res1).assertEqual(true); - }); - - /** - * @tc.number: TEST_SET_006 - * @tc.name: testSet006 - * @tc.desc: Add a pair of key value pairs to the LightWeightMap. For example: lightWeightMap.set(null, null). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testSet006", 0, function () { - let lightWeightMap = new LightWeightMap(); - lightWeightMap.set(null, null); - let res = lightWeightMap.hasValue(null); - expect(res).assertEqual(true); - let res1 = lightWeightMap.hasKey(null); - expect(res1).assertEqual(true); - }); - - /** - * @tc.number: TEST_SET_007 - * @tc.name: testSet007 - * @tc.desc: Add a pair of key value pairs to the LightWeightMap. For example: lightWeightMap.set(true, false). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testSet007", 0, function () { - let lightWeightMap = new LightWeightMap(); - lightWeightMap.set(true, false); - let res = lightWeightMap.hasValue(false); - expect(res).assertEqual(true); - let res1 = lightWeightMap.hasKey(true); - expect(res1).assertEqual(true); - }); - - /** - * @tc.number: TEST_SET_008 - * @tc.name: testSet008 - * @tc.desc: Add a pair of key value pairs to the LightWeightMap. For example: lightWeightMap.set(1.23, 321). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testSet008", 0, function () { - let lightWeightMap = new LightWeightMap(); - lightWeightMap.set(1.23, 321); - let res = lightWeightMap.hasValue(321); - expect(res).assertEqual(true); - let res1 = lightWeightMap.hasKey(1.23); - expect(res1).assertEqual(true); - }); - - /** - * @tc.number: TEST_SET_009 - * @tc.name: testSet009 - * @tc.desc: Add a pair of key value pairs to the LightWeightMap. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testSet009", 0, function () { - let lightWeightMap = new LightWeightMap(); - for (let i = 0; i < 100; i++) { - lightWeightMap.set(i, "A"); - } - let res = lightWeightMap.get(99); - expect(res).assertEqual("A"); - let res1 = lightWeightMap.length; - expect(res1).assertEqual(100); - }); - - /** - * @tc.number: TEST_SET_010 - * @tc.name: testSet010 - * @tc.desc: Add a pair of key value pairs to the LightWeightMap. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testSet010", 0, function () { - let lightWeightMap = new LightWeightMap(); - for (let i = 0; i < 100; i++) { - lightWeightMap.set(1, i); - } - let res = lightWeightMap.get(1); - expect(res).assertEqual(99); - let res1 = lightWeightMap.length; - expect(res1).assertEqual(1); - }); - - /** - * @tc.number: TEST_SET_011 - * @tc.name: testSet011 - * @tc.desc: Add a pair of key value pairs to the LightWeightMap. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testSet011", 0, function () { - let lightWeightMap = new LightWeightMap(); - for (let i = 0; i < 10000; i++) { - lightWeightMap.set(i, i); - } - let res1 = lightWeightMap.length; - expect(res1).assertEqual(10000); - for (let index = 0; index < 10000; index++) { - let resKey = lightWeightMap.hasKey(index); - expect(resKey).assertEqual(true); - let resValue = lightWeightMap.hasValue(index); - expect(resValue).assertEqual(true); - } - }); - - /** - * @tc.number: TEST_SET_012 - * @tc.name: testSet012 - * @tc.desc: Add a pair of key value pairs to the LightWeightMap. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testSet012", 0, function () { - let lightWeightMap = new LightWeightMap(); - for (let i = 0; i < 5000; i++) { - lightWeightMap.set(i, i); - } - for (let i = -1; i > -5001; i--) { - lightWeightMap.set(i, i); - } - let res1 = lightWeightMap.length; - expect(res1).assertEqual(10000); - for (let index = 0; index < 5000; index++) { - let resKey = lightWeightMap.hasKey(index); - expect(resKey).assertEqual(true); - let resValue = lightWeightMap.hasValue(index); - expect(resValue).assertEqual(true); - } - for (let i = -1; i > -5001; i--) { - let resKey = lightWeightMap.hasKey(i); - expect(resKey).assertEqual(true); - let resValue = lightWeightMap.hasValue(i); - expect(resValue).assertEqual(true); - } - }); - - /** - * @tc.number: TEST_SET_013 - * @tc.name: testSet013 - * @tc.desc: Add a pair of key value pairs to the LightWeightMap. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testSet013", 0, function () { - let lightWeightMap = new LightWeightMap(); - lightWeightMap.set(true, 0.001); - let res = lightWeightMap.hasValue(0.001); - expect(res).assertEqual(true); - let res1 = lightWeightMap.hasKey(true); - expect(res1).assertEqual(true); - }); - - /** - * @tc.number: TEST_SET_014 - * @tc.name: testSet014 - * @tc.desc: Add a pair of key value pairs to the LightWeightMap. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testSet014", 0, function () { - let lightWeightMap = new LightWeightMap(); - let a = [1, 2, 3, 4]; - lightWeightMap.set(a, 1); - let res = lightWeightMap.hasValue(1); - expect(res).assertEqual(true); - let res1 = lightWeightMap.hasKey(a); - expect(res1).assertEqual(true); - }); - - /** - * @tc.number: TEST_SET_015 - * @tc.name: testSet015 - * @tc.desc: Add a pair of key value pairs to the LightWeightMap. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testSet015", 0, function () { - let lightWeightMap = new LightWeightMap(); - let a = {abc: 1}; - lightWeightMap.set(a, ""); - let res = lightWeightMap.hasValue(""); - expect(res).assertEqual(true); - let res1 = lightWeightMap.hasKey(a); - expect(res1).assertEqual(true); - }); - - /** - * @tc.number: TEST_REMOVE_001 - * @tc.name: testRemove001 - * @tc.desc: Delete key value pairs according to key. For example: lightWeightMap.remove(3). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testRemove001", 0, function () { - let lightWeightMap = new LightWeightMap(); - lightWeightMap.set(1, "A"); - lightWeightMap.set(2, "B"); - lightWeightMap.set(3, "C"); - lightWeightMap.set(4, "D"); - lightWeightMap.set(5, "E"); - let res = lightWeightMap.remove(3); - expect(res).assertEqual("C"); - let res1 = lightWeightMap.hasValue("C"); - expect(res1).assertEqual(false); - }); - - - /** - * @tc.number: TEST_REMOVE_002 - * @tc.name: testRemove002 - * @tc.desc: Delete key value pairs according to key. For example: lightWeightMap.remove(3). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testRemove002", 0, function () { - let lightWeightMap = new LightWeightMap(); - let res = lightWeightMap.remove(3); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_REMOVEAT_001 - * @tc.name: testRemoveAt001 - * @tc.desc: Delete key value pairs according to index. For example: lightWeightMap.removeAt(1). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testRemoveAt001", 0, function () { - let lightWeightMap = new LightWeightMap(); - lightWeightMap.set(1, "A"); - lightWeightMap.set(2, "B"); - lightWeightMap.set(3, "C"); - lightWeightMap.set(4, "D"); - lightWeightMap.set(5, "E"); - let res = lightWeightMap.removeAt(1); - expect(res).assertEqual(true); - let res1 = lightWeightMap.hasValue("A"); - expect(res1).assertEqual(true); - let res2 = lightWeightMap.hasValue("B"); - expect(res2).assertEqual(false); - let res3 = lightWeightMap.removeAt(10); - expect(res3).assertEqual(false); - }); - - /** - * @tc.number: TEST_REMOVEAT_002 - * @tc.name: testRemoveAt002 - * @tc.desc: Delete key value pairs according to index. For example: lightWeightMap.removeAt(1). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testRemoveAt002", 0, function () { - let lightWeightMap = new LightWeightMap(); - let res = lightWeightMap.removeAt(1); - expect(res).assertEqual(false); - }); - - /** - * @tc.number: TEST_REMOVEAT_003 - * @tc.name: testRemoveAt003 - * @tc.desc: Delete key value pairs according to index. For example: lightWeightMap.removeAt("a"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testRemoveAt003", 0, function () { - let lightWeightMap = new LightWeightMap(); - try { - //@ts-ignore - let res = lightWeightMap.removeAt("a"); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(401); - expect(err.message).assertEqual(`The type of "index" must be number. Received value is: a`); - } - }); - - /** - * @tc.number: TEST_CLEAR_001 - * @tc.name: testClear001 - * @tc.desc: Clear all key value pairs in LightWeightMap. For example: lightWeightMap.clear(). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testClear001", 0, function () { - let lightWeightMap = new LightWeightMap(); - lightWeightMap.set(1, "A"); - lightWeightMap.set(2, "B"); - lightWeightMap.set(3, "C"); - lightWeightMap.set(4, "D"); - lightWeightMap.set(5, "E"); - lightWeightMap.clear(); - let res = lightWeightMap.length; - expect(res).assertEqual(0); - let isEmpty = lightWeightMap.isEmpty(); - expect(isEmpty).assertEqual(true); - }); - - /** - * @tc.number: TEST_SETVALUEAT_001 - * @tc.name: testSetValueAt001 - * @tc.desc: Modify the value of the key value pair according to the corresponding index. - * For example: setValueAt(0, "a"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testSetValueAt001", 0, function () { - let lightWeightMap = new LightWeightMap(); - lightWeightMap.set(1, "A"); - lightWeightMap.set(2, "B"); - lightWeightMap.set(3, "C"); - lightWeightMap.set(4, "D"); - lightWeightMap.set(5, "E"); - lightWeightMap.setValueAt(0, "a"); - let res = lightWeightMap.get(1); - expect(res).assertEqual("a"); - }); - - /** - * @tc.number: TEST_FOREACH_001 - * @tc.name: testForEach001 - * @tc.desc: Traverse all key value pairs in the LightWeightMap instance. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testForEach001", 0, function () { - let lightWeightMap = new LightWeightMap(); - lightWeightMap.set(1, "A"); - lightWeightMap.set(2, "B"); - lightWeightMap.set(3, "C"); - lightWeightMap.set(4, "D"); - lightWeightMap.set(5, "E"); - let arr = []; - lightWeightMap.forEach((value, index) => { - arr.push(value); - }); - let arr1 = ["A", "B", "C", "D", "E"]; - for (let i = 0; i < arr1.length; i++) { - expect(arr[i]).assertEqual(arr1[i]); - } - }); - - /** - * @tc.number: TEST_ITERATOR_001 - * @tc.name: testIterator001 - * @tc.desc: Iterate over all key value pairs in the LightWeightMap. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testIterator001", 0, function () { - let lightWeightMap = new LightWeightMap(); - lightWeightMap.set(1, "A"); - lightWeightMap.set(2, "B"); - lightWeightMap.set(3, "C"); - lightWeightMap.set(4, "D"); - lightWeightMap.set(5, "E"); - let iters = lightWeightMap[Symbol.iterator](); - let flag = true; - for (let i = 0, len = lightWeightMap.length; i < len; i++) { - let entry = iters.next().value; - let res = lightWeightMap.get(entry[0]); - if (res != entry[1]) { - flag = false; - break; - } - } - expect(flag).assertEqual(true); - }); - - /** - * @tc.number: TEST_TOSTRING_001 - * @tc.name: testToString001 - * @tc.desc: Use "," to splice the elements in the LightWeightMap instance into a string. - * For example: lightWeightMap.toString(). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testToString001", 0, function () { - let lightWeightMap = new LightWeightMap(); - lightWeightMap.set(1, "A"); - lightWeightMap.set(2, "B"); - lightWeightMap.set(3, "C"); - let res = lightWeightMap.toString(); - expect(res).assertEqual("1:A,2:B,3:C"); - }); - - /** - * @tc.number: TEST_GETVALUEAT_001 - * @tc.name: testGetValueAt001 - * @tc.desc: Get the value of the key value pair according to the corresponding index. - * For example: lightWeightMap.getValueAt(1). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testGetValueAt001", 0, function () { - let lightWeightMap = new LightWeightMap(); - lightWeightMap.set(1, "A"); - lightWeightMap.set(2, "B"); - lightWeightMap.set(3, "C"); - lightWeightMap.set(4, "D"); - lightWeightMap.set(5, "E"); - let res = lightWeightMap.getValueAt(1); - expect(res).assertEqual("B"); - }); - - /** - * @tc.number: TEST_GETVALUEAT_002 - * @tc.name: testGetValueAt002 - * @tc.desc: Get the value of the key value pair according to the corresponding index. - * For example: lightWeightMap.getValueAt("a"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testGetValueAt002", 0, function () { - let lightWeightMap = new LightWeightMap(); - lightWeightMap.set(1, "A"); - lightWeightMap.set(2, "B"); - lightWeightMap.set(3, "C"); - lightWeightMap.set(4, "D"); - lightWeightMap.set(5, "E"); - try { - //@ts-ignore - let res = lightWeightMap.getValueAt("a"); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(401); - expect(err.message).assertEqual(`The type of "index" must be number. Received value is: a`); - } - }); - - /** - * @tc.number: TEST_GETVALUEAT_003 - * @tc.name: testGetValueAt003 - * @tc.desc: Get the value of the key value pair according to the corresponding index. - * For example: lightWeightMap.getValueAt(6). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testGetValueAt003", 0, function () { - let lightWeightMap = new LightWeightMap(); - lightWeightMap.set(1, "A"); - lightWeightMap.set(2, "B"); - lightWeightMap.set(3, "C"); - lightWeightMap.set(4, "D"); - lightWeightMap.set(5, "E"); - try { - lightWeightMap.getValueAt(6); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200001); - expect(err.message).assertEqual(`The value of "index" is out of range. It must be >= 0 && <= 4. Received value is: 6`); - } - }); - - /** - * @tc.number: TEST_VALUES_001 - * @tc.name: testValues001 - * @tc.desc: Get a collection of all the values in the LightWeightMap. For example: lightWeightMap.values(). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testValues001", 0, function () { - let lightWeightMap = new LightWeightMap(); - lightWeightMap.set(1, "A"); - lightWeightMap.set(2, "B"); - lightWeightMap.set(3, "C"); - lightWeightMap.set(4, "D"); - lightWeightMap.set(5, "E"); - let res = lightWeightMap.values(); - expect(res.next().value).assertEqual("A"); - expect(res.next().value).assertEqual("B"); - expect(res.next().value).assertEqual("C"); - expect(res.next().value).assertEqual("D"); - expect(res.next().value).assertEqual("E"); - }); - }); -} - diff --git a/commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/src/main/ets/test/List.test.ets b/commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/src/main/ets/test/List.test.ets deleted file mode 100755 index 6c2304d16..000000000 --- a/commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/src/main/ets/test/List.test.ets +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import LightWeightMap from './LightWeightMap.test' - -export default function testsuite() { - LightWeightMap() -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/src/main/module.json b/commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/src/main/module.json deleted file mode 100755 index a4443e713..000000000 --- a/commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/src/main/module.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "module": { - "name": "entry_test", - "type": "feature", - "description": "$string:module_test_desc", - "mainElement": "TestAbility", - "deviceTypes": [ - "phone" - ], - "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", - "skills": [ - { - "actions": [ - "action.system.home" - ], - "entities": [ - "entity.system.home" - ] - } - ] - } - ] - } -} diff --git a/commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/src/main/resources/base/element/color.json b/commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/src/main/resources/base/element/color.json deleted file mode 100755 index 3c712962d..000000000 --- a/commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/src/main/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/commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/src/main/resources/base/element/string.json b/commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/src/main/resources/base/element/string.json deleted file mode 100755 index 65d8fa5a7..000000000 --- a/commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/src/main/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/commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/src/main/resources/base/media/icon.png b/commonlibrary/crossplatform/commonlibraryLightWeightMapetstest/src/main/resources/base/media/icon.png deleted file mode 100755 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6790 zcmX|G1ymHk)?T_}Vd;>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yJ+1uW7ud}w-+BR}jmuuC=ziY>|t`Kz} z-@CiFc6{%Q?6u*poF7jyN9_8=CBwA;ZbiUrU^GXR430R-K)`;6GKrTmh)J2H>AMb2 z`e{#+sr^E8-jU`SX4FSRt0(X#0XH8oHB27#(YMV0SGMf9Tzzcg;k>pH>(7roUfMZz z#nM^wxMT0G$&#IyKA?ot{PsM08y`$RIQ{3;{PtQl9X7)|+=frkAM>?@#&W(4D-jvzOlx{r-5#p2eZ+ z)u$K#D0HN;?VZ0^K-IA;TV@uQzuocH$!%HN_ugH-I{og2=G@iymn=AzpMC%4nQI#! zNNlYxfDaL;XL98K;Mg<8ZO92D@Ff9)4}w=;S1kJteP_wB||{ z7kSc6Jv!SbtCvplb?E1N0Hi#IQiVa4jyaEdul8s25;m?7zXySn{@&70Ft243!( zkeK{%Rkv|{xMu@?J!GfXdq0%D`SO(lD8YkSlFec74xs*plyTrh9ehn`@q>wvuPLbl zh#mX>a>E0Y9~-I3&}jBhECMA^5hRsKWr`Y5_+(TFiG?}NFBY9W*}UswdTMhn1ogHp z|69+wW3NkY-JY~$)Yy~D#)1)#PjbFc3s8Pe^jGtGmv6h--JH|_op0|Jtv-=|a&B)O yw)68V`_gVZ6#U$z2i>__(^ll4pV{16pSlV=dhojk*7c`NWe+OV6F)5&UiLqjS!BEb diff --git a/commonlibrary/crossplatform/commonlibraryLightWeightSetetstest/src/main/ets/TestAbility/TestAbility.ets b/commonlibrary/crossplatform/commonlibraryLightWeightSetetstest/src/main/ets/TestAbility/TestAbility.ets deleted file mode 100755 index cb027d692..000000000 --- a/commonlibrary/crossplatform/commonlibraryLightWeightSetetstest/src/main/ets/TestAbility/TestAbility.ets +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright (c) 2023 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. - */ -import UIAbility from '@ohos.app.ability.UIAbility'; -import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; -import hilog from '@ohos.hilog'; -import { Hypium } from '@ohos/hypium'; -import testsuite from '../test/List.test'; -import window from '@ohos.window'; - -export default class TestAbility extends UIAbility { - onCreate(want, 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) ?? ''); - var abilityDelegator: any - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var abilityDelegatorArguments: any - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - hilog.info(0x0000, 'testTag', '%{public}s', 'start run testcase!!!'); - Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) - } - - onDestroy() { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onDestroy'); - } - - onWindowStageCreate(windowStage: window.WindowStage) { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageCreate'); - windowStage.loadContent('TestAbility/pages/Index', (err, data) => { - 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. Data: %{public}s', - JSON.stringify(data) ?? ''); - }); - } - - 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/commonlibrary/crossplatform/commonlibraryLightWeightSetetstest/src/main/ets/TestAbility/pages/Index.ets b/commonlibrary/crossplatform/commonlibraryLightWeightSetetstest/src/main/ets/TestAbility/pages/Index.ets deleted file mode 100755 index 8cbc4b3b9..000000000 --- a/commonlibrary/crossplatform/commonlibraryLightWeightSetetstest/src/main/ets/TestAbility/pages/Index.ets +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (c) 2023 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. - */ -import hilog from '@ohos.hilog'; - -@Entry -@Component -struct Index { - aboutToAppear() { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility index aboutToAppear'); - } - @State message: string = 'Hello World' - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Button() { - Text('next page') - .fontSize(20) - .fontWeight(FontWeight.Bold) - }.type(ButtonType.Capsule) - .margin({ - top: 20 - }) - .backgroundColor('#0D9FFB') - .width('35%') - .height('5%') - .onClick(()=>{ - }) - } - .width('100%') - } - .height('100%') - } - } \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryLightWeightSetetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/commonlibrary/crossplatform/commonlibraryLightWeightSetetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts deleted file mode 100755 index 92a16d84e..000000000 --- a/commonlibrary/crossplatform/commonlibraryLightWeightSetetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts +++ /dev/null @@ -1,49 +0,0 @@ -import hilog from '@ohos.hilog'; -import TestRunner from '@ohos.application.testRunner'; -import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; - -var abilityDelegator = undefined -var abilityDelegatorArguments = undefined - -async function onAbilityCreateCallback() { - hilog.info(0x0000, 'testTag', '%{public}s', 'onAbilityCreateCallback'); -} - -async function addAbilityMonitorCallback(err: any) { - 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() { - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun run'); - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var testAbilityName = abilityDelegatorArguments.bundleName + '.TestAbility' - let lMonitor = { - abilityName: testAbilityName, - onAbilityCreate: onAbilityCreateCallback, - }; - abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) - var cmd = 'aa start -d 0 -a TestAbility' + ' -b ' + abilityDelegatorArguments.bundleName - var debug = abilityDelegatorArguments.parameters['-D'] - if (debug == 'true') - { - cmd += ' -D' - } - hilog.info(0x0000, 'testTag', 'cmd : %{public}s', cmd); - abilityDelegator.executeShellCommand(cmd, - (err: any, d: any) => { - hilog.info(0x0000, 'testTag', 'executeShellCommand : err : %{public}s', JSON.stringify(err) ?? ''); - hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.stdResult ?? ''); - hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.exitCode ?? ''); - }) - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun end'); - } -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryLightWeightSetetstest/src/main/ets/test/LightWeightSet.test.ets b/commonlibrary/crossplatform/commonlibraryLightWeightSetetstest/src/main/ets/test/LightWeightSet.test.ets deleted file mode 100755 index 89bbcbe41..000000000 --- a/commonlibrary/crossplatform/commonlibraryLightWeightSetetstest/src/main/ets/test/LightWeightSet.test.ets +++ /dev/null @@ -1,799 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import LightWeightSet from "@ohos.util.LightWeightSet"; -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' -export default function LightWeightSetTest() { - describe("LightWeightSetTest", function () { - - /** - * @tc.number: TEST_CONSTRUCTOR_001 - * @tc.name : testConstructor001 - * @tc.desc : Create an LightWeightSet instance. For example: let lightWeightSet = new LightWeightSet(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testConstructor001", 0, function () { - try { - let lightWeightSet = new LightWeightSet(); - expect(lightWeightSet != undefined).assertEqual(true); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200012); - expect(err.message).assertEqual("The LightWeightSet's constructor cannot be directly invoked"); - } - }); - - /** - * @tc.number: TEST_LENGTH_001 - * @tc.name : testLength001 - * @tc.desc : Get the number of element in the LightWeightSet instance. For example: lightWeightSet.length. - * @tc.size : MediumTest - * @tc.type : Field - * @tc.level : Level 1 - */ - it("testLength001", 0, function () { - let lightWeightSet = new LightWeightSet(); - lightWeightSet.add(1); - lightWeightSet.add(2); - lightWeightSet.add(3); - lightWeightSet.add(4); - lightWeightSet.add(5); - let res = lightWeightSet.length; - expect(res).assertEqual(5); - }); - - /** - * @tc.number: TEST_ADD_001 - * @tc.name : testAdd001 - * @tc.desc : Add element to LightWeightSet instance. For example: lightWeightSet.add(1). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd001", 0, function () { - let lightWeightSet = new LightWeightSet(); - lightWeightSet.add(1); - let res = lightWeightSet.has(1); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_ADD_002 - * @tc.name : testAdd002 - * @tc.desc : Add element to LightWeightSet instance. For example: lightWeightSet.add("a"). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd002", 0, function () { - let lightWeightSet = new LightWeightSet(); - lightWeightSet.add("a"); - let res = lightWeightSet.has("a"); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_ADD_003 - * @tc.name : testAdd003 - * @tc.desc : Add element to LightWeightSet instance. - * For example: let a = [1, 2, 3, 4]; lightWeightSet.add(a). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd003", 0, function () { - let lightWeightSet = new LightWeightSet(); - let a = [1, 2, 3, 4]; - lightWeightSet.add(a); - let res = lightWeightSet.has(a); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_ADD_004 - * @tc.name : testAdd004 - * @tc.desc : Add element to LightWeightSet instance. - * For example: let a = {name: "lili", age: "13"}; lightWeightSet.add(a). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd004", 0, function () { - let lightWeightSet = new LightWeightSet(); - let c = {name: "lili", age: "13"}; - lightWeightSet.add(c); - let res = lightWeightSet.has(c); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_ADD_005 - * @tc.name : testAdd005 - * @tc.desc : Add element to LightWeightSet instance. For example: let c = false; lightWeightSet.add(c). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd005", 0, function () { - let lightWeightSet = new LightWeightSet(); - let c = false; - lightWeightSet.add(c); - let res = lightWeightSet.has(c); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_ADD_006 - * @tc.name : testAdd006 - * @tc.desc : Add element to LightWeightSet instance. For example: lightWeightSet.add(null). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd006", 0, function () { - let lightWeightSet = new LightWeightSet(); - lightWeightSet.add(null); - let res = lightWeightSet.has(null); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_ADD_007 - * @tc.name : testAdd007 - * @tc.desc : Add element to LightWeightSet instance. For example: lightWeightSet.add(1.23). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd007", 0, function () { - let lightWeightSet = new LightWeightSet(); - lightWeightSet.add(1.23); - let res1 = lightWeightSet.has(1.23); - expect(res1).assertEqual(true); - }); - - /** - * @tc.number: TEST_ADD_008 - * @tc.name : testAdd008 - * @tc.desc : Add element to LightWeightSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd008", 0, function () { - let lightWeightSet = new LightWeightSet(); - for (let i = 0; i < 10000; i++) { - lightWeightSet.add(i); - } - let res = lightWeightSet.getValueAt(9999); - let res1 = lightWeightSet.length; - expect(res).assertEqual(9999); - expect(res1).assertEqual(10000); - }); - - /** - * @tc.number: TEST_ADD_009 - * @tc.name : testAdd009 - * @tc.desc : Add element to LightWeightSet instance. For example: lightWeightSet.add(""). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd009", 0, function () { - let lightWeightSet = new LightWeightSet(); - lightWeightSet.add(""); - let res = lightWeightSet.has(""); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_ADD_010 - * @tc.name : testAdd010 - * @tc.desc : Add element to LightWeightSet instance. For example: lightWeightSet.add("$"). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd010", 0, function () { - let lightWeightSet = new LightWeightSet(); - lightWeightSet.add("$"); - let res = lightWeightSet.has("$"); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_ADD_ALL_001 - * @tc.name : testAddAll001 - * @tc.desc : Copy all element from one LightWeightSet to another. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAddAll001", 0, function () { - let lightWeightSet = new LightWeightSet(); - lightWeightSet.add(1); - lightWeightSet.add(2); - lightWeightSet.add(3); - lightWeightSet.add(4); - lightWeightSet.add(5); - let lightWeightSet1 = new LightWeightSet(); - lightWeightSet1.add(6); - lightWeightSet1.add(7); - let res1 = lightWeightSet.addAll(lightWeightSet1); - for (let item of lightWeightSet) { - console.log("lightWeightSet-----" + item); - } - for (let item of lightWeightSet1) { - console.log("lightWeightSet1-----" + item); - } - for (let i = 1; i < 8; i++) { - expect(lightWeightSet.has(i)).assertEqual(true); - } - expect(res1).assertEqual(true); - }); - - /** - * @tc.number: TEST_HAS_ALL_001 - * @tc.name : testHasAll001 - * @tc.desc : Judge whether a lightWeightSet contains all elements in another lightWeightSet. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testHasAll001", 0, function () { - let lightWeightSet = new LightWeightSet(); - lightWeightSet.add("a"); - lightWeightSet.add("b"); - lightWeightSet.add("c"); - lightWeightSet.add("d"); - lightWeightSet.add("e"); - let lightWeightSet1 = new LightWeightSet(); - lightWeightSet1.add("a"); - lightWeightSet1.add("d"); - let res = lightWeightSet.hasAll(lightWeightSet1); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_HAS_ALL_002 - * @tc.name : testHasAll002 - * @tc.desc : Judge whether a lightWeightSet contains all elements in another lightWeightSet. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testHasAll002", 0, function () { - let lightWeightSet = new LightWeightSet(); - lightWeightSet.add("a"); - lightWeightSet.add("b"); - lightWeightSet.add("c"); - lightWeightSet.add("e"); - let lightWeightSet1 = new LightWeightSet(); - lightWeightSet1.add("a"); - lightWeightSet1.add("d"); - let res = lightWeightSet.hasAll(lightWeightSet1); - expect(res).assertEqual(false); - }); - - /** - * @tc.number: TEST_HAS_ALL_003 - * @tc.name : testHasAll003 - * @tc.desc : Judge whether a lightWeightSet contains all elements in another lightWeightSet. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testHasAll003", 0, function () { - let lightWeightSet = new LightWeightSet(); - lightWeightSet.add(1); - lightWeightSet.add(2); - lightWeightSet.add(3); - lightWeightSet.add(4); - lightWeightSet.add(5); - let lightWeightSet1 = new LightWeightSet(); - lightWeightSet1.add("a1"); - lightWeightSet1.add("d1"); - let res = lightWeightSet.hasAll(lightWeightSet1); - expect(res).assertEqual(false); - }); - - /** - * @tc.number: TEST_HAS_ALL_004 - * @tc.name : testHasAll004 - * @tc.desc : Judge whether a lightWeightSet contains all elements in another lightWeightSet. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testHasAll004", 0, function () { - let lightWeightSet = new LightWeightSet(); - lightWeightSet.add(1); - lightWeightSet.add(2); - lightWeightSet.add(3); - lightWeightSet.add(4); - lightWeightSet.add(5); - let lightWeightSet1 = new LightWeightSet(); - lightWeightSet1.add(1); - lightWeightSet1.add("d"); - let res = lightWeightSet.hasAll(lightWeightSet1); - expect(res).assertEqual(false); - }); - - /** - * @tc.number: TEST_HAS_001 - * @tc.name : testHas001 - * @tc.desc : Judge whether a lightWeightSet contains all elements in another lightWeightSet. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testHas001", 0, function () { - let lightWeightSet = new LightWeightSet(); - lightWeightSet.add("a"); - lightWeightSet.add("b"); - lightWeightSet.add("c"); - lightWeightSet.add("d"); - lightWeightSet.add("e"); - let res = lightWeightSet.has("a"); - expect(res).assertEqual(true); - let res1 = lightWeightSet.has(1); - expect(res1).assertEqual(false); - }); - - /** - * @tc.number: TEST_EQUAL_001 - * @tc.name : testEqual001 - * @tc.desc : Compare lightWeightMap and specified object for equality. For example: lightWeightSet.equal(obj). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEqual001", 0, function () { - let lightWeightSet = new LightWeightSet(); - lightWeightSet.add(1); - lightWeightSet.add(2); - lightWeightSet.add(3); - let obj = [1,2,3]; - let res = lightWeightSet.equal(obj); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_EQUAL_002 - * @tc.name : testEqual002 - * @tc.desc : Compare lightWeightMap and specified object for equality. For example: lightWeightSet.equal(obj). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEqual002", 0, function () { - let lightWeightSet = new LightWeightSet(); - lightWeightSet.add(1); - lightWeightSet.add(2); - lightWeightSet.add(3); - let obj = [1,2]; - let res = lightWeightSet.equal(obj); - expect(res).assertEqual(false); - }); - - /** - * @tc.number: TEST_INCREASE_CAPACITY_TO_001 - * @tc.name : testIncreaseCapacityTo001 - * @tc.desc : Expand the LightWeightSet capacity to the specified value. - * For example: lightWeightSet.increaseCapacityTo(3). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIncreaseCapacityTo001", 0, function () { - let lightWeightSet = new LightWeightSet(); - lightWeightSet.add(1); - lightWeightSet.add(2); - lightWeightSet.add(3); - lightWeightSet.add(4); - lightWeightSet.add(5); - try { - lightWeightSet.increaseCapacityTo(3); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200001); - expect(err.message).assertEqual(`The value of "minimumCapacity" is out of range. It must be > 8. Received value is: 3`); - } - }); - - /** - * @tc.number: TEST_INCREASE_CAPACITY_TO_002 - * @tc.name : testIncreaseCapacityTo002 - * @tc.desc : Expand the LightWeightSet capacity to the specified value. - * For example: lightWeightSet.increaseCapacityTo(20). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIncreaseCapacityTo002", 0, function () { - let lightWeightSet = new LightWeightSet(); - lightWeightSet.add(1); - lightWeightSet.add(2); - lightWeightSet.add(3); - lightWeightSet.add(4); - lightWeightSet.add(5); - let res = lightWeightSet.increaseCapacityTo(20); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_GET_INDEX_OF_001 - * @tc.name : testGetIndexOf001 - * @tc.desc : Get the index according to the specified element. For example: lightWeightSet.getIndexOf(2). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetIndexOf001", 0, function () { - let lightWeightSet = new LightWeightSet(); - lightWeightSet.add(1); - lightWeightSet.add(2); - lightWeightSet.add(3); - lightWeightSet.add(4); - lightWeightSet.add(5); - let res = lightWeightSet.getIndexOf(2); - expect(res).assertEqual(1); - }); - - /** - * @tc.number: TEST_REMOVE_001 - * @tc.name : testRemove001 - * @tc.desc : Delete elements according to key. For example: lightWeightMap.remove(1). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testRemove001", 0, function () { - let lightWeightSet = new LightWeightSet(); - lightWeightSet.add(1); - lightWeightSet.add(2); - lightWeightSet.add(3); - lightWeightSet.add(4); - lightWeightSet.add(5); - let res = lightWeightSet.remove(1); - expect(res).assertEqual(1); - let arr = []; - lightWeightSet.forEach((value, index) => { - arr.push(value); - }); - let arr1 = [2, 3, 4, 5]; - for (let i = 0; i < arr.length; i++) { - expect(arr1[i]).assertEqual(arr[i]); - } - }); - - /** - * @tc.number: TEST_REMOVE_002 - * @tc.name : testRemove002 - * @tc.desc : Delete elements according to key. For example: lightWeightMap.remove(3). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testRemove002", 0, function () { - let lightWeightSet = new LightWeightSet(); - let res = lightWeightSet.remove(3); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_REMOVE_003 - * @tc.name : testRemove003 - * @tc.desc : Delete elements according to key. For example: lightWeightMap.remove("A"). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testRemove003", 0, function () { - let lightWeightSet = new LightWeightSet(); - lightWeightSet.add(1); - lightWeightSet.add(2); - lightWeightSet.add(3); - lightWeightSet.add(4); - lightWeightSet.add(5); - let res = lightWeightSet.remove("A"); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_REMOVE_AT_001 - * @tc.name : testRemoveAt001 - * @tc.desc : Delete elements according to index. For example: lightWeightSet.removeAt(1). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testRemoveAt001", 0, function () { - let lightWeightSet = new LightWeightSet(); - lightWeightSet.add(1); - lightWeightSet.add(2); - lightWeightSet.add(3); - lightWeightSet.add(4); - lightWeightSet.add(5); - let res = lightWeightSet.removeAt(1); - expect(res).assertEqual(true); - let arr = []; - lightWeightSet.forEach((value, index) => { - arr.push(value); - }); - let arr1 = [1, 3, 4, 5]; - for (let i = 0; i < arr.length; i++) { - expect(arr1[i]).assertEqual(arr[i]); - } - }); - - /** - * @tc.number: TEST_REMOVE_AT_002 - * @tc.name : testRemoveAt002 - * @tc.desc : Delete elements according to index. For example: lightWeightSet.removeAt(1). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testRemoveAt002", 0, function () { - let lightWeightSet = new LightWeightSet(); - let res = lightWeightSet.removeAt(1); - expect(res).assertEqual(false); - }); - - /** - * @tc.number: TEST_CLEAR_001 - * @tc.name : testClear001 - * @tc.desc : Clear all elements in LightWeightSet. For example: lightWeightSet.clear(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testClear001", 0, function () { - let lightWeightSet = new LightWeightSet(); - lightWeightSet.add(1); - lightWeightSet.add(2); - lightWeightSet.add(3); - lightWeightSet.add(4); - lightWeightSet.add(5); - lightWeightSet.clear(); - let res = lightWeightSet.length; - expect(res).assertEqual(0); - }); - - /** - * @tc.number: TEST_CLEAR_002 - * @tc.name : testClear002 - * @tc.desc : Clear all elements in LightWeightSet. For example: lightWeightSet.clear(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testClear002", 0, function () { - let lightWeightSet = new LightWeightSet(); - lightWeightSet.add(1); - lightWeightSet.add(2); - lightWeightSet.add(3); - lightWeightSet.add(4); - lightWeightSet.add(5); - let res = lightWeightSet.length; - lightWeightSet.clear(); - let res1 = lightWeightSet.length; - expect(res).assertEqual(5); - expect(res1).assertEqual(0); - }); - - /** - * @tc.number: TEST_FOR_EACH_001 - * @tc.name : testForEach001 - * @tc.desc : Traverse all elements in the LightWeightSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testForEach001", 0, function () { - let lightWeightSet = new LightWeightSet(); - lightWeightSet.add(1); - lightWeightSet.add(2); - lightWeightSet.add(3); - lightWeightSet.add(4); - lightWeightSet.add(5); - let arr = []; - lightWeightSet.forEach((value, index) => { - arr.push(value); - }); - let arr1 = [1, 2, 3, 4, 5]; - for (let i = 0; i < arr1.length; i++) { - expect(arr[i]).assertEqual(arr1[i]); - } - }); - - /** - * @tc.number: TEST_ITERATOR_001 - * @tc.name : testIterator001 - * @tc.desc : Iterate over all elements in the LightWeightSet. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIterator001", 0, function () { - let lightWeightSet = new LightWeightSet(); - lightWeightSet.add(1); - lightWeightSet.add(2); - lightWeightSet.add(3); - lightWeightSet.add(4); - lightWeightSet.add(5); - let arr = []; - let res = lightWeightSet[Symbol.iterator](); - let temp = undefined; - do { - temp = res.next().value; - arr.push(temp); - } while (temp != undefined); - let arr1 = [1, 2, 3, 4, 5]; - for (let i = 0; i < arr1.length; i++) { - expect(arr[i]).assertEqual(arr1[i]); - } - }); - - /** - * @tc.number: TEST_TO_STRING_001 - * @tc.name : testToString001 - * @tc.desc : Use "," to splice the elements in the LightWeightSet instance into a string. - * For example: lightWeightSet.toString(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testToString001", 0, function () { - let lightWeightSet = new LightWeightSet(); - lightWeightSet.add(1); - lightWeightSet.add(2); - lightWeightSet.add(3); - let res = lightWeightSet.toString(); - expect(res).assertEqual("1,2,3"); - }); - - /** - * @tc.number: TEST_TO_ARRAY_001 - * @tc.name : testToArray001 - * @tc.desc : Convert an lightWeightSet instance to an array. For example: lightWeightSet.toArray(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testToArray001", 0, function () { - let lightWeightSet = new LightWeightSet(); - lightWeightSet.add(1); - lightWeightSet.add(2); - lightWeightSet.add(3); - lightWeightSet.add(4); - lightWeightSet.add(5); - let res = lightWeightSet.toArray(); - let arr1 = [1, 2, 3, 4, 5]; - for (let i = 0; i < arr1.length; i++) { - expect(res[i]).assertEqual(arr1[i]); - } - }); - - /** - * @tc.number: TEST_GET_VALUE_AT_001 - * @tc.name : testGetValueAt001 - * @tc.desc : Get the element according to the corresponding index. For example: lightWeightSet.getValueAt(1). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetValueAt001", 0, function () { - let lightWeightSet = new LightWeightSet(); - lightWeightSet.add(1); - lightWeightSet.add(2); - lightWeightSet.add(3); - lightWeightSet.add(4); - lightWeightSet.add(5); - let res = lightWeightSet.getValueAt(1); - expect(res).assertEqual(2); - }); - - /** - * @tc.number: TEST_VALUES_001 - * @tc.name : testValues001 - * @tc.desc : Get a collection of all the values in the LightWeightSet. For example: lightWeightSet.values(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testValues001", 0, function () { - let lightWeightSet = new LightWeightSet(); - lightWeightSet.add(1); - lightWeightSet.add(2); - lightWeightSet.add(3); - lightWeightSet.add(4); - lightWeightSet.add(5); - let res = lightWeightSet.values(); - expect(res.next().value).assertEqual(1); - expect(res.next().value).assertEqual(2); - expect(res.next().value).assertEqual(3); - expect(res.next().value).assertEqual(4); - expect(res.next().value).assertEqual(5); - }); - - /** - * @tc.number: TEST_ENTRIES_001 - * @tc.name : testEntries001 - * @tc.desc : Get all key value pairs collection in lightWeightSet. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEntries001", 0, function () { - let lightWeightSet = new LightWeightSet(); - lightWeightSet.add(1); - lightWeightSet.add(2); - lightWeightSet.add(3); - lightWeightSet.add(4); - lightWeightSet.add(5); - let res = lightWeightSet.entries(); - expect(JSON.stringify(res.next().value)).assertEqual("[1,1]"); - expect(JSON.stringify(res.next().value)).assertEqual("[2,2]"); - expect(JSON.stringify(res.next().value)).assertEqual("[3,3]"); - expect(JSON.stringify(res.next().value)).assertEqual("[4,4]"); - expect(JSON.stringify(res.next().value)).assertEqual("[5,5]"); - }); - - /** - * @tc.number: TEST_IS_EMPTY_001 - * @tc.name : testIsEmpty001 - * @tc.desc : Determine whether the lightWeightSet instance is empty. For example: lightWeightSet.isEmpty(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsEmpty001", 0, function () { - let lightWeightSet = new LightWeightSet(); - lightWeightSet.add(1); - lightWeightSet.add(2); - lightWeightSet.add(3); - lightWeightSet.add(4); - lightWeightSet.add(5); - let res = lightWeightSet.isEmpty(); - expect(res).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_EMPTY_002 - * @tc.name : testIsEmpty002 - * @tc.desc : Determine whether the lightWeightSet instance is empty. For example: lightWeightSet.isEmpty(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsEmpty002", 0, function () { - let lightWeightSet = new LightWeightSet(); - lightWeightSet.add(1); - lightWeightSet.add(2); - lightWeightSet.add(3); - lightWeightSet.add(4); - lightWeightSet.add(5); - lightWeightSet.clear(); - let res = lightWeightSet.isEmpty(); - expect(res).assertEqual(true); - }); - - - }) -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryLightWeightSetetstest/src/main/ets/test/List.test.ets b/commonlibrary/crossplatform/commonlibraryLightWeightSetetstest/src/main/ets/test/List.test.ets deleted file mode 100755 index 273d304c7..000000000 --- a/commonlibrary/crossplatform/commonlibraryLightWeightSetetstest/src/main/ets/test/List.test.ets +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Copyright (c) 2023 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. - */ -import LightWeightSetTest from './LightWeightSet.test' - -export default function testsuite() { - LightWeightSetTest() -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryLightWeightSetetstest/src/main/module.json b/commonlibrary/crossplatform/commonlibraryLightWeightSetetstest/src/main/module.json deleted file mode 100755 index a4443e713..000000000 --- a/commonlibrary/crossplatform/commonlibraryLightWeightSetetstest/src/main/module.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "module": { - "name": "entry_test", - "type": "feature", - "description": "$string:module_test_desc", - "mainElement": "TestAbility", - "deviceTypes": [ - "phone" - ], - "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", - "skills": [ - { - "actions": [ - "action.system.home" - ], - "entities": [ - "entity.system.home" - ] - } - ] - } - ] - } -} diff --git a/commonlibrary/crossplatform/commonlibraryLightWeightSetetstest/src/main/resources/base/element/color.json b/commonlibrary/crossplatform/commonlibraryLightWeightSetetstest/src/main/resources/base/element/color.json deleted file mode 100755 index 3c712962d..000000000 --- a/commonlibrary/crossplatform/commonlibraryLightWeightSetetstest/src/main/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/commonlibrary/crossplatform/commonlibraryLightWeightSetetstest/src/main/resources/base/element/string.json b/commonlibrary/crossplatform/commonlibraryLightWeightSetetstest/src/main/resources/base/element/string.json deleted file mode 100755 index 65d8fa5a7..000000000 --- a/commonlibrary/crossplatform/commonlibraryLightWeightSetetstest/src/main/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/commonlibrary/crossplatform/commonlibraryLightWeightSetetstest/src/main/resources/base/media/icon.png b/commonlibrary/crossplatform/commonlibraryLightWeightSetetstest/src/main/resources/base/media/icon.png deleted file mode 100755 index e69de29bb..000000000 diff --git a/commonlibrary/crossplatform/commonlibraryLightWeightSetetstest/src/main/resources/base/profile/test_pages.json b/commonlibrary/crossplatform/commonlibraryLightWeightSetetstest/src/main/resources/base/profile/test_pages.json deleted file mode 100755 index 77e90731b..000000000 --- a/commonlibrary/crossplatform/commonlibraryLightWeightSetetstest/src/main/resources/base/profile/test_pages.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "src": [ - "TestAbility/pages/Index" - ] -} diff --git a/commonlibrary/crossplatform/commonlibraryLinkedListetstest/AppScope/app.json b/commonlibrary/crossplatform/commonlibraryLinkedListetstest/AppScope/app.json deleted file mode 100755 index 6a78e9664..000000000 --- a/commonlibrary/crossplatform/commonlibraryLinkedListetstest/AppScope/app.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "app": { - "bundleName": "ohos.acts.commonlibrary.crossplatform.LinkedList.normal", - "vendor": "example", - "versionCode": 1000000, - "versionName": "1.0.0", - "icon": "$media:app_icon", - "label": "$string:app_name", - "minAPIVersion": 10, - "targetAPIVersion": 10, - "car": { - "apiCompatibleVersion": 10, - "singleUser": false - } - } -} diff --git a/commonlibrary/crossplatform/commonlibraryLinkedListetstest/AppScope/resources/base/element/string.json b/commonlibrary/crossplatform/commonlibraryLinkedListetstest/AppScope/resources/base/element/string.json deleted file mode 100755 index 3811bc441..000000000 --- a/commonlibrary/crossplatform/commonlibraryLinkedListetstest/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "xtsDemo1" - } - ] -} diff --git a/commonlibrary/crossplatform/commonlibraryLinkedListetstest/AppScope/resources/base/media/app_icon.png b/commonlibrary/crossplatform/commonlibraryLinkedListetstest/AppScope/resources/base/media/app_icon.png deleted file mode 100755 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6BLrPFWk?s;$LOP{GmJpBl$qoSA!PUg~PA65-S00{{S`XKG6NkG0RgjEntPrmV+?0|00mu7;+5 zrdpa{2QLqPJ4Y{j7=Mrl{BaxrkdY69+c~(w{Fv-v&aR%aEI&JYSeRTLWm!zbv;?)_ ziZB;fwGbbeL5Q}YLx`J$lp~A09KK8t_z}PZ=4ZzgdeKtgoc+o5EvN9A1K1_<>M?MBqb#!ASf&# zEX?<)!RH(7>1P+j=jqG(58}TVN-$psA6K}atCuI!KTJD&FMmH-78ZejBm)0qc{ESp z|LuG1{QnBUJRg_E=h1#XMWt2%fcoN@l7eAS!Es?Q+;XsRNPhiiE=@AqlLkJzF`O18 zbsbSmKN=aaq8k3NFYZfDWpKmM!coBU0(XnL8R{4=i|wi{!uWYM2je{U{B*K2PVdu&=E zTq*-XsEsJ$u5H4g6DIm2Y!DN`>^v|AqlwuCD;w45K0@eqauiqWf7l&o)+YLHm~|L~ z7$0v5mkobriU!H<@mVJHLlmQqzQ3d6Rh_-|%Yy2li*tHO>_vcnuZ7OR_xkAIuIU&x z-|8Y0wj|6|a6_I(v91y%k_kNw6pnkNdxjqG8!%Vz_d%c_!X+6-;1`GC9_FpjoHev5fEV7RhJ>r=mh-jp$fqbqRJ=obwdgLDVP5+s zy1=_DWG0Y-Jb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: %{public}s', JSON.stringify(err) ?? ''); - return; - } - hilog.info(0x0000, 'testTag', 'Succeeded in loading the content. Data: %{public}s', - JSON.stringify(data) ?? ''); - }); - } - - 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/commonlibrary/crossplatform/commonlibraryLinkedListetstest/src/main/ets/TestAbility/pages/Index.ets b/commonlibrary/crossplatform/commonlibraryLinkedListetstest/src/main/ets/TestAbility/pages/Index.ets deleted file mode 100755 index e95640899..000000000 --- a/commonlibrary/crossplatform/commonlibraryLinkedListetstest/src/main/ets/TestAbility/pages/Index.ets +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import hilog from '@ohos.hilog'; - -@Entry -@Component -struct Index { - aboutToAppear() { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility index aboutToAppear'); - } - @State message: string = 'Hello World' - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Button() { - Text('next page') - .fontSize(20) - .fontWeight(FontWeight.Bold) - }.type(ButtonType.Capsule) - .margin({ - top: 20 - }) - .backgroundColor('#0D9FFB') - .width('35%') - .height('5%') - .onClick(()=>{ - }) - } - .width('100%') - } - .height('100%') - } - } \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryLinkedListetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/commonlibrary/crossplatform/commonlibraryLinkedListetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts deleted file mode 100755 index 92a16d84e..000000000 --- a/commonlibrary/crossplatform/commonlibraryLinkedListetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts +++ /dev/null @@ -1,49 +0,0 @@ -import hilog from '@ohos.hilog'; -import TestRunner from '@ohos.application.testRunner'; -import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; - -var abilityDelegator = undefined -var abilityDelegatorArguments = undefined - -async function onAbilityCreateCallback() { - hilog.info(0x0000, 'testTag', '%{public}s', 'onAbilityCreateCallback'); -} - -async function addAbilityMonitorCallback(err: any) { - 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() { - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun run'); - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var testAbilityName = abilityDelegatorArguments.bundleName + '.TestAbility' - let lMonitor = { - abilityName: testAbilityName, - onAbilityCreate: onAbilityCreateCallback, - }; - abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) - var cmd = 'aa start -d 0 -a TestAbility' + ' -b ' + abilityDelegatorArguments.bundleName - var debug = abilityDelegatorArguments.parameters['-D'] - if (debug == 'true') - { - cmd += ' -D' - } - hilog.info(0x0000, 'testTag', 'cmd : %{public}s', cmd); - abilityDelegator.executeShellCommand(cmd, - (err: any, d: any) => { - hilog.info(0x0000, 'testTag', 'executeShellCommand : err : %{public}s', JSON.stringify(err) ?? ''); - hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.stdResult ?? ''); - hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.exitCode ?? ''); - }) - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun end'); - } -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryLinkedListetstest/src/main/ets/test/LinkedList.test.ets b/commonlibrary/crossplatform/commonlibraryLinkedListetstest/src/main/ets/test/LinkedList.test.ets deleted file mode 100755 index d5f0fcc46..000000000 --- a/commonlibrary/crossplatform/commonlibraryLinkedListetstest/src/main/ets/test/LinkedList.test.ets +++ /dev/null @@ -1,2411 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import LinkedList from "@ohos.util.LinkedList"; -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' -export default function LinkedListTest() { -describe("LinkedListTest", function () { - - /** - * @tc.number:TEST_CONSTRUCTOR_001 - * @tc.name: testConstructor001 - * @tc.desc: Create an LinkedList instance. For example: let linkedList = new LinkedList(). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testConstructor001", 0, function () { - try { - let linkedList = new LinkedList(); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200012); - expect(err.message).assertEqual("The LinkedList's constructor cannot be directly invoked"); - } - }); - - /** - * @tc.number:TEST_LENGTH_001 - * @tc.name: testLength001 - * @tc.desc: Get the number of elements in the LinkedList instance. For example: linkedList.length. - * @tc.size: MediumTest - * @tc.type: Field - * @tc.level: level 1 - */ - it("testLength001", 0, function () { - let linkedList = new LinkedList(); - linkedList.add(4); - linkedList.add(3); - linkedList.add(1); - linkedList.add(2); - linkedList.add(14); - let res = linkedList.length; - expect(res).assertEqual(5); - }); - - /** - * @tc.number:TEST_ADD_001 - * @tc.name: testAdd001 - * @tc.desc: Add a element to the end of the LinkedList instance. For example: linkedList.add("四"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level:level 2 - */ - it("testAdd001", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("四"); - let res = linkedList.get(0); - expect(res).assertEqual("四"); - }); - - /** - * @tc.number:TEST_ADD_002 - * @tc.name: testAdd002 - * @tc.desc: Add a element to the end of the LinkedList instance. For example: linkedList.add(8). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level:level 2 - */ - it("testAdd002", 0, function () { - let linkedList = new LinkedList(); - linkedList.add(8); - let res = linkedList.get(0); - expect(res).assertEqual(8); - }); - - /** - * @tc.number:TEST_ADD_003 - * @tc.name: testAdd003 - * @tc.desc: Add a element to the end of the LinkedList instance. - * For example: let a = [1, 2, 3, 4];linkedList.add(a). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level:level 2 - */ - it("testAdd003", 0, function () { - let linkedList = new LinkedList(); - let a = [1, 2, 3, 4]; - linkedList.add(a); - let res = linkedList.get(0); - expect(res).assertEqual(a); - }); - - /** - * @tc.number:TEST_ADD_004 - * @tc.name: testAdd004 - * @tc.desc: Add a element to the end of the LinkedList instance. - * For example: let a = {name: "lala", age: "13"};linkedList.add(a). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level:level 2 - */ - it("testAdd004", 0, function () { - let linkedList = new LinkedList(); - let a = {name: "lala", age: "13"}; - linkedList.add(a); - let res = linkedList.get(0); - expect(res).assertEqual(a); - }); - - /** - * @tc.number:TEST_ADD_005 - * @tc.name: testAdd005 - * @tc.desc: Add a element to the end of the LinkedList instance. For example: let a = ".";linkedList.add(a). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level:level 2 - */ - it("testAdd005", 0, function () { - let linkedList = new LinkedList(); - let a = "."; - linkedList.add(a); - let res = linkedList.get(0); - expect(res).assertEqual(a); - }); - - /** - * @tc.number:TEST_ADD_006 - * @tc.name: testAdd006 - * @tc.desc: Add a element to the end of the LinkedList instance. For example: let a = "*";linkedList.add(a). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level:level 2 - */ - it("testAdd006", 0, function () { - let linkedList = new LinkedList(); - let a = "*"; - linkedList.add(a); - let res = linkedList.get(0); - expect(res).assertEqual(a); - }); - - /** - * @tc.number:TEST_ADD_007 - * @tc.name: testAdd007 - * @tc.desc: Add a element to the end of the LinkedList instance. For example: let a = "/";linkedList.add(a). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level:level 2 - */ - it("testAdd007", 0, function () { - let linkedList = new LinkedList(); - let a = '/"'; - linkedList.add(a); - let res = linkedList.get(0); - expect(res).assertEqual(a); - }); - - /** - * @tc.number:TEST_ADD_008 - * @tc.name: testAdd008 - * @tc.desc: Add a element to the end of the LinkedList instance. For example: let a = "";linkedList.add(a). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level:level 2 - */ - it("testAdd008", 0, function () { - let linkedList = new LinkedList(); - let a = ""; - linkedList.add(a); - let res = linkedList.get(0); - expect(res).assertEqual(a); - }); - - /** - * @tc.number:TEST_ADD_009 - * @tc.name: testAdd009 - * @tc.desc: Add a element to the end of the LinkedList instance. For example: let a = "a";linkedList.add(a). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level:level 2 - */ - it("testAdd009", 0, function () { - let linkedList = new LinkedList(); - let a = "a"; - linkedList.add(a); - linkedList.add(a); - let res = linkedList.get(0); - expect(res).assertEqual(a); - let res1 = linkedList.get(1); - expect(res1).assertEqual(a); - }); - - /** - * @tc.number:TEST_ADD_010 - * @tc.name: testAdd010 - * @tc.desc: Add a element to the end of the LinkedList instance. - * For example: for (let i = 0; i < 100; i++) {linkedList.add(i);}. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level:level 2 - */ - it("testAdd010", 0, function () { - let linkedList = new LinkedList(); - for (let i = 0; i < 100; i++) { - linkedList.add(i); - } - let res = linkedList.get(99); - expect(res).assertEqual(99); - }); - - /** - * @tc.number:TEST_ADD_011 - * @tc.name: testAdd011 - * @tc.desc: Add a element to the end of the LinkedList instance. For example: linkedList.add(null). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level:level 2 - */ - it("testAdd054", 0, function () { - let linkedList = new LinkedList(); - linkedList.add(null); - let res = linkedList.get(0); - expect(res).assertEqual(null); - }); - - /** - * @tc.number:TEST_ADD_012 - * @tc.name: testAdd012 - * @tc.desc: Add a element to the end of the LinkedList instance. For example: linkedList.add(0.1). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level:level 2 - */ - it("testAdd055", 0, function () { - let linkedList = new LinkedList(); - linkedList.add(0.1); - let res = linkedList.get(0); - expect(res).assertEqual(0.1); - }); - - /** - * @tc.number:TEST_ADD_013 - * @tc.name: testAdd013 - * @tc.desc: Add a element to the end of the LinkedList instance. For example: linkedList.add(-1). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level:level 2 - */ - it("testAdd056", 0, function () { - let linkedList = new LinkedList(); - linkedList.add(-1); - let res = linkedList.get(0); - expect(res).assertEqual(-1); - }); - - /** - * @tc.number:TEST_ADD_014 - * @tc.name: testAdd014 - * @tc.desc: Add a element to the end of the LinkedList instance. For example: const obj = {}; linkedList.add(obj). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testAdd014", 0, function () { - let linkedList = new LinkedList(); - const obj = {}; - linkedList.add(obj); - let res = linkedList.get(0); - expect(res).assertEqual(obj); - }); - - /** - * @tc.number:TEST_ADD_015 - * @tc.name: testAdd015 - * @tc.desc: Add a element to the end of the LinkedList instance. For example: linkedList.add.bind({}, obj)(). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testAdd015", 0, function () { - let linkedList = new LinkedList(); - try { - linkedList.add.bind({}, "a")(); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200011); - expect(err.message).assertEqual(`The add method cannot be bound`); - } - }); - - - - /** - * @tc.number:TEST_INSERT_001 - * @tc.name: testInsert001 - * @tc.desc: Insert an element into the middle of the LinkedList instance. For example: linkedList.insert(3, "d"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testInsert001", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.add("a"); - linkedList.add("b"); - let res = linkedList.insert(3, "d"); - let arr = []; - linkedList.forEach((item, index) => { - arr.push(item); - }); - let a = ["a", "b", "c", "d", "a", "b"]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number:TEST_INSERT_002 - * @tc.name: testInsert002 - * @tc.desc: Insert an element into the middle of the LinkedList instance. For example: linkedList.insert(0, "d"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testInsert002", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.add("a"); - linkedList.add("b"); - let res = linkedList.insert(0, "d"); - let arr = []; - linkedList.forEach((item, index) => { - arr.push(item); - }); - let a = ["d", "a", "b", "c", "a", "b"]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number:TEST_INSERT_003 - * @tc.name: testInsert003 - * @tc.desc: Insert an element into the middle of the LinkedList instance. For example: linkedList.insert(5, "d"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testInsert003", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.add("a"); - linkedList.add("b"); - let res = linkedList.insert(5, "d"); - let arr = []; - linkedList.forEach((item, index) => { - arr.push(item); - }); - let a = ["a", "b", "c", "a", "b", "d"]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number:TEST_INSERT_004 - * @tc.name: testInsert004 - * @tc.desc: Insert an element into the middle of the LinkedList instance. For example: linkedList.insert(9, "d"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testInsert004", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.add("a"); - linkedList.add("b"); - try { - let res = linkedList.insert(8, "d"); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200001); - expect(err.message).assertEqual(`The value of "index" is out of range. It must be >= 0 && <= 5. Received value is: 8`); - } - }); - - /** - * @tc.number:TEST_INSERT_005 - * @tc.name: testInsert005 - * @tc.desc: Insert an element into the middle of the LinkedList instance. For example: linkedList.insert("a", "d"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testInsert005", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - try { - //@ts-ignore - linkedList.insert("a", "d"); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(401); - expect(err.message).assertEqual(`The type of "index" must be number. Received value is: a`); - } - }); - - - - /** - * @tc.number:TEST_GET_001 - * @tc.name: testGet001 - * @tc.desc: Gets the element corresponding to the specified index. For example: linkedList.get(1). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testGet001", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.add("a"); - linkedList.add("b"); - let res = linkedList.get(1); - expect(res).assertEqual("b"); - }); - - /** - * @tc.number:TEST_GET_002 - * @tc.name: testGet002 - * @tc.desc: Gets the element corresponding to the specified index. For example: linkedList.get(10). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testGet002", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.add("a"); - linkedList.add("b"); - let res = linkedList.get(10); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.number:TEST_GET_003 - * @tc.name: testGet003 - * @tc.desc: Gets the element corresponding to the specified index. For example: linkedList.get(1). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testGet003", 0, function () { - let linkedList = new LinkedList(); - let res = linkedList.get(1); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.number:TEST_GET_004 - * @tc.name: testGet004 - * @tc.desc: Gets the element corresponding to the specified index. For example: linkedList.get("a"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testGet004", 0, function () { - let linkedList = new LinkedList(); - try { - //@ts-ignore - linkedList.get("a"); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(401); - expect(err.message).assertEqual(`The type of "index" must be number. Received value is: a`); - } - }); - - /** - * @tc.number:TEST_ADDFIRST_001 - * @tc.name: testAddFirst001 - * @tc.desc: Add element to LinkedList instance header. For example: linkedList.addFirst("e"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testAddFirst001", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.addFirst("e"); - let res = linkedList.get(0); - expect(res).assertEqual("e"); - }); - - /** - * @tc.number:TEST_ADDFIRST_002 - * @tc.name: testAddFirst002 - * @tc.desc: Add element to LinkedList instance header. For example: linkedList.addFirst("h"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testAddFirst002", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.addFirst("h"); - let res = linkedList.get(0); - expect(res).assertEqual("h"); - }); - - /** - * @tc.number:TEST_ADDFIRST_003 - * @tc.name: testAddFirst003 - * @tc.desc: Add element to LinkedList instance header. For example: linkedList.addFirst("m"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testAddFirst003", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.addFirst("m"); - let res = linkedList.get(0); - expect(res).assertEqual("m"); - }); - - /** - * @tc.number:TEST_ADDFIRST_004 - * @tc.name: testAddFirst004 - * @tc.desc: Add element to LinkedList instance header. For example: linkedList.addFirst("k"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testAddFirst004", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.addFirst("k"); - let res = linkedList.get(0); - expect(res).assertEqual("k"); - }); - - /** - * @tc.number:TEST_ADDFIRST_005 - * @tc.name: testAddFirst005 - * @tc.desc: Add element to LinkedList instance header. For example: linkedList.addFirst("w"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testAddFirst005", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.addFirst("w"); - let res = linkedList.get(0); - expect(res).assertEqual("w"); - }); - - /** - * @tc.number:TEST_REMOVEFIRST_001 - * @tc.name: testRemoveFirst001 - * @tc.desc: Delete the header element of a LinkedList instance. For example: linkedList.removeFirst(). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testRemoveFirst001", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - let res = linkedList.removeFirst(); - expect(res).assertEqual("a"); - let arr = []; - linkedList.forEach((item, index) => { - arr.push(item); - }); - let a = ["b", "c"]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number:TEST_REMOVEFIRST_002 - * @tc.name: testRemoveFirst002 - * @tc.desc: Delete the header element of a LinkedList instance. For example: linkedList.removeFirst(). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testRemoveFirst002", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("m"); - linkedList.add("b"); - linkedList.add("c"); - let res = linkedList.removeFirst(); - expect(res).assertEqual("m"); - let arr = []; - linkedList.forEach((item, index) => { - arr.push(item); - }); - let a = ["b", "c"]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number:TEST_REMOVEFIRST_003 - * @tc.name: testRemoveFirst003 - * @tc.desc: Delete the header element of a LinkedList instance. For example: linkedList.removeFirst(). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testRemoveFirst003", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("h"); - linkedList.add("b"); - linkedList.add("c"); - let res = linkedList.removeFirst(); - expect(res).assertEqual("h"); - let arr = []; - linkedList.forEach((item, index) => { - arr.push(item); - }); - let a = ["b", "c"]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number:TEST_REMOVEFIRST_004 - * @tc.name: testRemoveFirst004 - * @tc.desc: Delete the header element of a LinkedList instance. For example: linkedList.removeFirst(). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testRemoveFirst004", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("k"); - linkedList.add("b"); - linkedList.add("c"); - let res = linkedList.removeFirst(); - expect(res).assertEqual("k"); - let arr = []; - linkedList.forEach((item, index) => { - arr.push(item); - }); - let a = ["b", "c"]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number:TEST_REMOVEFIRST_005 - * @tc.name: testRemoveFirst005 - * @tc.desc: Delete the header element of a LinkedList instance. For example: linkedList.removeFirst(). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testRemoveFirst005", 0, function () { - let linkedList = new LinkedList(); - try { - linkedList.removeFirst(); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200010); - expect(err.message).assertEqual(`Container is empty`); - } - }); - - /** - * @tc.number:TEST_REMOVELAST_001 - * @tc.name: testRemoveLast001 - * @tc.desc: Delete the end element of a LinkedList instance. linkedList.removeLast(). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testRemoveLast001", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.addFirst("e"); - let res = linkedList.removeLast(); - expect(res).assertEqual("c"); - let arr = []; - linkedList.forEach((item, index) => { - arr.push(item); - }); - let a = ["e", "a", "b"]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number:TEST_REMOVELAST_002 - * @tc.name: testRemoveLast002 - * @tc.desc: Delete the end element of a LinkedList instance. linkedList.removeLast(). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testRemoveLast002", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.add("d"); - linkedList.addFirst("e"); - let res = linkedList.removeLast(); - expect(res).assertEqual("d"); - let arr = []; - linkedList.forEach((item, index) => { - arr.push(item); - }); - let a = ["e", "a", "b","c"]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number:TEST_REMOVELAST_003 - * @tc.name: testRemoveLast003 - * @tc.desc: Delete the end element of a LinkedList instance. linkedList.removeLast(). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testRemoveLast003", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("h"); - linkedList.addFirst("e"); - let res = linkedList.removeLast(); - expect(res).assertEqual("h"); - let arr = []; - linkedList.forEach((item, index) => { - arr.push(item); - }); - let a = ["e", "a", "b"]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number:TEST_REMOVELAST_004 - * @tc.name: testRemoveLast004 - * @tc.desc: Delete the end element of a LinkedList instance. linkedList.removeLast(). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testRemoveLast004", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("m"); - linkedList.addFirst("e"); - let res = linkedList.removeLast(); - expect(res).assertEqual("m"); - let arr = []; - linkedList.forEach((item, index) => { - arr.push(item); - }); - let a = ["e", "a", "b"]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number:TEST_REMOVELAST_005 - * @tc.name: testRemoveLast005 - * @tc.desc: Delete the end element of a LinkedList instance. linkedList.removeLast(). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testRemoveLast061", 0, function () { - let linkedList = new LinkedList(); - try { - linkedList.removeLast(); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200010); - expect(err.message).assertEqual(`Container is empty`); - } - }); - - /** - * @tc.number:TEST_HAS_001 - * @tc.name: testHas001 - * @tc.desc: Check whether the LinkedList contains a specified element. For example: linkedList.has("a"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testHas001", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - let res = linkedList.has("a"); - expect(res).assertEqual(true); - let res1 = linkedList.has("d"); - expect(res1).assertEqual(false); - }); - - /** - * @tc.number:TEST_HAS_002 - * @tc.name: testHas002 - * @tc.desc: Check whether the LinkedList contains a specified element. For example: linkedList.has("a"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testHas002", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("m"); - let res = linkedList.has("m"); - expect(res).assertEqual(true); - let res1 = linkedList.has("k"); - expect(res1).assertEqual(false); - }); - - /** - * @tc.number:TEST_HAS_003 - * @tc.name: testHas003 - * @tc.desc: Check whether the LinkedList contains a specified element. For example: linkedList.has(1). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testHas003", 0, function () { - let linkedList = new LinkedList(); - let res = linkedList.has(1); - expect(res).assertEqual(false); - }); - - /** - * @tc.number:TEST_GETINDEXOF_001 - * @tc.name: testGetIndexOf001 - * @tc.desc: In the LinkedList instance, find the index of a specified element from front to back, - * and return the index found for the first time. If not found, return -1. - * For example: linkedList.getIndexOf("b"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testGetIndexOf001", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("b"); - let res = linkedList.getIndexOf("b"); - expect(res).assertEqual(1); - }); - - /** - * @tc.number:TEST_GETINDEXOF_002 - * @tc.name: testGetIndexOf002 - * @tc.desc: In the LinkedList instance, find the index of a specified element from front to back, - * and return the index found for the first time. If not found, return -1. - * For example: linkedList.getIndexOf("b"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testGetIndexOf002", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("b"); - let res = linkedList.getIndexOf("a"); - expect(res).assertEqual(0); - }); - - /** - * @tc.number:TEST_GETINDEXOF_003 - * @tc.name: testGetIndexOf003 - * @tc.desc: In the LinkedList instance, find the index of a specified element from front to back, - * and return the index found for the first time. If not found, return -1. - * For example: linkedList.getIndexOf("b"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testGetIndexOf003", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("b"); - let res = linkedList.getIndexOf("c"); - expect(res).assertEqual(2); - }); - - /** - * @tc.number:TEST_GETINDEXOF_004 - * @tc.name: testGetIndexOf004 - * @tc.desc: In the LinkedList instance, find the index of a specified element from front to back, - * and return the index found for the first time. If not found, return -1. - * For example: linkedList.getIndexOf("f"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testGetIndexOf004", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("b"); - let res = linkedList.getIndexOf("f"); - expect(res).assertEqual(-1); - }); - - /** - * @tc.number:TEST_GETINDEXOF_005 - * @tc.name: testGetIndexOf005 - * @tc.desc: In the LinkedList instance, find the index of a specified element from front to back, - * and return the index found for the first time. If not found, return -1. For example: linkedList.getIndexOf(1). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testGetIndexOf005", 0, function () { - let linkedList = new LinkedList(); - let res = linkedList.getIndexOf(1); - expect(res).assertEqual(-1); - }); - - /** - * @tc.number:TEST_REMOVEBYINDEX_001 - * @tc.name: testRemoveByIndex001 - * @tc.desc: In the linkedList instance, delete the element based on its index. - * For example: linkedList.removeByIndex(2). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testRemoveByIndex001", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.add("a"); - linkedList.add("b"); - let res = linkedList.removeByIndex(2); - let arr = []; - linkedList.forEach((item, index) => { - arr.push(item); - }); - let a = ["a", "b", "a", "b"]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number:TEST_REMOVEBYINDEX_002 - * @tc.name: testRemoveByIndex002 - * @tc.desc: In the linkedList instance, delete the element based on its index. - * For example: linkedList.removeByIndex(3). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testRemoveByIndex002", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.add("a"); - linkedList.add("b"); - let res = linkedList.removeByIndex(3); - let arr = []; - linkedList.forEach((item, index) => { - arr.push(item); - }); - let a = ["a", "b", "c", "b"]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number:TEST_REMOVEBYINDEX_003 - * @tc.name: testRemoveByIndex003 - * @tc.desc: In the linkedList instance, delete the element based on its subscript index. - * For example: linkedList.removeByIndex(10). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testRemoveByIndex003", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.add("a"); - linkedList.add("b"); - try { - let res = linkedList.removeByIndex(10); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200001); - expect(err.message).assertEqual(`The value of "index" is out of range. It must be >= 0 && <= 4. Received value is: 10`); - } - }); - - /** - * @tc.number:TEST_REMOVEBYINDEX_004 - * @tc.name: testRemoveByIndex004 - * @tc.desc: In the linkedList instance, delete the element based on its subscript index. - * For example: linkedList.removeByIndex(1). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testRemoveByIndex004", 0, function () { - let linkedList = new LinkedList(); - try { - let res = linkedList.removeByIndex(1); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200001); - expect(err.message).assertEqual(`The value of "index" is out of range. It must be >= 0 && <= 0. Received value is: 1`); - } - }); - - /** - * @tc.number:TEST_REMOVEBYINDEX_005 - * @tc.name: testRemoveByIndex005 - * @tc.desc: In the linkedList instance, delete the element based on its subscript index. - * For example: linkedList.removeByIndex("a"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testRemoveByIndex005", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - try { - //@ts-ignore - linkedList.removeByIndex("a"); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(401); - expect(err.message).assertEqual(`The type of "index" must be number. Received value is: a`); - } - }); - - /** - * @tc.number:TEST_REMOVE_001 - * @tc.name: testRemove001 - * @tc.desc: Delete the specified element. For example: linkedList.remove("a"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testRemove001", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.add("a"); - linkedList.add("b"); - let res = linkedList.remove("a"); - let arr = []; - linkedList.forEach((item, index) => { - arr.push(item); - }); - let a = ["b", "c", "a", "b"]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number:TEST_REMOVE_002 - * @tc.name: testRemove002 - * @tc.desc: Delete the specified element. For example: linkedList.remove("a"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testRemove002", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.add("a"); - linkedList.add("b"); - let res = linkedList.remove("c"); - let arr = []; - linkedList.forEach((item, index) => { - arr.push(item); - }); - let a = ["a", "b", "a", "b"]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number:TEST_REMOVE_003 - * @tc.name: testRemove003 - * @tc.desc: Delete the specified element. For example: linkedList.remove("a"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testRemove003", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.add("a"); - linkedList.add("b"); - let res = linkedList.remove("b"); - let arr = []; - linkedList.forEach((item, index) => { - arr.push(item); - }); - let a = ["a", "c", "a", "b"]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number:TEST_REMOVE_004 - * @tc.name: testRemove004 - * @tc.desc: Delete the specified element. For example: linkedList.remove("d"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testRemove004", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.add("a"); - linkedList.add("b"); - let res = linkedList.remove("d"); - expect(res).assertEqual(false); - }); - - /** - * @tc.number:TEST_REMOVE_005 - * @tc.name: testRemove005 - * @tc.desc: Delete the specified element. For example: linkedList.remove("d"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testRemove005", 0, function () { - let linkedList = new LinkedList(); - let res = linkedList.remove("d"); - expect(res).assertEqual(false); - }); - - /** - * @tc.number:TEST_REMOVEFIRSTFOUND_001 - * @tc.name: testRemoveFirstFound001 - * @tc.desc: Delete the specified element found for the first time. For example: linkedList.removeFirstFound("b"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testRemoveFirstFound001", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.add("a"); - linkedList.add("b"); - let res = linkedList.removeFirstFound("b"); - let arr = []; - linkedList.forEach((item, index) => { - arr.push(item); - }); - let a = ["a", "c", "a", "b"]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number:TEST_REMOVEFIRSTFOUND_002 - * @tc.name: testRemoveFirstFound002 - * @tc.desc: Delete the specified element found for the first time. For example: linkedList.removeFirstFound("b"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testRemoveFirstFound002", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.add("a"); - linkedList.add("b"); - let res = linkedList.removeFirstFound("a"); - let arr = []; - linkedList.forEach((item, index) => { - arr.push(item); - }); - let a = ["b", "c", "a", "b"]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number:TEST_REMOVEFIRSTFOUND_003 - * @tc.name: testRemoveFirstFound003 - * @tc.desc: Delete the specified element found for the first time. For example: linkedList.removeFirstFound("b"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testRemoveFirstFound003", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.add("a"); - linkedList.add("b"); - let res = linkedList.removeFirstFound("c"); - let arr = []; - linkedList.forEach((item, index) => { - arr.push(item); - }); - let a = ["a", "b", "a", "b"]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number:TEST_REMOVEFIRSTFOUND_004 - * @tc.name: testRemoveFirstFound004 - * @tc.desc: Delete the specified element found for the first time. For example: linkedList.removeFirstFound("b"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testRemoveFirstFound004", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.add("a"); - linkedList.add("m"); - let res = linkedList.removeFirstFound("m"); - let arr = []; - linkedList.forEach((item, index) => { - arr.push(item); - }); - let a = ["a", "b", "c", "a"]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number:TEST_REMOVEFIRSTFOUND_005 - * @tc.name: testRemoveFirstFound005 - * @tc.desc: Delete the specified element found for the first time. For example: linkedList.removeFirstFound("b"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testRemoveFirstFound005", 0, function () { - let linkedList = new LinkedList(); - try { - linkedList.removeFirstFound("b"); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200010); - expect(err.message).assertEqual(`Container is empty`); - } - }); - - /** - * @tc.number:TEST_REMOVELASTFOUND_001 - * @tc.name: testRemoveLastFound001 - * @tc.desc: Delete the specified element found for the last time. For example: linkedList.removeLastFound("b"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testRemoveLastFound001", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.add("a"); - linkedList.add("b"); - let res = linkedList.removeLastFound("b"); - let arr = []; - linkedList.forEach((item, index) => { - arr.push(item); - }); - let a = ["a", "b", "c", "a"]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number:TEST_REMOVELASTFOUND_002 - * @tc.name: testRemoveLastFound002 - * @tc.desc: Delete the specified element found for the last time. For example: linkedList.removeLastFound("b"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testRemoveLastFound002", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.add("a"); - linkedList.add("b"); - let res = linkedList.removeLastFound("a"); - let arr = []; - linkedList.forEach((item, index) => { - arr.push(item); - }); - let a = ["a", "b", "c", "b"]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number:TEST_REMOVELASTFOUND_003 - * @tc.name: testRemoveLastFound003 - * @tc.desc: Delete the specified element found for the last time. For example: linkedList.removeLastFound("b"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testRemoveLastFound003", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.add("a"); - linkedList.add("b"); - let res = linkedList.removeLastFound("c"); - let arr = []; - linkedList.forEach((item, index) => { - arr.push(item); - }); - let a = ["a", "b", "a", "b"]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number:TEST_REMOVELASTFOUND_004 - * @tc.name: testRemoveLastFound004 - * @tc.desc: Delete the specified element found for the last time. For example: linkedList.removeLastFound("b"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testRemoveLastFound004", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("m"); - let res = linkedList.removeLastFound("m"); - let arr = []; - linkedList.forEach((item, index) => { - arr.push(item); - }); - let a = ["a", "b","c","a", "b"]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number:TEST_REMOVELASTFOUND_005 - * @tc.name: testRemoveLastFound005 - * @tc.desc: Delete the specified element found for the last time. For example: linkedList.removeLastFound("b"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testRemoveLastFound005", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("m"); - let res = linkedList.removeLastFound("a"); - let arr = []; - linkedList.forEach((item, index) => { - arr.push(item); - }); - let a = ["a", "b","c","b", "m"]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number:TEST_GETLASTINDEXOF_001 - * @tc.name: testGetLastIndexOf001 - * @tc.desc: In the LinkedList instance, find the index of a specified element from brack to front, - * and return the index found for the first time. If not found, return -1. - * For example: linkedList.getLastIndexOf("a"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testGetLastIndexOf001", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("b"); - let res = linkedList.getLastIndexOf("a"); - expect(res).assertEqual(3); - }); - - /** - * @tc.number:TEST_GETLASTINDEXOF_002 - * @tc.name: testGetLastIndexOf002 - * @tc.desc: In the LinkedList instance, find the index of a specified element from brack to front, - * and return the index found for the first time. If not found, return -1. - * For example: linkedList.getLastIndexOf("a"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testGetLastIndexOf002", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("b"); - let res = linkedList.getLastIndexOf("b"); - expect(res).assertEqual(5); - }); - - /** - * @tc.number:TEST_GETLASTINDEXOF_003 - * @tc.name: testGetLastIndexOf003 - * @tc.desc: In the LinkedList instance, find the index of a specified element from brack to front, - * and return the index found for the first time. If not found, return -1. - * For example: linkedList.getLastIndexOf("a"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testGetLastIndexOf003", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("b"); - let res = linkedList.getLastIndexOf("c"); - expect(res).assertEqual(2); - }); - - /** - * @tc.number:TEST_GETLASTINDEXOF_004 - * @tc.name: testGetLastIndexOf004 - * @tc.desc: In the LinkedList instance, find the index of a specified element from brack to front, - * and return the index found for the first time. If not found, return -1. - * For example: linkedList.getLastIndexOf("a"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testGetLastIndexOf004", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.add("a"); - linkedList.add("k"); - linkedList.add("b"); - linkedList.add("k"); - linkedList.add("b"); - let res = linkedList.getLastIndexOf("k"); - expect(res).assertEqual(6); - }); - - /** - * @tc.number:TEST_GETLASTINDEXOF_005 - * @tc.name: testGetLastIndexOf005 - * @tc.desc: In the LinkedList instance, find the index of a specified element from brack to front, - * and return the index found for the first time. If not found, return -1. - * For example: linkedList.getLastIndexOf("f"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testGetLastIndexOf005", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("b"); - let res = linkedList.getLastIndexOf("f"); - expect(res).assertEqual(-1); - }); - - /** - * @tc.number:TEST_GETFIRST_001 - * @tc.name: testGetFirst001 - * @tc.desc: Get the header element of the linkedList instance. For example: linkedList.getFirst(). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testGetFirst001", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.add("a"); - linkedList.add("b"); - let res = linkedList.getFirst(); - expect(res).assertEqual("a"); - }); - - /** - * @tc.number:TEST_GETFIRST_002 - * @tc.name: testGetFirst002 - * @tc.desc: Get the header element of the linkedList instance. For example: linkedList.getFirst(). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testGetFirst002", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("m"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.add("a"); - linkedList.add("b"); - let res = linkedList.getFirst(); - expect(res).assertEqual("m"); - }); - - /** - * @tc.number:TEST_GETFIRST_003 - * @tc.name: testGetFirst003 - * @tc.desc: Get the header element of the linkedList instance. For example: linkedList.getFirst(). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testGetFirst003", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("k"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.add("a"); - linkedList.add("b"); - let res = linkedList.getFirst(); - expect(res).assertEqual("k"); - }); - - /** - * @tc.number:TEST_GETFIRST_004 - * @tc.name: testGetFirst004 - * @tc.desc: Get the header element of the linkedList instance. For example: linkedList.getFirst(). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testGetFirst004", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("h"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.add("a"); - linkedList.add("b"); - let res = linkedList.getFirst(); - expect(res).assertEqual("h"); - }); - - /** - * @tc.number:TEST_GETFIRST_005 - * @tc.name: testGetFirst005 - * @tc.desc: Get the header element of the linkedList instance. For example: linkedList.getFirst(). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testGetFirst005", 0, function () { - let linkedList = new LinkedList(); - let res = linkedList.getFirst(); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.number:TEST_GETLAST_001 - * @tc.name: testGetLast001 - * @tc.desc: Get the end element of the linkedList instance. For example: linkedList.getLast(). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testGetLast001", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.add("a"); - linkedList.add("b"); - let res = linkedList.getLast(); - expect(res).assertEqual("b"); - }); - - /** - * @tc.number:TEST_GETLAST_002 - * @tc.name: testGetLast002 - * @tc.desc: Get the end element of the linkedList instance. For example: linkedList.getLast(). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testGetLast002", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.add("a"); - linkedList.add("m"); - let res = linkedList.getLast(); - expect(res).assertEqual("m"); - }); - - /** - * @tc.number:TEST_GETLAST_003 - * @tc.name: testGetLast003 - * @tc.desc: Get the end element of the linkedList instance. For example: linkedList.getLast(). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testGetLast003", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.add("a"); - linkedList.add("h"); - let res = linkedList.getLast(); - expect(res).assertEqual("h"); - }); - - /** - * @tc.number:TEST_GETLAST_004 - * @tc.name: testGetLast004 - * @tc.desc: Get the end element of the linkedList instance. For example: linkedList.getLast(). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testGetLast004", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.add("a"); - linkedList.add("k"); - let res = linkedList.getLast(); - expect(res).assertEqual("k"); - }); - - /** - * @tc.number:TEST_GETLAST_005 - * @tc.name: testGetLast005 - * @tc.desc: Get the end element of the linkedList instance. For example: linkedList.getLast(). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testGetLast005", 0, function () { - let linkedList = new LinkedList(); - let res = linkedList.getLast(); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.number:TEST_SET_001 - * @tc.name: testSet001 - * @tc.desc: Modify the element corresponding to the specified index. For example: linkedList.set(2, "d"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testSet001", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.add("a"); - let res = linkedList.set(2, "d"); - let res1 = linkedList.get(2); - expect(res1).assertEqual("d"); - }); - - /** - * @tc.number:TEST_SET_002 - * @tc.name: testSet002 - * @tc.desc: Modify the element corresponding to the specified index. For example: linkedList.set(2, "d"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testSet002", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.add("a"); - let res = linkedList.set(1, "m"); - let res1 = linkedList.get(1); - expect(res1).assertEqual("m"); - }); - - /** - * @tc.number:TEST_SET_003 - * @tc.name: testSet003 - * @tc.desc: Modify the element corresponding to the specified index. For example: linkedList.set(2, "d"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testSet003", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.add("a"); - let res = linkedList.set(3, "k"); - let res1 = linkedList.get(3); - expect(res1).assertEqual("k"); - }); - - /** - * @tc.number:TEST_SET_004 - * @tc.name: testSet004 - * @tc.desc: Modify the element corresponding to the specified index. For example: linkedList.set(6, "d"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testSet004", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.add("a"); - try { - linkedList.set(6, "d"); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200001); - expect(err.message).assertEqual(`The value of "index" is out of range. It must be >= 0 && <= 3. Received value is: 6`); - } - }); - - /** - * @tc.number:TEST_SET_005 - * @tc.name: testSet005 - * @tc.desc: Modify the element corresponding to the specified index. For example: linkedList.set("a", "d"). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testSet005", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - try { - //@ts-ignore - linkedList.set("a", "d"); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(401); - expect(err.message).assertEqual(`The type of "index" must be number. Received value is: a`); - } - }); - - /** - * @tc.number:TEST_FOREACH_001 - * @tc.name: testForEach001 - * @tc.desc: Traversing elements in an LinkedList instance. - * For example: linkedList.forEach((item, index) => {arr.push(item);}). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testForEach001", 0, function () { - let linkedList = new LinkedList(); - linkedList.add(8); - linkedList.add("一"); - linkedList.add("二"); - linkedList.add(5); - let c = [1, 2, 3, 4]; - linkedList.add(c); - linkedList.add(6); - linkedList.add("三"); - linkedList.add("四"); - let arr = []; - linkedList.forEach((item, index) => { - arr.push(item); - }); - let a = [8, "一", "二", 5, c, 6, "三", "四"]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number:TEST_FOREACH_002 - * @tc.name: testForEach002 - * @tc.desc: Traversing elements in an LinkedList instance. - * For example: linkedList.forEach((item, index) => {arr.push(item);}). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testForEach002", 0, function () { - let linkedList = new LinkedList(); - linkedList.add(8); - linkedList.add(1); - linkedList.add(2); - linkedList.add(5); - let c = [1, 2, 3, 4]; - linkedList.add(c); - linkedList.add(6); - linkedList.add(3); - linkedList.add(4); - let arr = []; - linkedList.forEach((item, index) => { - arr.push(item); - }); - let a = [8, 1, 2, 5, c, 6, 3, 4]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number:TEST_FOREACH_003 - * @tc.name: testForEach003 - * @tc.desc: Traversing elements in an LinkedList instance. - * For example: linkedList.forEach((item, index) => {arr.push(item);}). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testForEach003", 0, function () { - let linkedList = new LinkedList(); - linkedList.add(8); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - let c = [1, 2, 3, 4]; - linkedList.add("c"); - linkedList.add(6); - linkedList.add(3); - linkedList.add(4); - let arr = []; - linkedList.forEach((item, index) => { - arr.push(item); - }); - let a = [8, "a", "b", "c", "c", 6, 3, 4]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number:TEST_FOREACH_004 - * @tc.name: testForEach004 - * @tc.desc: Traversing elements in an LinkedList instance. - * For example: linkedList.forEach((item, index) => {arr.push(item);}). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testForEach004", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("m"); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - let c = [1, 2, 3, 4]; - linkedList.add("m"); - linkedList.add(6); - linkedList.add(3); - linkedList.add(4); - let arr = []; - linkedList.forEach((item, index) => { - arr.push(item); - }); - let a = ["m", "a", "b", "c", "m", 6, 3, 4]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number:TEST_FOREACH_005 - * @tc.name: testForEach005 - * @tc.desc: Traversing elements in an LinkedList instance. - * For example: linkedList.forEach((item, index) => { num++; }). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testForEach005", 0, function () { - let linkedList = new LinkedList(); - let num = 0; - linkedList.forEach((item, index) => { - num++; - }); - expect(num).assertEqual(0); - }); - - /** - * @tc.number:TEST_CLEAR_001 - * @tc.name: testClear001 - * @tc.desc: Clear all elements in the linkedList instance. For example: linkedList.clear(). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testClear001", 0, function () { - let linkedList = new LinkedList(); - linkedList.add(4); - linkedList.add(3); - linkedList.add(1); - linkedList.add(2); - linkedList.add(14); - linkedList.clear(); - let res = linkedList.length; - expect(res).assertEqual(0); - }); - - /** - * @tc.number:TEST_CLEAR_002 - * @tc.name: testClear002 - * @tc.desc: Clear all elements in the linkedList instance. For example: linkedList.clear(). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testClear002", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.add("d"); - linkedList.add(20); - linkedList.clear(); - let res = linkedList.length; - expect(res).assertEqual(0); - }); - - /** - * @tc.number:TEST_CLEAR_003 - * @tc.name: testClear003 - * @tc.desc: Clear all elements in the LinkedList instance. For example: linkedList.clear(). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testClear003", 0, function () { - let linkedList = new LinkedList(); - linkedList.clear(); - const len = linkedList.length; - expect(len).assertEqual(0); - }); - - /** - * @tc.number:TEST_CLONE_001 - * @tc.name: testClone001 - * @tc.desc: Clone an LinkedList instance. For example: linkedList.clone(). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testClone001", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - let linkedList1 = linkedList.clone(); - linkedList1.addFirst("e"); - let res = linkedList1.removeLast(); - expect(res).assertEqual("c"); - let arr = []; - linkedList1.forEach((item, index) => { - arr.push(item); - }); - let a = ["e", "a", "b"]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number:TEST_CLONE_002 - * @tc.name: testClone002 - * @tc.desc: Clone an LinkedList instance. For example: linkedList.clone(). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testClone002", 0, function () { - let linkedList = new LinkedList(); - linkedList.add(1); - linkedList.add(2); - linkedList.add(3); - let linkedList1 = linkedList.clone(); - linkedList1.addFirst("e"); - let res = linkedList1.removeLast(); - expect(res).assertEqual(3); - let arr = []; - linkedList1.forEach((item, index) => { - arr.push(item); - }); - let a = ["e", 1, 2]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number:TEST_CLONE_003 - * @tc.name: testClone003 - * @tc.desc: Clone an LinkedList instance. For example: linkedList.clone(). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testClone003", 0, function () { - let linkedList = new LinkedList(); - let newlinkedList = linkedList.clone(); - let res = true - for (let i = 0; i < linkedList.length; i++) { - if (linkedList[i] !== newlinkedList[i]) { - res = false - } - } - expect(res).assertEqual(true); - }); - - /** - * @tc.number:TEST_CONVERTTOARRAY_001 - * @tc.name: testConvertToArray001 - * @tc.desc: Convert an LinkedList instance to an array. For example: linkedList.convertToArray(). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testConvertToArray001", 0, function () { - let linkedList = new LinkedList(); - linkedList.add(4); - linkedList.add(3); - linkedList.add(1); - linkedList.add(2); - linkedList.add(14); - let res = linkedList.convertToArray(); - let a = [4, 3, 1, 2, 14]; - for (let i = 0; i < a.length; i++) { - expect(res[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number:TEST_CONVERTTOARRAY_002 - * @tc.name: testConvertToArray002 - * @tc.desc: Convert an LinkedList instance to an array. For example: linkedList.convertToArray(). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testConvertToArray002", 0, function () { - let linkedList = new LinkedList(); - linkedList.add(1); - linkedList.add(2); - linkedList.add(3); - linkedList.add(4); - linkedList.add(5); - linkedList.add(6); - let res = linkedList.convertToArray(); - let a = [1,2,3,4,5,6]; - for (let i = 0; i < a.length; i++) { - expect(res[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number:TEST_CONVERTTOARRAY_003 - * @tc.name: testConvertToArray003 - * @tc.desc: Convert an LinkedList instance to an array. For example: linkedList.convertToArray(). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testConvertToArray003", 0, function () { - let linkedList = new LinkedList(); - linkedList.add(2); - linkedList.add(4); - linkedList.add(3); - linkedList.add(10); - linkedList.add(12); - linkedList.add(16); - let res = linkedList.convertToArray(); - let a = [2,4,3,10,12,16]; - for (let i = 0; i < a.length; i++) { - expect(res[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number:TEST_CONVERTTOARRAY_004 - * @tc.name: testConvertToArray004 - * @tc.desc: Convert an LinkedList instance to an array. For example: linkedList.convertToArray(). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testConvertToArray004", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.add("d"); - linkedList.add("e"); - linkedList.add("f"); - let res = linkedList.convertToArray(); - let a = ["a","b","c","d","e","f"]; - for (let i = 0; i < a.length; i++) { - expect(res[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number:TEST_CONVERTTOARRAY_005 - * @tc.name: testConvertToArray005 - * @tc.desc: Convert an LinkedList instance to an array. For example: linkedList.convertToArray(). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testConvertToArray005", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("m"); - linkedList.add("k"); - linkedList.add("c"); - linkedList.add("d"); - linkedList.add("e"); - linkedList.add("f"); - let res = linkedList.convertToArray(); - let a = ["m","k","c","d","e","f"]; - for (let i = 0; i < a.length; i++) { - expect(res[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number:TEST_ITERATOR_001 - * @tc.name: testIterator001 - * @tc.desc: Iterates over all elements in an LinkedList instance. For example: linkedList[Symbol.iterator](). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testIterator001", 0, function () { - let linkedList = new LinkedList(); - linkedList.add(1); - linkedList.add(2); - linkedList.add(3); - linkedList.addFirst("e"); - let res = linkedList.removeLast(); - expect(res).assertEqual(3); - let arr = []; - let itr = linkedList[Symbol.iterator](); - let tmp = undefined; - do { - tmp = itr.next().value; - arr.push(tmp); - } while (tmp != undefined); - let a = ["e", 1, 2]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number:TEST_ITERATOR_002 - * @tc.name: testIterator002 - * @tc.desc: Iterates over all elements in an LinkedList instance. For example: linkedList[Symbol.iterator](). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testIterator002", 0, function () { - let linkedList = new LinkedList(); - linkedList.add(5); - linkedList.add(10); - linkedList.add(15); - linkedList.addFirst("e"); - let res = linkedList.removeLast(); - expect(res).assertEqual(15); - let arr = []; - let itr = linkedList[Symbol.iterator](); - let tmp = undefined; - do { - tmp = itr.next().value; - arr.push(tmp); - } while (tmp != undefined); - let a = ["e", 5, 10]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number:TEST_ITERATOR_003 - * @tc.name: testIterator003 - * @tc.desc: Iterates over all elements in an LinkedList instance. For example: linkedList[Symbol.iterator](). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testIterator003", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("k"); - linkedList.add("h"); - linkedList.add("m"); - linkedList.addFirst("e"); - let res = linkedList.removeLast(); - expect(res).assertEqual("m"); - let arr = []; - let itr = linkedList[Symbol.iterator](); - let tmp = undefined; - do { - tmp = itr.next().value; - arr.push(tmp); - } while (tmp != undefined); - let a = ["e", "k", "h"]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number:TEST_ITERATOR_004 - * @tc.name: testIterator004 - * @tc.desc: Iterates over all elements in an LinkedList instance. For example: linkedList[Symbol.iterator](). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testIterator004", 0, function () { - let linkedList = new LinkedList(); - linkedList.add(1); - linkedList.add(2); - linkedList.add(3); - linkedList.addFirst(10); - let res = linkedList.removeLast(); - expect(res).assertEqual(3); - let arr = []; - let itr = linkedList[Symbol.iterator](); - let tmp = undefined; - do { - tmp = itr.next().value; - arr.push(tmp); - } while (tmp != undefined); - let a = [10, 1, 2]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number:TEST_ITERATOR_005 - * @tc.name: testIterator005 - * @tc.desc: Iterates over all elements in an LinkedList instance. For example: linkedList[Symbol.iterator](). - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it("testIterator005", 0, function () { - let linkedList = new LinkedList(); - linkedList.add("a"); - linkedList.add("b"); - linkedList.add("c"); - linkedList.addFirst("e"); - let res = linkedList.removeLast(); - expect(res).assertEqual("c"); - let arr = []; - let itr = linkedList[Symbol.iterator](); - let tmp = undefined; - do { - tmp = itr.next().value; - arr.push(tmp); - } while (tmp != undefined); - let a = ["e", "a", "b"]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - }); -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryLinkedListetstest/src/main/ets/test/List.test.ets b/commonlibrary/crossplatform/commonlibraryLinkedListetstest/src/main/ets/test/List.test.ets deleted file mode 100755 index 6222ba326..000000000 --- a/commonlibrary/crossplatform/commonlibraryLinkedListetstest/src/main/ets/test/List.test.ets +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import LinkedListTest from './LinkedList.test' - -export default function testsuite() { - LinkedListTest() -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryLinkedListetstest/src/main/module.json b/commonlibrary/crossplatform/commonlibraryLinkedListetstest/src/main/module.json deleted file mode 100755 index a4443e713..000000000 --- a/commonlibrary/crossplatform/commonlibraryLinkedListetstest/src/main/module.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "module": { - "name": "entry_test", - "type": "feature", - "description": "$string:module_test_desc", - "mainElement": "TestAbility", - "deviceTypes": [ - "phone" - ], - "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", - "skills": [ - { - "actions": [ - "action.system.home" - ], - "entities": [ - "entity.system.home" - ] - } - ] - } - ] - } -} diff --git a/commonlibrary/crossplatform/commonlibraryLinkedListetstest/src/main/resources/base/element/color.json b/commonlibrary/crossplatform/commonlibraryLinkedListetstest/src/main/resources/base/element/color.json deleted file mode 100755 index 3c712962d..000000000 --- a/commonlibrary/crossplatform/commonlibraryLinkedListetstest/src/main/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/commonlibrary/crossplatform/commonlibraryLinkedListetstest/src/main/resources/base/element/string.json b/commonlibrary/crossplatform/commonlibraryLinkedListetstest/src/main/resources/base/element/string.json deleted file mode 100755 index 65d8fa5a7..000000000 --- a/commonlibrary/crossplatform/commonlibraryLinkedListetstest/src/main/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/commonlibrary/crossplatform/commonlibraryLinkedListetstest/src/main/resources/base/media/icon.png b/commonlibrary/crossplatform/commonlibraryLinkedListetstest/src/main/resources/base/media/icon.png deleted file mode 100755 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6BLrPFWk?s;$LOP{GmJpBl$qoSA!PUg~PA65-S00{{S`XKG6NkG0RgjEntPrmV+?0|00mu7;+5 zrdpa{2QLqPJ4Y{j7=Mrl{BaxrkdY69+c~(w{Fv-v&aR%aEI&JYSeRTLWm!zbv;?)_ ziZB;fwGbbeL5Q}YLx`J$lp~A09KK8t_z}PZ=4ZzgdeKtgoc+o5EvN9A1K1_<>M?MBqb#!ASf&# zEX?<)!RH(7>1P+j=jqG(58}TVN-$psA6K}atCuI!KTJD&FMmH-78ZejBm)0qc{ESp z|LuG1{QnBUJRg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$`o>_78E}o6+&WR-me$suitQK%DC0rWfK=>oGB|Wx;?X| zbk>P^0=-sSwd^n$_UI(%3w1!l&rdpsW$eLcmsHl;WOIIY>f^%SzA~+u-FEK7j3YTY t+gt7wav|4>NB!sQx;AF^Qrr5Lqp#tg9ev=*S#zc;mal7DUVQM<{{R*>T2BA~ diff --git a/commonlibrary/crossplatform/commonlibraryListetstest/src/main/ets/TestAbility/TestAbility.ets b/commonlibrary/crossplatform/commonlibraryListetstest/src/main/ets/TestAbility/TestAbility.ets deleted file mode 100755 index cb027d692..000000000 --- a/commonlibrary/crossplatform/commonlibraryListetstest/src/main/ets/TestAbility/TestAbility.ets +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright (c) 2023 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. - */ -import UIAbility from '@ohos.app.ability.UIAbility'; -import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; -import hilog from '@ohos.hilog'; -import { Hypium } from '@ohos/hypium'; -import testsuite from '../test/List.test'; -import window from '@ohos.window'; - -export default class TestAbility extends UIAbility { - onCreate(want, 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) ?? ''); - var abilityDelegator: any - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var abilityDelegatorArguments: any - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - hilog.info(0x0000, 'testTag', '%{public}s', 'start run testcase!!!'); - Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) - } - - onDestroy() { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onDestroy'); - } - - onWindowStageCreate(windowStage: window.WindowStage) { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageCreate'); - windowStage.loadContent('TestAbility/pages/Index', (err, data) => { - 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. Data: %{public}s', - JSON.stringify(data) ?? ''); - }); - } - - 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/commonlibrary/crossplatform/commonlibraryListetstest/src/main/ets/TestAbility/pages/Index.ets b/commonlibrary/crossplatform/commonlibraryListetstest/src/main/ets/TestAbility/pages/Index.ets deleted file mode 100755 index 8cbc4b3b9..000000000 --- a/commonlibrary/crossplatform/commonlibraryListetstest/src/main/ets/TestAbility/pages/Index.ets +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (c) 2023 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. - */ -import hilog from '@ohos.hilog'; - -@Entry -@Component -struct Index { - aboutToAppear() { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility index aboutToAppear'); - } - @State message: string = 'Hello World' - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Button() { - Text('next page') - .fontSize(20) - .fontWeight(FontWeight.Bold) - }.type(ButtonType.Capsule) - .margin({ - top: 20 - }) - .backgroundColor('#0D9FFB') - .width('35%') - .height('5%') - .onClick(()=>{ - }) - } - .width('100%') - } - .height('100%') - } - } \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryListetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/commonlibrary/crossplatform/commonlibraryListetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts deleted file mode 100755 index 92a16d84e..000000000 --- a/commonlibrary/crossplatform/commonlibraryListetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts +++ /dev/null @@ -1,49 +0,0 @@ -import hilog from '@ohos.hilog'; -import TestRunner from '@ohos.application.testRunner'; -import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; - -var abilityDelegator = undefined -var abilityDelegatorArguments = undefined - -async function onAbilityCreateCallback() { - hilog.info(0x0000, 'testTag', '%{public}s', 'onAbilityCreateCallback'); -} - -async function addAbilityMonitorCallback(err: any) { - 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() { - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun run'); - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var testAbilityName = abilityDelegatorArguments.bundleName + '.TestAbility' - let lMonitor = { - abilityName: testAbilityName, - onAbilityCreate: onAbilityCreateCallback, - }; - abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) - var cmd = 'aa start -d 0 -a TestAbility' + ' -b ' + abilityDelegatorArguments.bundleName - var debug = abilityDelegatorArguments.parameters['-D'] - if (debug == 'true') - { - cmd += ' -D' - } - hilog.info(0x0000, 'testTag', 'cmd : %{public}s', cmd); - abilityDelegator.executeShellCommand(cmd, - (err: any, d: any) => { - hilog.info(0x0000, 'testTag', 'executeShellCommand : err : %{public}s', JSON.stringify(err) ?? ''); - hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.stdResult ?? ''); - hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.exitCode ?? ''); - }) - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun end'); - } -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryListetstest/src/main/ets/test/List.test.ets b/commonlibrary/crossplatform/commonlibraryListetstest/src/main/ets/test/List.test.ets deleted file mode 100755 index 62981d246..000000000 --- a/commonlibrary/crossplatform/commonlibraryListetstest/src/main/ets/test/List.test.ets +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Copyright (c) 2023 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. - */ -import ListTest from './List2.test' - -export default function testsuite() { - ListTest() -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryListetstest/src/main/ets/test/List2.test.ets b/commonlibrary/crossplatform/commonlibraryListetstest/src/main/ets/test/List2.test.ets deleted file mode 100755 index 5f018af8c..000000000 --- a/commonlibrary/crossplatform/commonlibraryListetstest/src/main/ets/test/List2.test.ets +++ /dev/null @@ -1,1271 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import List from "@ohos.util.List"; -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' -export default function ListTest() { - describe("ListTest", function () { - - /** - * @tc.number: TEST_CONSTRUCTOR_001 - * @tc.name : testConstructor001 - * @tc.desc : Create an List instance. For example: let list = new List(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testConstructor001", 0, function () { - try { - let list = new List(); - expect(list != undefined).assertEqual(true); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200012); - expect(err.message).assertEqual("The List's constructor cannot be directly invoked"); - } - }); - - /** - * @tc.number: TEST_LENGTH_001 - * @tc.name : testLength001 - * @tc.desc : Get the number of elements contained in the List instance. For example: list.length. - * @tc.size : MediumTest - * @tc.type : Field - * @tc.level : Level 1 - */ - it("testLength001", 0, function () { - let list = new List(); - list.add(4); - list.add(3); - list.add(1); - list.add(2); - list.add(14); - let res = list.length; - expect(res).assertEqual(5); - }); - - /** - * @tc.number: TEST_ADD_001 - * @tc.name : testAdd001 - * @tc.desc : Add a element to the end of the List instance. For example: list.add(8). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd001", 0, function () { - let list = new List(); - list.add(8); - let res = list.get(0); - expect(res).assertEqual(8); - }); - - /** - * @tc.number: TEST_ADD_002 - * @tc.name : testAdd002 - * @tc.desc : Add a element to the end of the List instance. - * For example: let a = [1, 2, 3, 4]; list.add(a). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd002", 0, function () { - let list = new List(); - let a = [1, 2, 3, 4]; - list.add(a); - let res = list.get(0); - expect(res).assertEqual(a); - }); - - /** - * @tc.number: TEST_ADD_003 - * @tc.name : testAdd003 - * @tc.desc : Add a element to the end of the List instance. - * For example: let a = {name: "lala", age: "13"}; list.add(a). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd003", 0, function () { - let list = new List(); - let a = {name: "lala", age: "13"}; - list.add(a); - let res = list.get(0); - expect(res).assertEqual(a); - }); - /** - * @tc.number: TEST_ADD_004 - * @tc.name : testAdd004 - * @tc.desc : Add a element to the end of the List instance. For example: list.add("*"). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd004", 0, function () { - let list = new List(); - list.add("."); - list.add("*"); - list.add("|"); - let res = list.get(0); - expect(res).assertEqual("."); - }); - - /** - * @tc.number: TEST_ADD_005 - * @tc.name : testAdd005 - * @tc.desc : Add a element to the end of the List instance. For example: list.add("*"). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd005", 0, function () { - let list = new List(); - list.add("."); - list.add("*"); - list.add("|"); - let arr = []; - list.forEach((item, index) => { - arr.push(item); - }); - let a = [".", "*", "|"]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number: TEST_ADD_006 - * @tc.name : testAdd006 - * @tc.desc : Add a element to the end of the List instance. For example: list.add(" "). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd006", 0, function () { - let list = new List(); - list.add(" "); - let res = list.get(0); - expect(res).assertEqual(" "); - }); - - /** - * @tc.number: TEST_ADD_007 - * @tc.name : testAdd007 - * @tc.desc : Add a element to the end of the List instance. For example: list.add("a"). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd007", 0, function () { - let list = new List(); - list.add("a"); - list.add("a"); - let res = list.get(0); - let res1 = list.get(1); - expect(res).assertEqual("a"); - expect(res1).assertEqual("a"); - }); - /** - * @tc.number: TEST_ADD_008 - * @tc.name : testAdd008 - * @tc.desc : Add a element to the end of the List instance. For example: for (let i = 0; i < 100; i++) {list.add(i);}. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd008", 0, function () { - let list = new List(); - for (let i = 0; i < 100; i++) { - list.add(i); - } - let res = list.get(99); - let res1 = list.length; - expect(res).assertEqual(99); - expect(res1).assertEqual(100); - }); - - /** - * @tc.number: TEST_ADD_009 - * @tc.name : testAdd009 - * @tc.desc : Add a element to the end of the List instance. For example: list.add(null). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd009", 0, function () { - let list = new List(); - list.add(null); - let res = list.get(0); - expect(res).assertEqual(null); - }); - - /** - * @tc.number: TEST_ADD_010 - * @tc.name : testAdd010 - * @tc.desc : Add a element to the end of the List instance. For example: list.add(0.1111). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd010", 0, function () { - let list = new List(); - list.add(0.1111); - let res = list.get(0); - expect(res).assertEqual(0.1111); - }); - - /** - * @tc.number: TEST_ADD_011 - * @tc.name : testAdd011 - * @tc.desc : Add a element to the end of the List instance. For example: list.add(-1). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd011", 0, function () { - let list = new List(); - list.add(-1); - let res = list.get(0); - expect(res).assertEqual(-1); - }); - - /** - * @tc.number: TEST_ADD_012 - * @tc.name : testAdd012 - * @tc.desc : Add a element to the end of the List instance. For example: const obj = {}; list.add(obj). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd012", 0, function () { - let list = new List(); - const obj = {}; - list.add(obj); - let res = list.get(0); - expect(res).assertEqual(obj); - }); - - /** - * @tc.number: TEST_ADD_013 - * @tc.name : testAdd013 - * @tc.desc : Add a element to the end of the List instance. For example: list.add.bind({}, "a")(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it('testAdd013', 0, function () { - let list = new List(); - try { - list.add.bind({}, "a")(); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200011); - expect(err.message).assertEqual(`The add method cannot be bound`); - } - }); - - /** - * @tc.number: TEST_INSERT_001 - * @tc.name : testInsert001 - * @tc.desc : Insert an element into the middle of the List instance. For example: list.insert("d", 3). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testInsert001", 0, function () { - let list = new List(); - list.add("a"); - list.add("b"); - list.add("c"); - list.add("a"); - list.add("b"); - list.insert("d", 3); - let arr = []; - list.forEach((item, index) => { - arr.push(item); - }); - let a = ["a", "b", "c", "d", "a", "b"]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number: TEST_INSERT_002 - * @tc.name : testInsert002 - * @tc.desc : Insert an element into the middle of the List instance. For example: list.insert("d", 8). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testInsert002", 0, function () { - let list = new List(); - list.add("a"); - list.add("b"); - list.add("c"); - list.add("a"); - list.add("b"); - try { - let res = list.insert("d", 8); - expect(true).assertEqual(false); - } catch(err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200001); - expect(err.message).assertEqual(`The value of "index" is out of range. It must be >= 0 && <= 5. Received value is: 8`); - } - }); - - /** - * @tc.number: TEST_GET_001 - * @tc.name : testGet001 - * @tc.desc : Gets the element corresponding to the specified index. For example: list.get(0). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGet001", 0, function () { - let list = new List(); - list.add("四"); - let res = list.get(0); - expect(res).assertEqual("四"); - }); - - /** - * @tc.number: TEST_GET_002 - * @tc.name : testGet002 - * @tc.desc : Gets the element corresponding to the specified index. For example: list.get(2). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGet002", 0, function () { - let list = new List(); - list.add("a"); - list.add("b"); - list.add("c"); - list.add("a"); - list.add("b"); - list.add("b"); - let res = list.get(2); - expect(res).assertEqual("c"); - }); - - /** - * @tc.number: TEST_GET_003 - * @tc.name : testGet003 - * @tc.desc : Gets the element corresponding to the specified index. For example: list.get(6). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGet003", 0, function () { - let list = new List(); - list.add("a"); - list.add("b"); - list.add("c"); - list.add("a"); - list.add("b"); - list.add("b"); - let res = list.get(6); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_GET_004 - * @tc.name : testGet004 - * @tc.desc : Gets the element corresponding to the specified index. For example: list.get(1). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGet004", 0, function () { - let list = new List(); - let res = list.get(1); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_GET_005 - * @tc.name : testGet005 - * @tc.desc : Gets the element corresponding to the specified index. For example: list.get.bind({}, 1)(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGet005", 0, function () { - let list = new List(); - try { - list.get.bind({}, 1)(); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200011); - expect(err.message).assertEqual(`The get method cannot be bound`); - } - }); - - /** - * @tc.number: TEST_HAS_001 - * @tc.name : testHas001 - * @tc.desc : Check whether the List contains a specified element. For example: list.has("a"). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testHas001", 0, function () { - let list = new List(); - list.add("a"); - list.add("b"); - list.add("c"); - let res = list.has("a"); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_HAS_002 - * @tc.name : testHas002 - * @tc.desc : Check whether the List contains a specified element. For example: list.has("d"). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testHas002", 0, function () { - let list = new List(); - list.add("a"); - list.add("b"); - list.add("c"); - let res = list.has("d"); - expect(res).assertEqual(false); - }); - - /** - * @tc.number: TEST_HAS_003 - * @tc.name : testHas003 - * @tc.desc : Check whether the List contains a specified element. For example: list.has(1). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testHas003", 0, function () { - let list = new List(); - let res = list.has(1); - expect(res).assertEqual(false); - }); - - /** - * @tc.number: TEST_GET_INDEX_OF_001 - * @tc.name : testGetIndexOf001 - * @tc.desc : In the List instance, find the index of a specified element from front to back, - * and return the index found for the first time. If not found, return -1. For example: list.getIndexOf("b"). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetIndexOf001", 0, function () { - let list = new List(); - list.add("a"); - list.add("b"); - list.add("c"); - list.add("a"); - list.add("b"); - list.add("b"); - let res = list.getIndexOf("b"); - expect(res).assertEqual(1); - }); - - /** - * @tc.number: TEST_GET_INDEX_OF_002 - * @tc.name : testGetIndexOf002 - * @tc.desc : In the List instance, find the index of a specified element from front to back, - * and return the index found for the first time. If not found, return -1. For example: list.getIndexOf("b"). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetIndexOf002", 0, function () { - let list = new List(); - let res = list.getIndexOf(1); - expect(res).assertEqual(-1); - }); - - /** - * @tc.number: TEST_REMOVE_BY_INDEX_001 - * @tc.name : testRemoveByIndex001 - * @tc.desc : In the List instance, delete the element based on its index. For example: list.removeByIndex(2). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testRemoveByIndex001", 0, function () { - let list = new List(); - list.add("a"); - list.add("b"); - list.add("c"); - list.add("a"); - list.add("b"); - list.removeByIndex(2); - let arr = []; - list.forEach((item, index) => { - arr.push(item); - }); - let a = ["a", "b", "a", "b"]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number: TEST_REMOVE_BY_INDEX_002 - * @tc.name : testRemoveByIndex002 - * @tc.desc : In the List instance, delete the element based on its index. For example: list.removeByIndex(5). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testRemoveByIndex002", 0, function () { - let list = new List(); - list.add("a"); - list.add("b"); - list.add("c"); - list.add("a"); - list.add("b"); - try { - let res = list.removeByIndex(5); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200001); - expect(err.message).assertEqual(`The value of "index" is out of range. It must be >= 0 && <= 4. Received value is: 5`); - } - }); - - /** - * @tc.number: TEST_REMOVE_BY_INDEX_003 - * @tc.name : testRemoveByIndex003 - * @tc.desc : In the List instance, delete the element based on its index. For example: list.removeByIndex(1). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testRemoveByIndex003", 0, function () { - let list = new List(); - try { - let res = list.removeByIndex(1); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200001); - expect(err.message).assertEqual(`The value of "index" is out of range. It must be >= 0 && <= 0. Received value is: 1`); - } - }); - - /** - * @tc.number: TEST_REMOVE_001 - * @tc.name : testRemove001 - * @tc.desc : Delete the specified element. For example: list.remove("a"). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testRemove001", 0, function () { - let list = new List(); - list.add("a"); - list.add("b"); - list.add("c"); - list.add("a"); - list.add("b"); - let res = list.remove("a"); - let arr = []; - list.forEach((item, index) => { - arr.push(item); - }); - let a = ["b", "c", "a", "b"]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number: TEST_GET_LAST_INDEX_OF_001 - * @tc.name : testGetLastIndexOf001 - * @tc.desc : In the List instance, find the index of a specified element from brack to front, - * and return the index found for the first time. If not found, return -1. For example: list.getLastIndexOf("a"). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetLastIndexOf001", 0, function () { - let list = new List(); - list.add("a"); - list.add("b"); - list.add("c"); - list.add("a"); - list.add("b"); - list.add("b"); - let res = list.getLastIndexOf("a"); - expect(res).assertEqual(3); - }); - - /** - * @tc.number: TEST_GET_LAST_INDEX_OF_002 - * @tc.name : testGetLastIndexOf002 - * @tc.desc : In the List instance, find the index of a specified element from brack to front, - * and return the index found for the first time. If not found, return -1. For example: list.getLastIndexOf("F"). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetLastIndexOf002", 0, function () { - let list = new List(); - list.add("a"); - list.add("b"); - list.add("c"); - list.add("a"); - list.add("b"); - list.add("b"); - let res = list.getLastIndexOf("F"); - expect(res).assertEqual(-1); - }); - - /** - * @tc.number: TEST_GET_FIRST_001 - * @tc.name : testGetFirst001 - * @tc.desc : Get the header element of the List instance. For example: list.getFirst(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetFirst001", 0, function () { - let list = new List(); - list.add("a"); - list.add("b"); - list.add("c"); - list.add("a"); - list.add("b"); - let res = list.getFirst(); - expect(res).assertEqual("a"); - }); - - /** - * @tc.number: TEST_GET_FIRST_001 - * @tc.name : testGetFirst001 - * @tc.desc : Get the header element of the List instance. For example: list.getFirst(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetFirst002", 0, function () { - let list = new List(); - let res = list.getFirst(); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_GET_LAST_001 - * @tc.name : testGetLast001 - * @tc.desc : Get the end element of the List instance. For example: list.getLast(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetLast001", 0, function () { - let list = new List(); - list.add("a"); - list.add("b"); - list.add("c"); - list.add("a"); - list.add("b"); - let res = list.getLast(); - expect(res).assertEqual("b"); - }); - - /** - * @tc.number: TEST_GET_LAST_001 - * @tc.name : testGetLast001 - * @tc.desc : Get the end element of the List instance. For example: list.getLast(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetLast002", 0, function () { - let list = new List(); - let res = list.getLast(); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_SET_001 - * @tc.name : testSet001 - * @tc.desc : Modify the element corresponding to the specified index. For example: list.set(2, "d"). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSet001", 0, function () { - let list = new List(); - list.add("a"); - list.add("b"); - list.add("c"); - list.add("a"); - list.set(2, "d"); - let res1 = list.get(2); - expect(res1).assertEqual("d"); - }); - - /** - * @tc.number: TEST_SET_002 - * @tc.name : testSet002 - * @tc.desc : Modify the element corresponding to the specified index. For example: list.set(6, "d"). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSet002", 0, function () { - let list = new List(); - list.add("a"); - list.add("b"); - list.add("c"); - try { - list.set(6, "d"); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200001); - expect(err.message).assertEqual(`The value of "index" is out of range. It must be >= 0 && <= 2. Received value is: 6`); - } - }); - - /** - * @tc.number: TEST_EQUAL_001 - * @tc.name : testEqual001 - * @tc.desc : Judge whether two List instances are equal. For example: let res = list.equal(list1). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEqual001", 0, function () { - let list = new List(); - let list1 = new List(); - list.add("a"); - list.add("b"); - list.add("c"); - list1.add("a"); - list1.add("b"); - list1.add("d"); - let res = list.equal(list1); - expect(res).assertEqual(false); - }); - - /** - * @tc.number: TEST_EQUAL_002 - * @tc.name : testEqual002 - * @tc.desc : Judge whether two List instances are equal. For example: let res = list.equal(list1). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEqual002", 0, function () { - let list = new List(); - let list1 = new List(); - list.add("a"); - list.add("b"); - list.add("c"); - list1.add("a"); - list1.add("b"); - list1.add("c"); - let res = list.equal(list1); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_EQUAL_003 - * @tc.name : testEqual003 - * @tc.desc : Judge whether two List instances are equal. For example: let res = list.equal(list1). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEqual003", 0, function () { - let list = new List(); - let list1 = new List(); - list.add("a"); - list.add("b"); - list.add("c"); - list1.add("a"); - list1.add("b"); - let res = list.equal(list1); - expect(res).assertEqual(false); - }); - - /** - * @tc.number: TEST_EQUAL_004 - * @tc.name : testEqual004 - * @tc.desc : Judge whether two List instances are equal. For example: let res = list.equal(list1). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEqual004", 0, function () { - let list = new List(); - let list1 = new List(); - let res = list.equal(list1); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_FOR_EACH_001 - * @tc.name : testForEach001 - * @tc.desc : Traversing elements in an List instance. For example: list.forEach((item, index) => {arr.push(item);}). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testForEach001", 0, function () { - let list = new List(); - let c = [1, 2, 3, 4]; - list.add(8); - list.add("一"); - list.add("二"); - list.add(5); - list.add(c); - list.add(6); - list.add("三"); - list.add("四"); - let arr = []; - list.forEach((item, index) => { - arr.push(item); - }); - let a = [8, "一", "二", 5, c, 6, "三", "四"]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number: TEST_FOR_EACH_002 - * @tc.name : testForEach002 - * @tc.desc : Traversing elements in an List instance. For example: list.forEach((item, index) => {num++;}). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testForEach002", 0, function () { - let list = new List(); - let num = 0; - list.forEach((item, index) => { - num++; - }); - expect(num).assertEqual(0); - }); - - /** - * @tc.number: TEST_FOR_EACH_003 - * @tc.name : testForEach003 - * @tc.desc : Traversing elements in an List instance. For example: list.forEach.bind({}, "a")(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it('testForEach003', 0, function () { - let list = new List(); - try { - list.forEach.bind({}, "a")(); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200011); - expect(err.message).assertEqual(`The forEach method cannot be bound`); - } - }); - - /** - * @tc.number: TEST_SORT_001 - * @tc.name : testSort001 - * @tc.desc : Arrange the elements in the List instance in descending order. For example: list.sort((a, b) => a - b). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSort001", 0, function () { - let list = new List(); - list.add(4); - list.add(3); - list.add(1); - list.add(2); - list.add(14); - list.sort((a:any, b:any) => a - b); - let arr = []; - list.forEach((item, index) => { - arr.push(item); - }); - let a = [1, 2, 3, 4, 14]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number: TEST_SORT_002 - * @tc.name : testSort002 - * @tc.desc : Arrange the elements in the List instance in descending order. For example: list.sort((a, b) => a - b). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSort002", 0, function () { - let list = new List(); - list.add(";"); - list.add("一"); - list.add("a"); - list.add("1"); - list.add("2"); - list.add("14"); - list.sort((a:any, b:any) => a - b); - let arr = []; - list.forEach((item, index) => { - arr.push(item); - }); - let a = [";", "一", "a", "1", "2", "14"]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number: TEST_SORT_003 - * @tc.name : testSort003 - * @tc.desc : Arrange the elements in the List instance in descending order. For example: list.sort((a, b) => a - b). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSort003", 0, function () { - let list = new List(); - list.sort((a:any, b:any) => a - b); - let res1 = list.length; - expect(res1).assertEqual(0); - }); - - /** - * @tc.number: TEST_CLEAR_001 - * @tc.name : testClear001 - * @tc.desc : Clear all elements in the List instance. For example: list.clear(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testClear001", 0, function () { - let list = new List(); - list.add("a"); - list.add("b"); - list.add("c"); - list.add("a"); - list.clear(); - let res = list.length; - expect(res).assertEqual(0); - }); - - /** - * @tc.number: TEST_CLEAR_002 - * @tc.name : testClear002 - * @tc.desc : Clear all elements in the List instance. For example: list.clear(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testClear002", 0, function () { - let list = new List(); - list.clear(); - let res1 = list.length; - expect(res1).assertEqual(0); - }); - - /** - * @tc.number: TEST_GET_SUBLIST_001 - * @tc.name : testGetSubList001 - * @tc.desc : Intercepts an element within the specified range, including the element with the - * starting index but not the element with the ending index. For example: list.getSubList(2, 4). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetSubList001", 0, function () { - let list = new List(); - list.add(4); - list.add(3); - list.add(1); - list.add(2); - list.add(14); - let res = list.getSubList(2, 4); - let arr = []; - res.forEach((item, index) => { - arr.push(item); - }); - let a = [1, 2]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number: TEST_GET_SUBLIST_002 - * @tc.name : testGetSubList002 - * @tc.desc : Intercepts an element within the specified range, including the element with the - * starting index but not the element with the ending index. For example: list.getSubList(2, 8). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetSubList002", 0, function () { - let list = new List(); - list.add("4"); - list.add("3"); - list.add("1"); - list.add("2"); - list.add("14"); - try { - list.getSubList(2, 8); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200001); - expect(err.message).assertEqual(`The value of "toIndex" is out of range. It must be >= 0 && <= 5. Received value is: 8`); - } - }); - - /** - * @tc.number: TEST_GET_SUBLIST_003 - * @tc.name : testGetSubList003 - * @tc.desc : Intercepts an element within the specified range, including the element with the - * starting index but not the element with the ending index. For example: list.getSubList(6, 8). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetSubList003", 0, function () { - let list = new List(); - list.add("4"); - list.add("3"); - list.add("1"); - list.add("2"); - list.add("14"); - try { - list.getSubList(6, 8); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200001); - expect(err.message).assertEqual(`The value of "fromIndex" is out of range. It must be >= 0 && <= 4. Received value is: 6`); - } - }); - - /** - * @tc.number: TEST_GET_SUBLIST_004 - * @tc.name : testGetSubList004 - * @tc.desc : Intercepts an element within the specified range, including the element with the - * starting index but not the element with the ending index. For example: list.getSubList(6, 2). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetSubList004", 0, function () { - let list = new List(); - list.add("4"); - list.add("3"); - list.add("1"); - list.add("2"); - list.add("14"); - try { - list.getSubList(6, 2); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200001); - expect(err.message).assertEqual(`The value of "fromIndex" is out of range. It must be >= 0 && <= 1. Received value is: 6`); - } - }); - - /** - * @tc.number: TEST_REPLACE_ALL_ELEMENTS_001 - * @tc.name : testReplaceAllElements001 - * @tc.desc : Perform some operation on the elements in the List instance and return the List instance - * after the operation. For example: list.replaceAllElements((item, index) => {return (item = 2 * item);}). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testReplaceAllElements001", 0, function () { - let list = new List(); - list.add(1); - list.add(2); - list.add(4); - list.add(5); - list.replaceAllElements((item:number, index) => { - return (item = 2 * item); - }); - let arr = []; - list.forEach((item, index) => { - arr.push(item); - }); - let a = [2, 4, 8, 10]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number: TEST_REPLACE_ALL_ELEMENTS_002 - * @tc.name : testReplaceAllElements002 - * @tc.desc : Perform some operation on the elements in the List instance and return the List instance - * after the operation. For example: list.replaceAllElements((item, index) => {num++;}). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testReplaceAllElements002", 0, function () { - let list = new List(); - let num = 0; - list.replaceAllElements((item, index) => { - num++; - }); - expect(num).assertEqual(0); - }); - - /** - * @tc.number: TEST_CONVERT_TO_ARRAY_001 - * @tc.name : testConvertToArray001 - * @tc.desc : Convert an List instance to an array. For example: list.convertToArray(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testConvertToArray001", 0, function () { - let list = new List(); - list.add(4); - list.add(3); - list.add(1); - list.add(2); - list.add(14); - let res = list.convertToArray(); - - let a = [4, 3, 1, 2, 14]; - for (let i = 0; i < a.length; i++) { - expect(res[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number: TEST_CONVERT_TO_ARRAY_002 - * @tc.name : testConvertToArray002 - * @tc.desc : Convert an List instance to an array. For example: list.convertToArray(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testConvertToArray002", 0, function () { - let list = new List(); - const res = list.convertToArray(); - expect(res.length).assertEqual(0); - }); - - /** - * @tc.number: TEST_IS_EMPTY_001 - * @tc.name : testIsEmpty001 - * @tc.desc : Determine whether the List instance is empty. For example: list.isEmpty(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsEmpty001", 0, function () { - let list = new List(); - list.add(8); - list.add("一"); - list.add("二"); - list.add(5); - let c = [1, 2, 3, 4]; - list.add(c); - list.add(6); - list.add("三"); - list.add("四"); - let res = list.isEmpty(); - expect(res).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_EMPTY_002 - * @tc.name : testIsEmpty002 - * @tc.desc : Determine whether the List instance is empty. For example: list.isEmpty(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsEmpty002", 0, function () { - let list = new List(); - let res = list.isEmpty(); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_EMPTY_003 - * @tc.name : testIsEmpty003 - * @tc.desc : Determine whether the List instance is empty. For example: list.isEmpty.bind({}, "a")(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsEmpty003", 0, function () { - let list = new List(); - try { - list.isEmpty.bind({}, "a")(); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200011); - expect(err.message).assertEqual(`The isEmpty method cannot be bound`); - } - }); - - /** - * @tc.number: TEST_ITERATOR_001 - * @tc.name : testIterator001 - * @tc.desc : Iterates over all elements in an List instance. For example: List[Symbol.iterator](). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIterator001", 0, function () { - let list = new List(); - list.add("a"); - list.add("b"); - list.add("c"); - list.add("a"); - list.add("b"); - list.removeByIndex(2); - let arr = []; - let itr = list[Symbol.iterator](); - let tmp = undefined; - do { - tmp = itr.next().value; - arr.push(tmp); - } while (tmp != undefined); - let a = ["a", "b", "a", "b"]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - - - }) -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryListetstest/src/main/module.json b/commonlibrary/crossplatform/commonlibraryListetstest/src/main/module.json deleted file mode 100755 index a4443e713..000000000 --- a/commonlibrary/crossplatform/commonlibraryListetstest/src/main/module.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "module": { - "name": "entry_test", - "type": "feature", - "description": "$string:module_test_desc", - "mainElement": "TestAbility", - "deviceTypes": [ - "phone" - ], - "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", - "skills": [ - { - "actions": [ - "action.system.home" - ], - "entities": [ - "entity.system.home" - ] - } - ] - } - ] - } -} diff --git a/commonlibrary/crossplatform/commonlibraryListetstest/src/main/resources/base/element/color.json b/commonlibrary/crossplatform/commonlibraryListetstest/src/main/resources/base/element/color.json deleted file mode 100755 index 3c712962d..000000000 --- a/commonlibrary/crossplatform/commonlibraryListetstest/src/main/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/commonlibrary/crossplatform/commonlibraryListetstest/src/main/resources/base/element/string.json b/commonlibrary/crossplatform/commonlibraryListetstest/src/main/resources/base/element/string.json deleted file mode 100755 index 65d8fa5a7..000000000 --- a/commonlibrary/crossplatform/commonlibraryListetstest/src/main/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/commonlibrary/crossplatform/commonlibraryListetstest/src/main/resources/base/media/icon.png b/commonlibrary/crossplatform/commonlibraryListetstest/src/main/resources/base/media/icon.png deleted file mode 100755 index e69de29bb..000000000 diff --git a/commonlibrary/crossplatform/commonlibraryListetstest/src/main/resources/base/profile/test_pages.json b/commonlibrary/crossplatform/commonlibraryListetstest/src/main/resources/base/profile/test_pages.json deleted file mode 100755 index 77e90731b..000000000 --- a/commonlibrary/crossplatform/commonlibraryListetstest/src/main/resources/base/profile/test_pages.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "src": [ - "TestAbility/pages/Index" - ] -} diff --git a/commonlibrary/crossplatform/commonlibraryTreeMapetstest/AppScope/app.json b/commonlibrary/crossplatform/commonlibraryTreeMapetstest/AppScope/app.json deleted file mode 100644 index 5a0fb344e..000000000 --- a/commonlibrary/crossplatform/commonlibraryTreeMapetstest/AppScope/app.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "app": { - "bundleName": "ohos.acts.commonlibrary.crossplatform.TreeMap.normal", - "vendor": "example", - "versionCode": 1000000, - "versionName": "1.0.0", - "icon": "$media:app_icon", - "label": "$string:app_name", - "minAPIVersion": 10, - "targetAPIVersion": 10, - "car": { - "apiCompatibleVersion": 10, - "singleUser": false - } - } -} diff --git a/commonlibrary/crossplatform/commonlibraryTreeMapetstest/AppScope/resources/base/element/string.json b/commonlibrary/crossplatform/commonlibraryTreeMapetstest/AppScope/resources/base/element/string.json deleted file mode 100644 index 3811bc441..000000000 --- a/commonlibrary/crossplatform/commonlibraryTreeMapetstest/AppScope/resources/base/element/string.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "xtsDemo1" - } - ] -} diff --git a/commonlibrary/crossplatform/commonlibraryTreeMapetstest/AppScope/resources/base/media/app_icon.png b/commonlibrary/crossplatform/commonlibraryTreeMapetstest/AppScope/resources/base/media/app_icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6BLrPFWk?s;$LOP{GmJpBl$qoSA!PUg~PA65-S00{{S`XKG6NkG0RgjEntPrmV+?0|00mu7;+5 zrdpa{2QLqPJ4Y{j7=Mrl{BaxrkdY69+c~(w{Fv-v&aR%aEI&JYSeRTLWm!zbv;?)_ ziZB;fwGbbeL5Q}YLx`J$lp~A09KK8t_z}PZ=4ZzgdeKtgoc+o5EvN9A1K1_<>M?MBqb#!ASf&# zEX?<)!RH(7>1P+j=jqG(58}TVN-$psA6K}atCuI!KTJD&FMmH-78ZejBm)0qc{ESp z|LuG1{QnBUJRg_E=h1#XMWt2%fcoN@l7eAS!Es?Q+;XsRNPhiiE=@AqlLkJzF`O18 zbsbSmKN=aaq8k3NFYZfDWpKmM!coBU0(XnL8R{4=i|wi{!uWYM2je{U{B*K2PVdu&=E zTq*-XsEsJ$u5H4g6DIm2Y!DN`>^v|AqlwuCD;w45K0@eqauiqWf7l&o)+YLHm~|L~ z7$0v5mkobriU!H<@mVJHLlmQqzQ3d6Rh_-|%Yy2li*tHO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AqwG+g(nJ z)@o&{RbEe{(`Z(znn6u5Y$RfkqM-uupgKCDw_&vqSrdv`obgIS9cAKhZ^Y<#I5YrN z2Qgr;an@4ikPn9fR(81L{#P0Hk-GMqv&pOI!N3^)O zvZ^%dMfF|+V{LKR(jRSABd}MEA~3E+lrU#ZX4D2O2;xNb6>KaV^#|)Hw+*pIOdif% z+f*La&}K)KkHBHhpw%`RDsiQTpRGfzu#SLXuGWghU=vG#3af%q>ab`L6RD%haZkBc z=d-FDMkojnWre|y1aY4ypon|bRHG)s5OLIs6@eNv$9P$_6~;JYWfWFalfkM$5nV^c z;h-L&oNfWiR~1y2G|5vIL?AemTrx_D&@ zzPt1r(WhUZqJ*>TFXg`f`*!QP^l>NORGt-4D^HDoYr73pfLtEVPgU@cx;`A@xyRogU^9y9H z=c4zUE4yxASuH788|l>i!J+D>odPyP!*+v8nmk zb*JoU*K~?@n0Qn_}5} zzOCS3TP>IQ$?)old?~;q1Y9jw0DW?Y+x_B(%@=A8uianJF=F+(kw?qAro6s%rYc^y zbL%AemhKN}@w9-mfZZqr)8C!`Q+nRsX=%1GJ67LrUjsl`C%ITifan>-tHI?TP!SkqhkVjL<59SO<@)WB#M2sL+v0^BXlIGJ<#3xW_>Xxrg zZ$6Nt+PC7P9ra&cgP$u9U!C~&t=}I^Q;R`Q0V+56{ZId;QFnHQ&h{+ueW| zCQgs#$p68y$BNsq6Gr4u0i+OwF8)Nl?3e7#CBM2`=C9v#x@61M<5{OKWM5t6&9d|w z9ha9co#5}p{@s1ObL^+rFO25J>eMqdx2G(;)z+CW?|ZLi?}zKxXPpSX&@(PE>E0Wc z%&Wt_Yly3ilU?omNcr{)pBF+20m75)MgGzN8lOrT2T#MzudyjMMNJ&0=@(8`KFY}o0HQL>4NbI)|uP!`s sGPj)JL(b02^3aBAa!0sXpS0RR91 diff --git a/commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/ets/TestAbility/TestAbility.ets b/commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/ets/TestAbility/TestAbility.ets deleted file mode 100644 index 368aef919..000000000 --- a/commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/ets/TestAbility/TestAbility.ets +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import UIAbility from '@ohos.app.ability.UIAbility'; -import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; -import hilog from '@ohos.hilog'; -import { Hypium } from '@ohos/hypium'; -import testsuite from '../test/List.test'; -import window from '@ohos.window'; - -export default class TestAbility extends UIAbility { - onCreate(want, 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) ?? ''); - var abilityDelegator: any - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var abilityDelegatorArguments: any - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - hilog.info(0x0000, 'testTag', '%{public}s', 'start run testcase!!!'); - Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) - } - - onDestroy() { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onDestroy'); - } - - onWindowStageCreate(windowStage: window.WindowStage) { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageCreate'); - windowStage.loadContent('TestAbility/pages/Index', (err, data) => { - 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. Data: %{public}s', - JSON.stringify(data) ?? ''); - }); - } - - 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/commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/ets/TestAbility/pages/Index.ets b/commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/ets/TestAbility/pages/Index.ets deleted file mode 100644 index e95640899..000000000 --- a/commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/ets/TestAbility/pages/Index.ets +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import hilog from '@ohos.hilog'; - -@Entry -@Component -struct Index { - aboutToAppear() { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility index aboutToAppear'); - } - @State message: string = 'Hello World' - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Button() { - Text('next page') - .fontSize(20) - .fontWeight(FontWeight.Bold) - }.type(ButtonType.Capsule) - .margin({ - top: 20 - }) - .backgroundColor('#0D9FFB') - .width('35%') - .height('5%') - .onClick(()=>{ - }) - } - .width('100%') - } - .height('100%') - } - } \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts deleted file mode 100644 index 92a16d84e..000000000 --- a/commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts +++ /dev/null @@ -1,49 +0,0 @@ -import hilog from '@ohos.hilog'; -import TestRunner from '@ohos.application.testRunner'; -import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; - -var abilityDelegator = undefined -var abilityDelegatorArguments = undefined - -async function onAbilityCreateCallback() { - hilog.info(0x0000, 'testTag', '%{public}s', 'onAbilityCreateCallback'); -} - -async function addAbilityMonitorCallback(err: any) { - 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() { - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun run'); - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var testAbilityName = abilityDelegatorArguments.bundleName + '.TestAbility' - let lMonitor = { - abilityName: testAbilityName, - onAbilityCreate: onAbilityCreateCallback, - }; - abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) - var cmd = 'aa start -d 0 -a TestAbility' + ' -b ' + abilityDelegatorArguments.bundleName - var debug = abilityDelegatorArguments.parameters['-D'] - if (debug == 'true') - { - cmd += ' -D' - } - hilog.info(0x0000, 'testTag', 'cmd : %{public}s', cmd); - abilityDelegator.executeShellCommand(cmd, - (err: any, d: any) => { - hilog.info(0x0000, 'testTag', 'executeShellCommand : err : %{public}s', JSON.stringify(err) ?? ''); - hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.stdResult ?? ''); - hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.exitCode ?? ''); - }) - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun end'); - } -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/ets/test/List.test.ets b/commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/ets/test/List.test.ets deleted file mode 100644 index 5a7752173..000000000 --- a/commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/ets/test/List.test.ets +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (c) 2023 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. - */ -import TreeMapTest from './TreeMap.test' - -export default function testsuite() { - TreeMapTest() -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/ets/test/TreeMap.test.ets b/commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/ets/test/TreeMap.test.ets deleted file mode 100644 index 3d20a2031..000000000 --- a/commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/ets/test/TreeMap.test.ets +++ /dev/null @@ -1,732 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import TreeMap from "@ohos.util.TreeMap"; -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' -export default function TreeMapTest() { -describe("TreeMapTest", function () { - - /** - * @tc.number: TEST_CONSTRUCTOR_001 - * @tc.name : testConstructor001 - * @tc.desc : Create an TreeMap instance. For example: let treeMap = new TreeMap(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testConstructor001", 0, function () { - try { - let treeMap = new TreeMap(); - expect(treeMap != undefined).assertEqual(true); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200012); - expect(err.message).assertEqual("The TreeMap's constructor cannot be directly invoked"); - } - }); - - /** - * @tc.number: TEST_LENGTH_001 - * @tc.name : testLength001 - * @tc.desc : Get the number of key value pairs in the TreeMap instance. For example: treeMap.length. - * @tc.size : MediumTest - * @tc.type : Field - * @tc.level : Level 1 - */ - it("testLength001", 0, function () { - let treeMap = new TreeMap(); - treeMap.set(0, "a"); - treeMap.set(1, "b"); - treeMap.set(2, "c"); - treeMap.set(3, "d"); - treeMap.set(4, "g"); - let res = treeMap.length; - expect(res).assertEqual(5); - }); - - /** - * @tc.number: TEST_LENGTH_002 - * @tc.name : testLength002 - * @tc.desc : Get the number of key value pairs in the TreeMap instance. For example: treeMap.length. - * @tc.size : MediumTest - * @tc.type : Field - * @tc.level : Level 1 - */ - it("testLength002", 0, function () { - let treeMap = new TreeMap(); - let res = treeMap.length; - expect(res).assertEqual(0); - }); - - /** - * @tc.number: TEST_ISEMPTY_001 - * @tc.name : testIsEmpty001 - * @tc.desc : Determine whether the TreeMap instance is empty. For example: treeMap.isEmpty(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsEmpty001", 0, function () { - let treeMap = new TreeMap(); - treeMap.set(0, "a"); - treeMap.set(1, "b"); - treeMap.set(2, "c"); - treeMap.set(3, "d"); - treeMap.set(4, "g"); - let res = treeMap.isEmpty(); - expect(res).assertEqual(false); - treeMap.clear(); - let res1 = treeMap.isEmpty(); - expect(res1).assertEqual(true); - }); - - /** - * @tc.number: TEST_HASKEY_001 - * @tc.name : testHasKey001 - * @tc.desc : Determine whether the TreeMap contains the specified key. For example: treeMap.hasKey(1). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testHasKey001", 0, function () { - let treeMap = new TreeMap(); - treeMap.set(0, "a"); - treeMap.set(1, "b"); - let res = treeMap.hasKey(1); - expect(res).assertEqual(true); - let res1 = treeMap.hasKey(6); - expect(res1).assertEqual(false); - }); - - /** - * @tc.number: TEST_HASVALUE_001 - * @tc.name : testHasValue001 - * @tc.desc : Determine whether the TreeMap contains the specified Value. For example: treeMap.hasValue("a"). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testHasValue001", 0, function () { - let treeMap = new TreeMap(); - treeMap.set(0, "a"); - treeMap.set(1, "b"); - treeMap.set(2, "c"); - let res = treeMap.hasValue("a"); - expect(res).assertEqual(true); - let res1 = treeMap.hasValue("d"); - expect(res1).assertEqual(false); - }); - - /** - * @tc.number: TEST_GET_001 - * @tc.name : testGet001 - * @tc.desc : Get the corresponding value through the key. For example: treeMap.get(1). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGet001", 0, function () { - let treeMap = new TreeMap(); - treeMap.set(0, "a"); - treeMap.set(1, "b"); - treeMap.set(2, "c"); - let res = treeMap.get(1); - expect(res).assertEqual("b"); - }); - - /** - * @tc.number: TEST_GET_002 - * @tc.name : testGet002 - * @tc.desc : Get the corresponding value through the key. For example: treeMap.get(1). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGet002", 0, function () { - let treeMap = new TreeMap(); - let res = treeMap.get(1); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_GET_003 - * @tc.name : testGet003 - * @tc.desc : Get the corresponding value through the key. For example: treeMap.get(0). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGet003", 0, function () { - let treeMap = new TreeMap(); - treeMap.set(0, "a"); - treeMap.clear(); - expect(treeMap.length).assertEqual(0); - let res = treeMap.get(0); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_GETFIRSTKEY_001 - * @tc.name : testGetFirstKey001 - * @tc.desc : Get the key that ranks first in the TreeMap instance. For example: treeMap.getFirstKey(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetFirstKey001", 0, function () { - let treeMap = new TreeMap(); - treeMap.set(0, "a"); - treeMap.set(1, "b"); - treeMap.set(2, "c"); - let res = treeMap.getFirstKey(); - expect(res).assertEqual(0); - }); - - /** - * @tc.number: TEST_GETFIRSTKEY_002 - * @tc.name : testGetFirstKey002 - * @tc.desc : Get the key that ranks first in the TreeMap instance. For example: treeMap.getFirstKey(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetFirstKey002", 0, function () { - let treeMap = new TreeMap(); - let res = treeMap.getFirstKey(); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_GETLASTKEY_001 - * @tc.name : testGetLastKey001 - * @tc.desc : Get the last sorted key in the TreeMap instance. For example: treeMap.getLastKey(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetLastKey001", 0, function () { - let treeMap = new TreeMap(); - treeMap.set(0, "a"); - treeMap.set(1, "b"); - treeMap.set(2, "c"); - let res = treeMap.getLastKey(); - expect(res).assertEqual(2); - }); - - /** - * @tc.number: TEST_GETLASTKEY_002 - * @tc.name : testGetLastKey002 - * @tc.desc : Get the last sorted key in the TreeMap instance. For example: treeMap.getLastKey(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetLastKey002", 0, function () { - let treeMap = new TreeMap(); - let res = treeMap.getLastKey(); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_SETALL_001 - * @tc.name : testSetAll001 - * @tc.desc : Copy key value pairs from one HashMap to another. For example: treeMap.setAll(treeMap1). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSetAll001", 0, function () { - let treeMap = new TreeMap(); - treeMap.set(0, "a"); - treeMap.set(1, "b"); - let treeMap1 = new TreeMap(); - treeMap1.set(0, "a"); - treeMap1.set(1, "b"); - treeMap1.set(2, "c"); - treeMap.setAll(treeMap1); - let res = treeMap.get(0); - expect(res).assertEqual("a"); - let res1 = treeMap.get(1); - expect(res1).assertEqual("b"); - let res2 = treeMap.get(2); - expect(res2).assertEqual("c"); - }); - - /** - * @tc.number: TEST_SET_001 - * @tc.name : testSet001 - * @tc.desc : Add a pair of key value pairs to the TreeMap. For example: treeMap.set(0, "四"). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSet001", 0, function () { - let treeMap = new TreeMap(); - treeMap.set(0, "四"); - let res = treeMap.get(0); - expect(res).assertEqual("四"); - }); - - /** - * @tc.number: TEST_SET_002 - * @tc.name : testSet002 - * @tc.desc : Add a pair of key value pairs to the TreeMap. For example: treeMap.set(0, 8). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSet002", 0, function () { - let treeMap = new TreeMap(); - treeMap.set(0, 8); - let res = treeMap.get(0); - expect(res).assertEqual(8); - }); - - /** - * @tc.number: TEST_SET_003 - * @tc.name : testSet003 - * @tc.desc : Add a pair of key value pairs to the TreeMap. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSet003", 0, function () { - let treeMap = new TreeMap(); - let a = [1, 2, 3, 4]; - treeMap.set(0, a); - let res = treeMap.get(0); - expect(res).assertEqual(a); - }); - - /** - * @tc.number: TEST_SET_004 - * @tc.name : testSet004 - * @tc.desc : Add a pair of key value pairs to the TreeMap. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSet004", 0, function () { - let treeMap = new TreeMap(); - let a = {name: "lala", age: "13"}; - treeMap.set(0, a); - let res = treeMap.get(0); - expect(res).assertEqual(a); - }); - - /** - * @tc.number: TEST_SET_005 - * @tc.name : testSet005 - * @tc.desc : Add a pair of key value pairs to the TreeMap. For example: treeMap.set(2, "*"). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSet005", 0, function () { - let treeMap = new TreeMap(); - treeMap.set(2, "*"); - let res = treeMap.get(2); - expect(res).assertEqual("*"); - }); - - /** - * @tc.number: TEST_SET_006 - * @tc.name : testSet006 - * @tc.desc : Add a pair of key value pairs to the TreeMap. For example: treeMap.set(-2, 3.14). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSet006", 0, function () { - let treeMap = new TreeMap(); - treeMap.set(-2, 3.14); - let res = treeMap.get(-2); - expect(res).assertEqual(3.14); - }); - - /** - * @tc.number: TEST_SET_007 - * @tc.name : testSet007 - * @tc.desc : Add a pair of key value pairs to the TreeMap. For example: treeMap.set(100, true). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSet007", 0, function () { - let treeMap = new TreeMap(); - treeMap.set(100, true); - let res = treeMap.get(100); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_SET_008 - * @tc.name : testSet008 - * @tc.desc : Add a pair of key value pairs to the TreeMap. For example: treeMap.set(100, true). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSet008", 0, function () { - let treeMap = new TreeMap(); - treeMap.set(100, ""); - let res = treeMap.get(100); - expect(res).assertEqual(""); - }); - - /** - * @tc.number: TEST_SET_009 - * @tc.name : testSet009 - * @tc.desc : Add a pair of key value pairs to the TreeMap. For example: treeMap.set("a", "四"). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSet009", 0, function () { - let treeMap = new TreeMap(); - treeMap.set("a", "四"); - let res = treeMap.get("a"); - expect(res).assertEqual("四"); - }); - - /** - * @tc.number: TEST_SET_010 - * @tc.name : testSet010 - * @tc.desc : Add a pair of key value pairs to the TreeMap. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSet010", 0, function () { - let treeMap = new TreeMap(); - for (let i = 0; i < 10000; i++) { - treeMap.set(0, 8); - } - let res = treeMap.get(0); - expect(res).assertEqual(8); - expect(treeMap.length).assertEqual(1); - }); - - /** - * @tc.number: TEST_REMOVE_001 - * @tc.name : testRemove001 - * @tc.desc : Delete key value pairs according to key. For example: treeMap.remove(1). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testRemove001", 0, function () { - let treeMap = new TreeMap(); - treeMap.set(0, "a"); - treeMap.set(1, "b"); - treeMap.set(2, "c"); - let res = treeMap.remove(1); - expect(res).assertEqual("b"); - }); - - /** - * @tc.number: TEST_REMOVE_002 - * @tc.name : testRemove002 - * @tc.desc : Delete key value pairs according to key. For example: treeMap.remove(1). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testRemove002", 0, function () { - let treeMap = new TreeMap(); - treeMap.set(0, "a"); - let res = treeMap.remove(1); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_CLEAR_001 - * @tc.name : testClear001 - * @tc.desc : Clear all key value pairs in TreeMap. For example: treeMap.clear(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testClear001", 0, function () { - let treeMap = new TreeMap(); - treeMap.set(0, "a"); - treeMap.set(1, "b"); - treeMap.set(2, "c"); - treeMap.clear(); - let res = treeMap.length; - expect(res).assertEqual(0); - }); - - /** - * @tc.number: TEST_CLEAR_002 - * @tc.name : testClear002 - * @tc.desc : Clear all key value pairs in TreeMap. For example: treeMap.clear(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testClear002", 0, function () { - let treeMap = new TreeMap(); - treeMap.set(0, "a"); - treeMap.set(1, "b"); - treeMap.set(2, "c"); - treeMap.clear(); - let res = treeMap.length; - expect(res).assertEqual(0); - treeMap.set(3, "d"); - let va = treeMap.get(3); - expect(va).assertEqual("d"); - }); - - /** - * @tc.number: TEST_GETLOWERKEY_001 - * @tc.name : testGetLowerKey001 - * @tc.desc : Get a key that is a little lower than the specified key sort. - * For example: treeMap.getLowerKey(2). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetLowerKey001", 0, function () { - let treeMap = new TreeMap(); - treeMap.set(0, "a"); - treeMap.set(1, "b"); - treeMap.set(2, "c"); - treeMap.set(3, "d"); - treeMap.set(4, "g"); - let res = treeMap.getLowerKey(2); - expect(res).assertEqual(1); - }); - - /** - * @tc.number: TEST_GETLOWERKEY_002 - * @tc.name : testGetLowerKey002 - * @tc.desc : Get a key that is a little lower than the specified key sort. For example: treeMap.getLowerKey(2). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetLowerKey002", 0, function () { - let treeMap = new TreeMap(); - let res = treeMap.getLowerKey(2); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_GETHIGHERKEY_001 - * @tc.name : testGetHigherKey001 - * @tc.desc : Get a key that is a little higher than the specified key sort. For example: treeMap.getLowerKey(2). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetHigherKey001", 0, function () { - let treeMap = new TreeMap(); - treeMap.set(0, "a"); - treeMap.set(1, "b"); - treeMap.set(2, "c"); - treeMap.set(3, "d"); - treeMap.set(4, "g"); - let res = treeMap.getHigherKey(2); - expect(res).assertEqual(3); - }); - - /** - * @tc.number: TEST_GETHIGHERKEY_002 - * @tc.name : testGetHigherKey002 - * @tc.desc : Get a key that is a little higher than the specified key sort. For example: treeMap.getLowerKey(2). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetHigherKey002", 0, function () { - let treeMap = new TreeMap(); - let res = treeMap.getHigherKey(2); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_KEYS_001 - * @tc.name : testKeys001 - * @tc.desc : Get a collection of all the keys in the TreeMap. For example: treeMap.keys(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testKeys001", 0, function () { - let treeMap = new TreeMap(); - treeMap.set(0, "a"); - treeMap.set(1, "b"); - treeMap.set(2, "c"); - treeMap.set(3, "d"); - treeMap.set(4, "g"); - let res = treeMap.keys(); - expect(res.next().value).assertEqual(0); - expect(res.next().value).assertEqual(1); - expect(res.next().value).assertEqual(2); - expect(res.next().value).assertEqual(3); - expect(res.next().value).assertEqual(4); - }); - - /** - * @tc.number: TEST_VALUES_001 - * @tc.name : testValues001 - * @tc.desc : Get a collection of all the values in the TreeMap. For example: treeMap.values(). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testValues001", 0, function () { - let treeMap = new TreeMap(); - treeMap.set(0, "a"); - treeMap.set(1, "b"); - treeMap.set(2, "c"); - treeMap.set(3, "d"); - treeMap.set(4, "g"); - let res = treeMap.values(); - expect(res.next().value).assertEqual("a"); - expect(res.next().value).assertEqual("b"); - expect(res.next().value).assertEqual("c"); - expect(res.next().value).assertEqual("d"); - expect(res.next().value).assertEqual("g"); - }); - - /** - * @tc.number: TEST_REPLACE_001 - * @tc.name : testReplace001 - * @tc.desc : Modify the corresponding value according to the specified key. For example: treeMap.replace(2, "B"). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testReplace001", 0, function () { - let treeMap = new TreeMap(); - treeMap.set(0, "a"); - treeMap.set(1, "b"); - treeMap.set(2, "c"); - treeMap.set(3, "d"); - treeMap.set(4, "g"); - let res = treeMap.replace(2, "B"); - let res1 = treeMap.get(2); - expect(res1).assertEqual("B"); - }); - - /** - * @tc.number: TEST_REPLACE_002 - * @tc.name : testReplace002 - * @tc.desc : Modify the corresponding value according to the specified key. For example: treeMap.replace(2, "B"). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testReplace002", 0, function () { - let treeMap = new TreeMap(); - treeMap.set(0, "a"); - let res = treeMap.replace(2, "B"); - expect(res).assertEqual(false); - let res1 = treeMap.get(2); - expect(res1).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_FOREACH_001 - * @tc.name : testForEach001 - * @tc.desc : Traverse all key value pairs in the TreeMap instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testForEach001", 0, function () { - let treeMap = new TreeMap(); - treeMap.set(0, "a"); - treeMap.set(1, "b"); - treeMap.set(2, "c"); - treeMap.set(3, "d"); - treeMap.set(4, "g"); - let arr1 = []; - let arr2 = []; - treeMap.forEach((value, key) => { - arr1.push(value); - }); - treeMap.forEach((value, key) => { - arr2.push(key); - }); - let arr = ["a", "b", "c", "d", "g"]; - for (let i = 0; i < arr1.length; i++) { - expect(arr[i]).assertEqual(arr1[i]); - } - let arr3 = [0, 1, 2, 3, 4]; - for (let i = 0; i < arr3.length; i++) { - expect(arr3[i]).assertEqual(arr2[i]); - } - }); - - /** - * @tc.number: TEST_ENTRIES_001 - * @tc.name : testEntries001 - * @tc.desc : Get all key value pairs collection in TreeMap. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEntries001", 0, function () { - let treeMap = new TreeMap(); - treeMap.set(0, "a"); - treeMap.set(1, "b"); - treeMap.set(2, "c"); - treeMap.set(3, "d"); - treeMap.set(4, "g"); - let entries = treeMap.entries(); - let flag = true; - for (let i = 0, len = treeMap.length; i < len; i++) { - let entry = entries.next().value; - let res = treeMap.get(entry[0]); - if (res != entry[1]) { - flag = false; - break; - } - } - expect(flag).assertEqual(true); - }); - - /** - * @tc.number: TEST_ITERATOR_001 - * @tc.name : testIterator001 - * @tc.desc : Traverse all key value pairs in the TreeMap instance. For example: treeMap[Symbol.iterator](). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIterator001", 0, function () { - let treeMap = new TreeMap(); - treeMap.set(0, "a"); - treeMap.set(1, "b"); - treeMap.set(2, "c"); - treeMap.set(3, "d"); - treeMap.set(4, "g"); - let iters = treeMap[Symbol.iterator](); - let flag = true; - for (let i = 0, len = treeMap.length; i < len; i++) { - let entry = iters.next().value; - let res = treeMap.get(entry[0]); - if (res != entry[1]) { - flag = false; - break; - } - } - expect(flag).assertEqual(true); - }); - -}) -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/module.json b/commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/module.json deleted file mode 100644 index a4443e713..000000000 --- a/commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/module.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "module": { - "name": "entry_test", - "type": "feature", - "description": "$string:module_test_desc", - "mainElement": "TestAbility", - "deviceTypes": [ - "phone" - ], - "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", - "skills": [ - { - "actions": [ - "action.system.home" - ], - "entities": [ - "entity.system.home" - ] - } - ] - } - ] - } -} diff --git a/commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/resources/base/element/color.json b/commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/resources/base/element/color.json deleted file mode 100644 index 3c712962d..000000000 --- a/commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/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/commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/resources/base/element/string.json b/commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/resources/base/element/string.json deleted file mode 100644 index 65d8fa5a7..000000000 --- a/commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/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/commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/resources/base/media/icon.png b/commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6BLrPFWk?s;$LOP{GmJpBl$qoSA!PUg~PA65-S00{{S`XKG6NkG0RgjEntPrmV+?0|00mu7;+5 zrdpa{2QLqPJ4Y{j7=Mrl{BaxrkdY69+c~(w{Fv-v&aR%aEI&JYSeRTLWm!zbv;?)_ ziZB;fwGbbeL5Q}YLx`J$lp~A09KK8t_z}PZ=4ZzgdeKtgoc+o5EvN9A1K1_<>M?MBqb#!ASf&# zEX?<)!RH(7>1P+j=jqG(58}TVN-$psA6K}atCuI!KTJD&FMmH-78ZejBm)0qc{ESp z|LuG1{QnBUJRg_E=h1#XMWt2%fcoN@l7eAS!Es?Q+;XsRNPhiiE=@AqlLkJzF`O18 zbsbSmKN=aaq8k3NFYZfDWpKmM!coBU0(XnL8R{4=i|wi{!uWYM2je{U{B*K2PVdu&=E zTq*-XsEsJ$u5H4g6DIm2Y!DN`>^v|AqlwuCD;w45K0@eqauiqWf7l&o)+YLHm~|L~ z7$0v5mkobriU!H<@mVJHLlmQqzQ3d6Rh_-|%Yy2li*tHO>_vcnuZ7OR_xkAIuIU&x z-|8Y0wj|6|a6_I(v91y%k_kNw6pnkNdxjqG8!%Vz_d%c_!X+6-;1`GC9_FpjoHev5fEV7RhJ>r=mh-jp$fqbqRJ=obwdgLDVP5+s zy1=_DWG0Y-Jb3t^WXmkr(d9~08k-|#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m!~!m8|GaWqw{_e{0?qC# zQx5J>=EV0rh%UbTm*EF_{%Cpr9Pj7P@E+Bw!B~L*2bQiFOzSIM!P81-rD^st5PO$3 zRV_&_TX4!kX zwdg==9XIT=!POJ_(tt+@xH_%~`s_Bh`{fN=&ea}TyT7Po$m&x=4_9%X}IPc0H(8u!-CGwf2${@oeh@4Hbn?!>t_B)>jf-oBWrU2$yj^UQ&! zj`#my1vQ7xZzwLSdav`{k2j6myz}OY6*)Igw@zAd=d}fgW)$4Hdc0@NU73A{8xVuU z>4_ZqKREV8aT|2Pi2P}Q6oT-DAFG!BlD+ZTukKX%>-QWh+j{9p&ard3mlk<*ESC-T zuU0G>>+dxF^X%2m(Vt&EH-Zq(8z644N=I|tYk-sy5;4>*>|A{*AdeRmEV;){lvP2L+_Pi+w z+8h3I(d}TzG9dznJUq#TVja*53-Q@U-=58^Ju@Wm#ink{#rE~>#vXdZw!E%4H?R43 r&Vz1Y;fPm><=!o)x{&k2C4Y1+ot)V^BDwL#H=r_a%1Ff(^@;xiQ~qHB diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/TestAbility/TestAbility.ets b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/TestAbility/TestAbility.ets deleted file mode 100755 index 368aef919..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/TestAbility/TestAbility.ets +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import UIAbility from '@ohos.app.ability.UIAbility'; -import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; -import hilog from '@ohos.hilog'; -import { Hypium } from '@ohos/hypium'; -import testsuite from '../test/List.test'; -import window from '@ohos.window'; - -export default class TestAbility extends UIAbility { - onCreate(want, 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) ?? ''); - var abilityDelegator: any - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var abilityDelegatorArguments: any - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - hilog.info(0x0000, 'testTag', '%{public}s', 'start run testcase!!!'); - Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) - } - - onDestroy() { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onDestroy'); - } - - onWindowStageCreate(windowStage: window.WindowStage) { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageCreate'); - windowStage.loadContent('TestAbility/pages/Index', (err, data) => { - 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. Data: %{public}s', - JSON.stringify(data) ?? ''); - }); - } - - 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/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/TestAbility/pages/Index.ets b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/TestAbility/pages/Index.ets deleted file mode 100755 index e95640899..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/TestAbility/pages/Index.ets +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import hilog from '@ohos.hilog'; - -@Entry -@Component -struct Index { - aboutToAppear() { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility index aboutToAppear'); - } - @State message: string = 'Hello World' - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Button() { - Text('next page') - .fontSize(20) - .fontWeight(FontWeight.Bold) - }.type(ButtonType.Capsule) - .margin({ - top: 20 - }) - .backgroundColor('#0D9FFB') - .width('35%') - .height('5%') - .onClick(()=>{ - }) - } - .width('100%') - } - .height('100%') - } - } \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts deleted file mode 100755 index 92a16d84e..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts +++ /dev/null @@ -1,49 +0,0 @@ -import hilog from '@ohos.hilog'; -import TestRunner from '@ohos.application.testRunner'; -import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; - -var abilityDelegator = undefined -var abilityDelegatorArguments = undefined - -async function onAbilityCreateCallback() { - hilog.info(0x0000, 'testTag', '%{public}s', 'onAbilityCreateCallback'); -} - -async function addAbilityMonitorCallback(err: any) { - 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() { - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun run'); - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var testAbilityName = abilityDelegatorArguments.bundleName + '.TestAbility' - let lMonitor = { - abilityName: testAbilityName, - onAbilityCreate: onAbilityCreateCallback, - }; - abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) - var cmd = 'aa start -d 0 -a TestAbility' + ' -b ' + abilityDelegatorArguments.bundleName - var debug = abilityDelegatorArguments.parameters['-D'] - if (debug == 'true') - { - cmd += ' -D' - } - hilog.info(0x0000, 'testTag', 'cmd : %{public}s', cmd); - abilityDelegator.executeShellCommand(cmd, - (err: any, d: any) => { - hilog.info(0x0000, 'testTag', 'executeShellCommand : err : %{public}s', JSON.stringify(err) ?? ''); - hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.stdResult ?? ''); - hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.exitCode ?? ''); - }) - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun end'); - } -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/test/List.test.ets b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/test/List.test.ets deleted file mode 100755 index 359f865b5..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/test/List.test.ets +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (c) 2023 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. - */ -import WorkerTest from './Worker.test' -export default function testsuite() { - WorkerTest() -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/test/Worker.test.ets b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/test/Worker.test.ets deleted file mode 100755 index 88ff3819b..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/test/Worker.test.ets +++ /dev/null @@ -1,1555 +0,0 @@ -/* - * Copyright (c) 2023 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. - */ - -import worker from "@ohos.worker"; -import { - describe, - beforeAll, - beforeEach, - afterEach, - afterAll, - it, - expect, -} from "@ohos/hypium"; -export default function WorkerTest() { - describe("WorkerTest", function () { - afterAll(function () { - console.info("total case over"); - }); - - function promiseCase() { - let p = new Promise(function (resolve, reject) { - setTimeout(function () { - resolve(0); - }, 100); - }).then(undefined, (error) => {}); - return p; - } - - /** - * @tc.number: TEST_WORKEREVENTLISTENER_001 - * @tc.name : test_WorkerEventListener_WorkerEventListener_001 - * @tc.desc : Add an event listener to the Worker. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("test_WorkerEventListener_WorkerEventListener_001",0,async function (done) { - let ss = new worker.ThreadWorker("entry_test/ets/workers/newworker_036.js"); - - let times = 0; - let isTerminate = false; - - ss.onexit = function () { - isTerminate = true; - }; - ss.addEventListener("zhangsan", () => { - times++; - }); - - ss.dispatchEvent({ type: "zhangsan", timeStamp: 0 }); - ss.dispatchEvent({ type: "zhangsan", timeStamp: 0 }); - - ss.terminate(); - while (!isTerminate) { - await promiseCase(); - } - - expect(times).assertEqual(2); - done(); - } - ); - - /** - * @tc.number: TEST_DISPATCHEVENT_001 - * @tc.name : test_WorkerEventTarget_DispatchEvent_001 - * @tc.desc : Distribute the events defined in the Worker. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("test_WorkerEventTarget_DispatchEvent_001", 0, async function (done) { - let ss = new worker.ThreadWorker("entry_test/ets/workers/newworker_033.js"); - - let zhangSanTimes = 0; - let isTerminate = false; - - ss.onexit = function () { - isTerminate = true; - }; - ss.on("zhangsan", () => { - zhangSanTimes++; - }); - - ss.dispatchEvent({ type: "zhangsan", timeStamp: 0 }); - expect(zhangSanTimes).assertEqual(1); - - ss.removeEventListener("zhangsan"); - - ss.terminate(); - while (!isTerminate) { - await promiseCase(); - } - expect(zhangSanTimes).assertEqual(1); - done(); - }); - - /** - * @tc.number: TEST_REMOVEVENTELISTENER_001 - * @tc.name : test_WorkerEventTarget_RemoveEventListener_001 - * @tc.desc : Removes an event defined for the worker. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("test_WorkerEventTarget_RemoveEventListener_001",0,async function (done) { - let ss = new worker.ThreadWorker( - "entry_test/ets/workers/newworker_033.js" - ); - - let zhangSanTimes = 0; - let isTerminate = false; - - ss.onexit = function () { - isTerminate = true; - }; - ss.addEventListener("zhangsan", () => { - zhangSanTimes++; - }); - - ss.dispatchEvent({ type: "zhangsan", timeStamp: 0 }); - expect(zhangSanTimes).assertEqual(1); - - ss.removeEventListener("zhangsan"); - - ss.dispatchEvent({ type: "zhangsan", timeStamp: 0 }); - ss.dispatchEvent({ type: "zhangsan", timeStamp: 0 }); - - ss.terminate(); - while (!isTerminate) { - await promiseCase(); - } - - expect(zhangSanTimes).assertEqual(1); - done(); - } - ); - - /** - * @tc.number: TEST_REMOVEALLLISTENER_001 - * @tc.name : test_WorkerEventTarget_RemoveAllListener_001 - * @tc.desc : Delete all event listeners for Worker. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it( - "test_WorkerEventTarget_RemoveAllListener_001", - 0, - async function (done) { - let ss = new worker.ThreadWorker( - "entry_test/ets/workers/newworker_033.js" - ); - - let zhangSanTimes = 0; - let isTerminate = false; - - ss.onexit = function () { - isTerminate = true; - }; - ss.addEventListener("zhangsan", () => { - zhangSanTimes++; - }); - - let liSiTimes = 0; - ss.addEventListener("lisi", () => { - liSiTimes++; - }); - - ss.dispatchEvent({ type: "zhangsan", timeStamp: 0 }); - ss.dispatchEvent({ type: "zhangsan", timeStamp: 0 }); - expect(zhangSanTimes).assertEqual(2); - - ss.dispatchEvent({ type: "lisi", timeStamp: 0 }); - ss.dispatchEvent({ type: "lisi", timeStamp: 0 }); - expect(liSiTimes).assertEqual(2); - - ss.removeAllListener(); - ss.dispatchEvent({ type: "zhangsan", timeStamp: 0 }); - ss.dispatchEvent({ type: "zhangsan", timeStamp: 0 }); - expect(zhangSanTimes).assertEqual(2); - - ss.dispatchEvent({ type: "lisi", timeStamp: 0 }); - ss.dispatchEvent({ type: "lisi", timeStamp: 0 }); - - ss.terminate(); - while (!isTerminate) { - await promiseCase(); - } - - expect(liSiTimes).assertEqual(2); - done(); - } - ); - - /** - * @tc.number: TEST_ONERROR_001 - * @tc.name : test_GlobalScope_OnError_001 - * @tc.desc : Called when an exception occurs during execution in the Worker thread. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("test_GlobalScope_OnError_001", 0, async function (done) { - const ss = new worker.ThreadWorker( - "entry_test/ets/workers/newworker_035.js" - ); - let res = undefined; - let flag = false; - - ss.onmessage = function (e) { - res = e.data; - flag = true; - }; - - ss.postMessage({ type: "new" }); - while (!flag) { - await promiseCase(); - } - expect(res).assertEqual("Error: 123"); - - done(); - }); - - /** - * @tc.number: TEST_ONMESSAGE_001 - * @tc.name : test_ThreadWorkerGlobalScope_OnMessage_001 - * @tc.desc : Receive information sent by the main thread. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("test_ThreadWorkerGlobalScope_OnMessage_001", 0, async function (done) { - let ss = new worker.ThreadWorker( - "entry_test/ets/workers/newworker_010.js" - ); - let flag = false; - let res = undefined; - - ss.onmessage = function (e) { - flag = true; - res = e.data; - }; - - ss.postMessage({ type: "new", value: 12 }); - while (!flag) { - await promiseCase(); - } - expect(res).assertEqual(25); - - ss.terminate(); - - done(); - }); - - /** - * @tc.number: TEST_ONMESSAGEERROR_001 - * @tc.name : test_ThreadWorkerGlobalScope_OnMessageError_001 - * @tc.desc : Worker object receives a message that cannot be deserialized - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it( - "test_ThreadWorkerGlobalScope_OnMessageError_001", - 0, - async function (done) { - let ss = new worker.ThreadWorker( - "entry_test/ets/workers/newworker_028.js" - ); - let res = undefined; - let flag = false; - ss.onmessage = function (d) { - res = d.data; - flag = true; - }; - - ss.postMessage({ type: "new" }); - while (!flag) { - await promiseCase(); - } - ss.terminate(); - - expect(res).assertEqual(1); - done(); - } - ); - - /** - * @tc.number: TEST_CLOSE_001 - * @tc.name : test_ThreadWorkerGlobalScope_Close_001 - * @tc.desc : Destroy the worker thread and stop the worker from receiving messages. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("test_ThreadWorkerGlobalScope_Close_001", 0, async function (done) { - let ss = new worker.ThreadWorker( - "entry_test/ets/workers/newworker_030.js" - ); - let res = 0; - let flag = false; - - ss.onexit = function () { - flag = true; - res++; - }; - - ss.postMessage(10); - while (!flag) { - await promiseCase(); - } - expect(res).assertEqual(1); - done(); - }); - - /** - * @tc.number: TEST_POSTMESSAGE_001 - * @tc.name : test_ThreadWorkerGlobalScope_PostMessage_001 - * @tc.desc : Sends a message to the worker thread. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it( - "test_ThreadWorkerGlobalScope_PostMessage_001", - 0, - async function (done) { - let ss = new worker.ThreadWorker( - "entry_test/ets/workers/newworker_0151.js" - ); - let res = undefined; - let flag = false; - ss.onmessage = function (e) { - flag = true; - res = e.data; - }; - ss.postMessage({ type: "new", value: 11 }); - while (!flag) { - await promiseCase(); - } - ss.terminate(); - expect(res).assertEqual(16); - done(); - } - ); - - /** - * @tc.number: TEST_POSTMESSAGE_001 - * @tc.name : test_ThreadWorkerGlobalScope_PostMessage_001 - * @tc.desc : Sends a message to the worker thread. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it( - "test_ThreadWorkerGlobalScope_PostMessage_001", - 0, - async function (done) { - let ss = new worker.ThreadWorker( - "entry_test/ets/workers/newworker_032.js" - ); - let isTerminate = false; - let flag = false; - let res = undefined; - - ss.onexit = function () { - isTerminate = true; - }; - ss.onmessage = function (e) { - flag = true; - res = e.data; - }; - ss.postMessage({ type: "new" }); - - while (!flag) { - await promiseCase(); - } - - ss.terminate(); - while (!isTerminate) { - await promiseCase(); - } - expect(res).assertEqual("IsDetachedBuffer"); - done(); - } - ); - - /** - * @tc.number: TEST_CONSTRUCTOR_001 - * @tc.name : test_ThreadWorker_Constructor_001 - * @tc.desc : worker constructor to Creates a worker instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("test_ThreadWorker_Constructor_001", 0, async function (done) { - let ss = new worker.ThreadWorker("entry_test/ets/workers/newworker.js"); - let isTerminate = false; - - ss.onexit = function () { - isTerminate = true; - }; - - expect(ss != null).assertTrue(); - - ss.terminate(); - while (!isTerminate) { - await promiseCase(); - } - done(); - }); - - /** - * @tc.number: TEST_CONSTRUCTOR_002 - * @tc.name : test_ThreadWorker_Constructor_002 - * @tc.desc : worker constructor to Creates a worker instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("test_ThreadWorker_Constructor_002", 0, async function (done) { - let ss = new worker.ThreadWorker("entry_test/ets/workers/newworker.js", { - name: "1st worker", - shared: false, - }); - let isTerminate = false; - - ss.onexit = function () { - isTerminate = true; - }; - - expect(ss != null).assertTrue(); - - ss.terminate(); - while (!isTerminate) { - await promiseCase(); - } - done(); - }); - - /** - * @tc.number: TEST_CONSTRUCTOR_003 - * @tc.name : test_ThreadWorker_Constructor_003 - * @tc.desc : worker constructor to Creates a worker instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("test_ThreadWorker_Constructor_003", 0, async function (done) { - let ss = new worker.ThreadWorker("entry_test/ets/workers/newworker.js", { - type: "classic", - name: "2st worker", - shared: false, - }); - let isTerminate = false; - - ss.onexit = function () { - isTerminate = true; - }; - - expect(ss != null).assertTrue(); - - ss.terminate(); - while (!isTerminate) { - await promiseCase(); - } - done(); - }); - - /** - * @tc.number: TEST_CONSTRUCTOR_004 - * @tc.name : test_ThreadWorker_Constructor_004 - * @tc.desc : worker constructor to Creates a worker instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("test_ThreadWorker_Constructor_004", 0, async function (done) { - let ss = new worker.ThreadWorker("entry_test/ets/workers/newworker.js", { - type: "classic", - name: "3st worker", - shared: true, - }); - let isTerminate = false; - - ss.onexit = function () { - isTerminate = true; - }; - - expect(ss != null).assertTrue(); - - ss.terminate(); - while (!isTerminate) { - await promiseCase(); - } - done(); - }); - - /** - * @tc.number: TEST_CONSTRUCTOR_005 - * @tc.name : test_ThreadWorker_Constructor_005 - * @tc.desc : worker constructor to Creates a worker instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("test_ThreadWorker_Constructor_005", 0, async function (done) { - let ss = new worker.ThreadWorker( - "@bundle:com.example.threadWorkertest/entry_test/ets/workers/newworker.js" - ); - let isTerminate = false; - ss.onexit = function () { - isTerminate = true; - }; - expect(ss != null).assertTrue(); - ss.terminate(); - while (!isTerminate) { - await promiseCase(); - } - done(); - }); - - /** - * @tc.number: TEST_ONEXIT_001 - * @tc.name : test_ThreadWorker_OnExit_001 - * @tc.desc : Monitor whether the worker is destroyed - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("test_ThreadWorker_OnExit_001", 0, async function (done) { - let ss = new worker.ThreadWorker("/entry_test/ets/workers/newworker.js"); - let isTerminate = false; - ss.onexit = function () { - isTerminate = true; - }; - ss.terminate(); - while (!isTerminate) { - await promiseCase(); - } - expect(isTerminate).assertTrue(); - done(); - }); - - /** - * @tc.number: TEST_ONERROR_001 - * @tc.name : test_ThreadWorker_OnError_001 - * @tc.desc : Listen to the worker for any exceptions during execution - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("test_ThreadWorker_OnError_001", 0, async function (done) { - const ss = new worker.ThreadWorker( - "entry_test/ets/workers/newworker_007.js" - ); - let res = undefined; - let flag = false; - ss.onerror = function (e) { - res = e.message; - expect(e.filename).assertEqual( - "entry_test/ets/workers/newworker_007.js" - ); - expect(e.lineno).assertEqual(0); - expect(e.colno).assertEqual(0); - expect(e.error == "Error: 123").assertTrue(); - flag = true; - }; - - ss.postMessage("hello world"); - while (!flag) { - await promiseCase(); - } - - expect(res).assertEqual("Error: 123"); - done(); - }); - - /** - * @tc.number: TEST_ONMESSAGE_001 - * @tc.name : test_ThreadWorker_OnMessage_001 - * @tc.desc : Receives information from child threads - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("test_ThreadWorker_OnMessage_001", 0, async function (done) { - let ss = new worker.ThreadWorker( - "entry_test/ets/workers/newworker_002.js" - ); - let res = undefined; - let flag = false; - let isTerminate = false; - - ss.onexit = function () { - isTerminate = true; - }; - - ss.onmessage = function (e) { - res = e.data; - flag = true; - }; - - ss.postMessage("hello world"); - while (!flag) { - await promiseCase(); - } - ss.terminate(); - while (!isTerminate) { - await promiseCase(); - } - - expect(res).assertEqual("hello world worker"); - done(); - }); - - /** - * @tc.number: TEST_ONMESSAGEERROR_001 - * @tc.name : test_ThreadWorker_OnMessageError_001 - * @tc.desc : Listening for worker object to receive a message that cannot be serialized - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("test_ThreadWorker_OnMessageError_001", 0, async function (done) { - let ss = new worker.ThreadWorker( - "entry_test/ets/workers/newworker_008.js" - ); - let res = 0; - let flag = false; - - ss.onexit = function () { - flag = true; - }; - - ss.onmessageerror = function (e) { - res++; - }; - - ss.postMessage("abc"); - while (!flag) { - await promiseCase(); - } - expect(res).assertEqual(0); - done(); - }); - - /** - * @tc.number: TEST_ONMESSAGEERROR_002 - * @tc.name : test_ThreadWorker_OnMessageError_002 - * @tc.desc : Listening for worker object to receive a message that cannot be serialized - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("test_ThreadWorker_OnMessageError_002", 0, async function (done) { - let ss = new worker.ThreadWorker( - "entry_test/ets/workers/newworker_021.js" - ); - let flag = false; - let isTerminate = false; - ss.onmessageerror = function (d) { - flag = true; - }; - ss.onexit = function () { - isTerminate = true; - }; - try { - const data = Symbol(); - ss.postMessage(data); - } catch (error) { - console.info("worker:: recv error message: " + error.message); - while (!flag) { - await promiseCase(); - } - ss.terminate(); - while (!isTerminate) { - await promiseCase(); - } - } - expect(flag).assertTrue(); - done(); - }); - - /** - * @tc.number: TEST_POSTMESSAGE_001 - * @tc.name : test_ThreadWorker_PostMessage_001 - * @tc.desc : Sends a message to the worker thread. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("test_ThreadWorker_PostMessage_001", 0, async function (done) { - let ss = new worker.ThreadWorker( - "entry_test/ets/workers/newworker_002.js" - ); - - let res = undefined; - let flag = false; - let isTerminate = false; - - ss.onexit = function () { - isTerminate = true; - }; - ss.onmessage = function (e) { - res = e.data; - flag = true; - }; - - ss.postMessage("hello world"); - while (!flag) { - await promiseCase(); - } - - ss.terminate(); - while (!isTerminate) { - await promiseCase(); - } - - expect(res).assertEqual("hello world worker"); - done(); - }); - - /** - * @tc.number: TEST_POSTMESSAGE_002 - * @tc.name : test_ThreadWorker_PostMessage_002 - * @tc.desc : Sends a message to the worker thread. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("test_ThreadWorker_PostMessage_002", 0, async function (done) { - let ss = new worker.ThreadWorker( - "entry_test/ets/workers/newworker_003.js" - ); - - let res = undefined; - let flag = false; - let isTerminate = false; - - ss.onexit = function () { - isTerminate = true; - }; - ss.onmessage = function (e) { - res = e.data; - flag = true; - }; - - ss.postMessage(12); - while (!flag) { - await promiseCase(); - } - - ss.terminate(); - while (!isTerminate) { - await promiseCase(); - } - - expect(res).assertEqual(25); - done(); - }); - - /** - * @tc.number: TEST_POSTMESSAGE_003 - * @tc.name : test_ThreadWorker_PostMessage_003 - * @tc.desc : Sends a message to the worker thread. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("test_ThreadWorker_PostMessage_003", 0, async function (done) { - let ss = new worker.ThreadWorker( - "entry_test/ets/workers/newworker_004.js" - ); - - let res = undefined; - let flag = false; - let isTerminate = false; - - ss.onexit = function () { - isTerminate = true; - }; - ss.onmessage = function (e) { - res = e.data.message; - flag = true; - }; - - ss.postMessage({ message: "hello world" }); - while (!flag) { - await promiseCase(); - } - - ss.terminate(); - while (!isTerminate) { - await promiseCase(); - } - - expect(res).assertEqual("hello world worker"); - done(); - }); - - /** - * @tc.number: TEST_POSTMESSAGE_004 - * @tc.name : test_ThreadWorker_PostMessage_004 - * @tc.desc : Sends a message to the worker thread. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("test_ThreadWorker_PostMessage_004", 0, async function (done) { - let ss = new worker.ThreadWorker( - "entry_test/ets/workers/newworker_005.js", - { name: "zhangsan" } - ); - - let res = undefined; - let flag = false; - let isTerminate = false; - - ss.onexit = function () { - isTerminate = true; - }; - ss.onmessage = function (e) { - res = e.data; - console.info("worker:: type " + e.type); - console.info("worker:: timeStamp " + e.timeStamp); - flag = true; - }; - - ss.postMessage("hello world"); - while (!flag) { - await promiseCase(); - } - - ss.terminate(); - while (!isTerminate) { - await promiseCase(); - } - - expect(res).assertEqual("zhangsan"); - done(); - }); - - /** - * @tc.number: TEST_POSTMESSAGE_001 - * @tc.name : test_ThreadWorker_PostMessage_001 - * @tc.desc : Sends a message to the worker thread. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("test_ThreadWorker_PostMessage_001", 0, async function (done) { - let ss = new worker.ThreadWorker( - "entry_test/ets/workers/newworker_006.js" - ); - let isTerminate = false; - - ss.onexit = function () { - isTerminate = true; - }; - - const buffer = new ArrayBuffer(8); - expect(buffer.byteLength).assertEqual(8); - ss.postMessage(buffer, [buffer]); - let length = undefined; - let exception = undefined; - try { - length = buffer.byteLength; - } catch (e) { - exception = e.message; - } - - ss.terminate(); - while (!isTerminate) { - await promiseCase(); - } - - console.log("worker:: length is " + length); - console.log("worker:: exception is " + exception); - - if (typeof exception == "undefined") { - expect(length).assertEqual(0); - } else { - expect(exception).assertEqual("IsDetachedBuffer"); - } - done(); - }); - - /** - * @tc.number: TEST_ONCE_001 - * @tc.name : test_ThreadWorker_Once_001 - * @tc.desc : Add an event listener. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("test_ThreadWorker_Once_001", 0, async function (done) { - let ss = new worker.ThreadWorker("entry_test/ets/workers/newworker.js"); - - let times = 0; - let isTerminate = false; - - ss.onexit = function () { - isTerminate = true; - }; - ss.once("zhangsan", () => { - times++; - }); - ss.dispatchEvent({ type: "zhangsan", timeStamp: 0 }); - - ss.terminate(); - while (!isTerminate) { - await promiseCase(); - } - - expect(times).assertEqual(1); - done(); - }); - - /** - * @tc.number: TEST_ONCE_002 - * @tc.name : test_ThreadWorker_Once_002 - * @tc.desc : Add an event listener. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("test_ThreadWorker_Once_002", 0, async function (done) { - let ss = new worker.ThreadWorker("entry_test/ets/workers/newworker.js"); - - let times = 0; - let isTerminate = false; - - ss.onexit = function () { - isTerminate = true; - }; - ss.once("zhangsan", () => { - times++; - }); - - for (let i = 0; i < 10; i++) { - ss.dispatchEvent({ type: "zhangsan", timeStamp: 0 }); - } - - ss.terminate(); - while (!isTerminate) { - await promiseCase(); - } - - expect(times).assertEqual(1); - done(); - }); - - /** - * @tc.number: TEST_ONCE_003 - * @tc.name : test_ThreadWorker_Once_003 - * @tc.desc : Add an event listener. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("test_ThreadWorker_Once_003", 0, async function (done) { - let ss = new worker.ThreadWorker("entry_test/ets/workers/newworker.js"); - - let times = 0; - let isTerminate = false; - - ss.onexit = function () { - isTerminate = true; - }; - ss.once("zhangsan", () => { - times--; - }); - - ss.once("lisi", () => { - times++; - }); - - ss.dispatchEvent({ type: "zhangsan", timeStamp: 0 }); - ss.dispatchEvent({ type: "lisi", timeStamp: 0 }); - - ss.terminate(); - while (!isTerminate) { - await promiseCase(); - } - - expect(times).assertEqual(0); - done(); - }); - - /** - * @tc.number: TEST_ONCE_004 - * @tc.name : test_ThreadWorker_Once_004 - * @tc.desc : Add an event listener. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("test_ThreadWorker_Once_004", 0, async function (done) { - let ss = new worker.ThreadWorker("entry_test/ets/workers/newworker.js"); - - let isTerminate = false; - let times = 0; - - try { - ss.once("zhangsan", () => { - times++; - }); - ss.dispatchEvent({ type: "zhangsan", timeStamp: 0 }); - ss.onexit = function () { - isTerminate = true; - }; - ss.terminate(); - while (!isTerminate) { - await promiseCase(); - } - ss.once("lisi", () => { - times++; - }); - expect(times).assertEqual(1); - } catch (error) { - expect(error.name).assertEqual("BusinessError"); - expect(error.message).assertEqual( - "Worker instance is not running, maybe worker is terminated" - ); - - done(); - } - }); - - /** - * @tc.number: TEST_TERMINATE_001 - * @tc.name : test_ThreadWorker_Terminate_001 - * @tc.desc : Terminates the worker thread to stop the worker from receiving messages. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("test_ThreadWorker_Terminate_001", 0, async function (done) { - let ss = new worker.ThreadWorker("entry_test/ets/workers/newworker.js"); - let res = 0; - let flag = false; - - ss.onexit = function () { - flag = true; - res++; - }; - - ss.terminate(); - while (!flag) { - await promiseCase(); - } - - expect(res).assertEqual(1); - done(); - }); - - /** - * @tc.number: TEST_TERMINATE_002 - * @tc.name : test_ThreadWorker_Terminate_002 - * @tc.desc : Terminates the worker thread to stop the worker from receiving messages. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("test_ThreadWorker_Terminate_002", 0, async function (done) { - let ss = new worker.ThreadWorker("entry_test/ets/workers/newworker.js"); - let res = 0; - let flag = false; - - ss.onexit = function () { - flag = true; - res++; - }; - - ss.terminate(); - ss.terminate(); - - while (!flag) { - await promiseCase(); - } - - expect(res).assertEqual(1); - done(); - }); - - /** - * @tc.number: TEST_TERMINATE_003 - * @tc.name : test_ThreadWorker_Terminate_003 - * @tc.desc : Terminates the worker thread to stop the worker from receiving messages. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("test_ThreadWorker_Terminate_003", 0, async function (done) { - let ss = new worker.ThreadWorker("entry_test/ets/workers/newworker.js"); - let res = 0; - let flag = false; - - ss.onexit = function () { - flag = true; - res++; - }; - ss.onmessage = function (e) { - res++; - }; - - ss.terminate(); - while (!flag) { - await promiseCase(); - } - expect(res).assertEqual(1); - - try { - ss.postMessage("hello world"); - await promiseCase(); - } catch (error) { - let msg = - "Worker instance is not running, maybe worker is terminated when PostMessage"; - expect(error.name).assertEqual("BusinessError"); - expect(error.message).assertEqual(msg); - done(); - } - }); - - /** - * @tc.number: TEST_ADDEVENTLISTENER_001 - * @tc.name : test_ThreadWorker_AddEventListener_001 - * @tc.desc : Add an event listener to the Worker. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("test_ThreadWorker_AddEventListener_001", 0, async function (done) { - let ss = new worker.ThreadWorker("entry_test/ets/workers/newworker.js"); - - let times = 0; - let isTerminate = false; - - ss.onexit = function () { - isTerminate = true; - }; - ss.addEventListener("zhangsan", () => { - times++; - }); - - ss.dispatchEvent({ type: "zhangsan", timeStamp: 0 }); - ss.dispatchEvent({ type: "zhangsan", timeStamp: 0 }); - - ss.terminate(); - while (!isTerminate) { - await promiseCase(); - } - - expect(times).assertEqual(2); - done(); - }); - - /** - * @tc.number: TEST_ADDEVENTLISTENER_002 - * @tc.name : test_ThreadWorker_AddEventListener_002 - * @tc.desc : Add an event listener to the Worker. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("test_ThreadWorker_AddEventListener_002", 0, async function (done) { - let ss = new worker.ThreadWorker("entry_test/ets/workers/newworker.js"); - - let times = 0; - let isTerminate = false; - - ss.onexit = function () { - isTerminate = true; - }; - ss.addEventListener("zhangsan", () => { - times++; - }); - ss.addEventListener("lisi", () => { - times++; - }); - - ss.dispatchEvent({ type: "zhangsan", timeStamp: 0 }); - ss.dispatchEvent({ type: "lisi", timeStamp: 0 }); - - ss.terminate(); - while (!isTerminate) { - await promiseCase(); - } - - expect(times).assertEqual(2); - done(); - }); - - /** - * @tc.number: TEST_ADDEVENTLISTENER_003 - * @tc.name : test_ThreadWorker_AddEventListener_003 - * @tc.desc : Add an event listener to the Worker. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("test_ThreadWorker_AddEventListener_003", 0, async function (done) { - let ss = new worker.ThreadWorker("entry_test/ets/workers/newworker.js"); - - let times = 0; - let isTerminate = false; - - ss.onexit = function () { - isTerminate = true; - }; - ss.addEventListener("zhangsan", () => { - times++; - }); - - for (let i = 0; i < 10; i++) { - ss.dispatchEvent({ type: "zhangsan", timeStamp: 0 }); - } - - ss.terminate(); - while (!isTerminate) { - await promiseCase(); - } - - expect(times).assertEqual(10); - done(); - }); - - /** - * @tc.number: TEST_ADDEVENTLISTENER_004 - * @tc.name : test_ThreadWorker_AddEventListener_004 - * @tc.desc : Add an event listener to the Worker when throw error. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("test_ThreadWorker_AddEventListener_004", 0, async function (done) { - let ss = new worker.ThreadWorker("entry_test/ets/workers/newworker.js"); - - let times = 0; - let isTerminate = false; - - try { - ss.addEventListener("zhangsan", () => { - times++; - }); - - ss.dispatchEvent({ type: "zhangsan", timeStamp: 0 }); - - ss.onexit = function () { - isTerminate = true; - }; - ss.terminate(); - while (!isTerminate) { - await promiseCase(); - } - - ss.addEventListener("lisi", () => { - times++; - }); - expect(times).assertEqual(1); - } catch (error) { - expect(error.name).assertEqual("BusinessError"); - expect(error.message).assertEqual( - "Worker instance is not running, maybe worker is terminated" - ); - done(); - } - }); - - /** - * @tc.number: TEST_ADDEVENTLISTENER_005 - * @tc.name : test_ThreadWorker_AddEventListener_005 - * @tc.desc : Add an event listener to the Worker when throw error. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("test_ThreadWorker_AddEventListener_005", 0, async function (done) { - let ss = new worker.ThreadWorker("entry_test/ets/workers/newworker.js"); - - let times = 0; - let isTerminate = false; - - try { - ss.addEventListener("zhangsan", () => { - times++; - }); - - ss.dispatchEvent({ type: "zhangsan", timeStamp: 0 }); - - ss.onexit = function () { - isTerminate = true; - }; - ss.terminate(); - while (!isTerminate) { - await promiseCase(); - } - ss.dispatchEvent({ type: "zhangsan", timeStamp: 0 }); - expect(times).assertEqual(1); - } catch (error) { - expect(error.name).assertEqual("BusinessError"); - expect(error.message).assertEqual( - "Worker instance is not running, maybe worker has been terminated" - ); - done(); - } - }); - - /** - * @tc.number: TEST_DISPATCHEVENT_001 - * @tc.name : test_ThreadWorker_DispatchEvent_001 - * @tc.desc : Distribute the events defined in the Worker. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("test_ThreadWorker_DispatchEvent_001", 0, async function (done) { - let ss = new worker.ThreadWorker("entry_test/ets/workers/newworker.js"); - - let zhangSanTimes = 0; - let isTerminate = false; - - ss.onexit = function () { - isTerminate = true; - }; - ss.on("zhangsan", () => { - zhangSanTimes++; - }); - - ss.dispatchEvent({ type: "zhangsan", timeStamp: 0 }); - expect(zhangSanTimes).assertEqual(1); - - ss.removeEventListener("zhangsan"); - - ss.terminate(); - while (!isTerminate) { - await promiseCase(); - } - expect(zhangSanTimes).assertEqual(1); - done(); - }); - - /** - * @tc.number: TEST_REMOVEVENTELISTENER_001 - * @tc.name : test_ThreadWorker_RemoveEventListener_001 - * @tc.desc : Removes an event defined for the worker. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("test_ThreadWorker_RemoveEventListener_001", 0, async function (done) { - let ss = new worker.ThreadWorker("entry_test/ets/workers/newworker.js"); - - let zhangSanTimes = 0; - let isTerminate = false; - - ss.onexit = function () { - isTerminate = true; - }; - ss.addEventListener("zhangsan", () => { - zhangSanTimes++; - }); - - ss.dispatchEvent({ type: "zhangsan", timeStamp: 0 }); - expect(zhangSanTimes).assertEqual(1); - - ss.removeEventListener("zhangsan"); - - ss.dispatchEvent({ type: "zhangsan", timeStamp: 0 }); - ss.dispatchEvent({ type: "zhangsan", timeStamp: 0 }); - - ss.terminate(); - while (!isTerminate) { - await promiseCase(); - } - - expect(zhangSanTimes).assertEqual(1); - done(); - }); - - /** - * @tc.number: TEST_REMOVEVENTELISTENER_002 - * @tc.name : test_ThreadWorker_RemoveEventListener_002 - * @tc.desc : Removes an event defined for the worker. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("test_ThreadWorker_RemoveEventListener_002", 0, async function (done) { - let ss = new worker.ThreadWorker("entry_test/ets/workers/newworker.js"); - - let zhangSanTimes = 0; - let isTerminate = false; - - ss.onexit = function () { - isTerminate = true; - }; - ss.addEventListener("zhangsan", () => { - zhangSanTimes++; - }); - - ss.dispatchEvent({ type: "zhangsan", timeStamp: 0 }); - ss.dispatchEvent({ type: "zhangsan", timeStamp: 0 }); - expect(zhangSanTimes).assertEqual(2); - - for (let i = 0; i < 3; i++) { - ss.removeEventListener("zhangsan"); - } - - ss.dispatchEvent({ type: "zhangsan", timeStamp: 0 }); - - ss.terminate(); - while (!isTerminate) { - await promiseCase(); - } - - expect(zhangSanTimes).assertEqual(2); - done(); - }); - - /** - * @tc.number: TEST_REMOVELISTENER_003 - * @tc.name : test_ThreadWorker_RemoveEventListener_003 - * @tc.desc : Removes an event defined for the worker when throw error. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("test_ThreadWorker_RemoveEventListener_003", 0, async function (done) { - let ss = new worker.ThreadWorker("entry_test/ets/workers/newworker.js"); - - let zhangSanTimes = 0; - let isTerminate = false; - - ss.onexit = function () { - isTerminate = true; - }; - ss.addEventListener("zhangsan", () => { - zhangSanTimes++; - }); - ss.terminate(); - while (!isTerminate) { - await promiseCase(); - } - try { - ss.removeEventListener("zhangsan"); - } catch (error) { - expect(error.name).assertEqual("BusinessError"); - expect(error.message).assertEqual( - "Worker instance is not running, maybe worker is terminated" - ); - done(); - } - }); - - /** - * @tc.number: TEST_REMOVEALLLISTENER_001 - * @tc.name : test_ThreadWorker_RemoveAllListener_001 - * @tc.desc : Delete all event listeners for Worker. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("test_ThreadWorker_RemoveAllListener_001", 0, async function (done) { - let ss = new worker.ThreadWorker("entry_test/ets/workers/newworker.js"); - - let zhangSanTimes = 0; - let isTerminate = false; - - ss.onexit = function () { - isTerminate = true; - }; - ss.addEventListener("zhangsan", () => { - zhangSanTimes++; - }); - - let liSiTimes = 0; - ss.addEventListener("lisi", () => { - liSiTimes++; - }); - - ss.dispatchEvent({ type: "zhangsan", timeStamp: 0 }); - ss.dispatchEvent({ type: "zhangsan", timeStamp: 0 }); - expect(zhangSanTimes).assertEqual(2); - - ss.dispatchEvent({ type: "lisi", timeStamp: 0 }); - ss.dispatchEvent({ type: "lisi", timeStamp: 0 }); - expect(liSiTimes).assertEqual(2); - - ss.removeAllListener(); - ss.dispatchEvent({ type: "zhangsan", timeStamp: 0 }); - ss.dispatchEvent({ type: "zhangsan", timeStamp: 0 }); - expect(zhangSanTimes).assertEqual(2); - - ss.dispatchEvent({ type: "lisi", timeStamp: 0 }); - ss.dispatchEvent({ type: "lisi", timeStamp: 0 }); - - ss.terminate(); - while (!isTerminate) { - await promiseCase(); - } - - expect(liSiTimes).assertEqual(2); - done(); - }); - - /** - * @tc.number: TEST_REMOVEALLLISTENER_002 - * @tc.name : test_ThreadWorker_RemoveAllListener_002 - * @tc.desc : Delete all event listeners for Worker when throw error. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("test_ThreadWorker_RemoveAllListener_002", 0, async function (done) { - let ss = new worker.ThreadWorker("entry_test/ets/workers/newworker.js"); - - let zhangSanTimes = 0; - let isTerminate = false; - - ss.onexit = function () { - isTerminate = true; - }; - ss.addEventListener("zhangsan", () => { - zhangSanTimes++; - }); - ss.terminate(); - while (!isTerminate) { - await promiseCase(); - } - try { - ss.removeAllListener(); - } catch (error) { - expect(error.name).assertEqual("BusinessError"); - expect(error.message).assertEqual( - "Worker instance is not running, maybe worker is terminated" - ); - done(); - } - }); - }); -} diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker.js b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker.js deleted file mode 100755 index 78e75378b..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ - -import worker from '@ohos.worker'; -const parentPort = worker.workerPort; - -parentPort.onmessage = function(e) { - let data = e.data; - console.info("worker:: worker thread worker data is " + data.data); - switch(data.type) { - case "normal": - console.info("worker:: worker thread receive data " + data.data); - parentPort.postMessage(data); - console.info("worker:: worker thread post back"); - break; - case "error": - throw new Error("123"); - case "buffer": - console.info("worker:: worker.js receive buffer length is " + data.data.byteLength); - parentPort.postMessage(data, [data.data]); - console.info("worker:: worker.js post buffer length is " + data.data.byteLength); - break; - case "self": - parentPort.postMessage(data.name); - default: - console.info("worker:: worker.js receive unknow type"); - break - } -} - -// Deserialization error -parentPort.onmessageerror = function() { - console.info("worker:: worker.js onmessageerror"); -} - -// js execution error -parentPort.onerror = function(data) { - console.info("worker:: worker.js onerror " + data.lineno + ", msg = " + data.message + ", filename = " + data.filename + ", colno = " + data.colno); -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_002.js b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_002.js deleted file mode 100755 index 3e4f7b918..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_002.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import worker from '@ohos.worker'; -const parentPort = worker.workerPort; - -parentPort.onmessage = function(e) { - console.log("worker:: worker receive data " + e.data); - let data = e.data + " worker"; - parentPort.postMessage(data) -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_003.js b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_003.js deleted file mode 100755 index f66f4d2ac..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_003.js +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import worker from '@ohos.worker'; -const parentPort = worker.workerPort; - -parentPort.onmessage = function(e) { - let data = e.data * 2 + 1 - parentPort.postMessage(data) -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_004.js b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_004.js deleted file mode 100755 index 329eb9cd6..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_004.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import worker from '@ohos.worker'; -const parentPort = worker.workerPort; - -parentPort.onmessage = function(e) { - let data = e.data; - data.message = "hello world " + "worker" - parentPort.postMessage(data) -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_005.js b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_005.js deleted file mode 100755 index 893dcc101..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_005.js +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import worker from '@ohos.worker'; -const parentPort = worker.workerPort; - -parentPort.onmessage = function(e) { - parentPort.postMessage(name) -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_006.js b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_006.js deleted file mode 100755 index 0c6dfc57a..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_006.js +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import worker from '@ohos.worker'; -const parentPort = worker.workerPort; - -parentPort.onmessage = function(e) { - parentPort.postMessage("hello world") -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_007.js b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_007.js deleted file mode 100755 index eea8e1d7c..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_007.js +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import worker from '@ohos.worker'; -const parentPort = worker.workerPort; - -parentPort.onmessage = function(e) { - throw new Error("123") -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_008.js b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_008.js deleted file mode 100755 index 2c7735910..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_008.js +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import worker from '@ohos.worker'; -const parentPort = worker.workerPort; - -parentPort.onmessage = function(e) { - parentPort.close() -} diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_009.js b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_009.js deleted file mode 100755 index d3cd19d8c..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_009.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import worker from "@ohos.worker" -const parentPort = worker.workerPort; - -var ss = undefined; -var flag = false; -parentPort.onmessage = function(e) { - let data = e.data; - switch(data.type) { - case "new": - ss = new worker.ThreadWorker("entry_test/ets/workers/newworker_0091.js"); - ss.onexit = function() { - flag = true; - } - parentPort.postMessage(ss != null); - break; - case "wait": - if (flag) { - parentPort.postMessage("terminate"); - } - break; - case "terminate": - flag = false; - ss.terminate(); - break; - default: - break; - } -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_0091.js b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_0091.js deleted file mode 100755 index a1f89bb6d..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_0091.js +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import worker from "@ohos.worker" - -const parentPort = worker.workerPort; - -parentPort.onmessage = function(e) { - console.log("worker:: onmessage"); -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_010.js b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_010.js deleted file mode 100755 index d94003ecc..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_010.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import worker from "@ohos.worker" -const parentPort = worker.workerPort; - -var ss = undefined; -var backValue = undefined; -parentPort.onmessage = function(e) { - let data = e.data; - switch(data.type) { - case "new": - ss = new worker.ThreadWorker("entry_test/ets/workers/newworker_0101.js"); - ss.onmessage = function(ee) { - backValue = ee.data; - ss.terminate(); - } - - ss.onexit = function() { - parentPort.postMessage(backValue); - } - ss.postMessage(data.value); - break; - default: - break; - } -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_0101.js b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_0101.js deleted file mode 100755 index d96c06f5d..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_0101.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import worker from "@ohos.worker" - -const parentPort = worker.workerPort; - -parentPort.onmessage = function(e) { - let data = e.data; // 12 - parentPort.postMessage(data * 2 + 1); // 25 -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_011.js b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_011.js deleted file mode 100755 index d876fe1f8..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_011.js +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import worker from "@ohos.worker" -const parentPort = worker.workerPort; - -var ss = undefined; -var backValue = undefined; -var flag = false; - -parentPort.onmessage = function(e) { - let data = e.data; - switch(data.type) { - case "new": - ss = new worker.ThreadWorker("entry_test/ets/workers/newworker_0111.js"); - ss.onmessage = function(ee) { - backValue = ee.data; - flag = true; - } - ss.onexit = function(code) { - backValue = "terminate"; - flag = true; - } - ss.postMessage(data.value); - break; - case "wait": - if (flag) { - parentPort.postMessage(backValue); - } - break; - case "terminate": - flag = false; - ss.terminate(); - break; - default: - break; - } -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_0111.js b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_0111.js deleted file mode 100755 index 8e4314a3f..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_0111.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import worker from "@ohos.worker" - -const parentPort = worker.workerPort; - -parentPort.onmessage = function(e) { - console.log("worker:: onmessage") - parentPort.postMessage("terminate"); -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_012.js b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_012.js deleted file mode 100755 index f62e1fb50..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_012.js +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import worker from "@ohos.worker" -const parentPort = worker.workerPort; - -var ss = undefined; -var backValue = undefined; -var flag = false; - -parentPort.onmessage = function(e) { - let data = e.data; - switch(data.type) { - case "new": - ss = new worker.ThreadWorker("entry_test/ets/workers/newworker_0121.js"); - ss.onmessage = function(ee) { - backValue = ee.data; - flag = true; - } - ss.onexit = function() { - backValue = "terminate"; - flag = true; - } - ss.postMessage({type: "new"}); - break; - case "wait": - if (flag) { - parentPort.postMessage(backValue); - } - break; - case "terminate": - flag = false; - ss.terminate(); - break; - default: - break; - } -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_0121.js b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_0121.js deleted file mode 100755 index a7e495e48..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_0121.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import worker from "@ohos.worker" - -const parentPort = worker.workerPort; - -var ss = undefined; -var backValue = undefined; -var flag = false; - -parentPort.onmessage = function(e) { - let data = e.data; - switch(data.type) { - case "new": - ss = new worker.ThreadWorker("entry_test/ets/workers/newworker_0122.js"); - ss.terminate(); - ss.onexit = function() { - parentPort.postMessage(ss != null); - } - break; - default: - break; - } -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_0122.js b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_0122.js deleted file mode 100755 index 421e71d27..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_0122.js +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import worker from "@ohos.worker" - -const parentPort = worker.workerPort; - -var ss = undefined; -var backValue = undefined; -var flag = false; - -parentPort.onmessage = function(e) { - console.info("worker:: thrid worker onmessage") -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_013.js b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_013.js deleted file mode 100755 index 306075813..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_013.js +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import worker from "@ohos.worker" - -const parentPort = worker.workerPort; - -var ss = undefined; -var backValue = undefined; -var flag = false; - -parentPort.onmessage = function(e) { - var data = e.data; - switch(data.type) { - case "new": - ss = new worker.ThreadWorker("entry_test/ets/workers/newworker_0131.js"); - ss.onmessage = function(ee) { - backValue = ee.data; - flag = true; - } - ss.onexit = function() { - backValue = "terminate"; - flag = true; - } - ss.postMessage(data.value); - break; - case "wait": - if (flag) { - parentPort.postMessage(backValue); - } - break; - case "terminate": - flag = false; - ss.terminate(); - break; - default: - break; - } -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_0131.js b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_0131.js deleted file mode 100755 index f39f27f28..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_0131.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import worker from "@ohos.worker" - -const parentPort = worker.workerPort; - -parentPort.onmessage = function(e) { - let data = e.data; // hello world - parentPort.postMessage(data + " worker"); // hello world worker -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_014.js b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_014.js deleted file mode 100755 index 301a019f3..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_014.js +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import worker from "@ohos.worker" - -const parentPort = worker.workerPort; - -var ss = undefined; -var backValue = undefined; -var flag = false; - -parentPort.onmessage = function(e) { - let data = e.data; - switch(data.type) { - case "new": - ss = new worker.ThreadWorker("entry_test/ets/workers/newworker_0141.js"); - ss.onmessage = function(ee) { - backValue = ee.data; - flag = true; - } - ss.onexit = function() { - backValue = "terminate"; - flag = true; - } - ss.postMessage(data.value); - break; - case "wait": - if (flag) { - parentPort.postMessage(backValue); - } - break; - case "terminate": - flag = false; - ss.terminate(); - break; - default: - break; - } -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_0141.js b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_0141.js deleted file mode 100755 index 79f9330fe..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_0141.js +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import worker from "@ohos.worker" - -const parentPort = worker.workerPort; - -parentPort.onmessage = function(e) { - let data = e.data; - data[0] += 1 - parentPort.postMessage(data); // [2, 2] -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_015.js b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_015.js deleted file mode 100755 index 04234ae6d..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_015.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import worker from "@ohos.worker" - -const parentPort = worker.workerPort; - -var ss = undefined; -var backValue = undefined; -var flag = false; - -parentPort.onmessage = function(e) { - var data = e.data; - switch(data.type) { - case "new": - ss = new worker.ThreadWorker("entry_test/ets/workers/newworker_0151.js"); - ss.onexit = function() { - parentPort.postMessage(backValue); // 16 - } - ss.onmessage = function(ee) { - backValue = ee.data; // 16 - flag = true; - } - ss.postMessage({type: "new", value: data.value + 1}); // 11 - break; - case "wait": - ss.postMessage({type: "wait"}); - if (flag) { - ss.terminate(); - } - break; - default: - break; - } -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_0151.js b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_0151.js deleted file mode 100755 index 6fefdb739..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_0151.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import worker from "@ohos.worker" - -const parentPort = worker.workerPort; - -var ss = undefined; -var backValue = undefined; - -parentPort.onmessage = function(e) { - let data = e.data; - switch(data.type) { - case "new": - ss = new worker.ThreadWorker("entry_test/ets/workers/newworker_0152.js"); - ss.onmessage = function(ee) { - backValue = ee.data; - ss.terminate(); - } - ss.onexit = function() { - parentPort.postMessage(backValue); - } - ss.postMessage(data.value + 2); // 13 - break; - default: - break; - } -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_0152.js b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_0152.js deleted file mode 100755 index fa0d6dfd4..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_0152.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import worker from "@ohos.worker" - -const parentPort = worker.workerPort; - -parentPort.onmessage = function(e) { - let data = e.data; - parentPort.postMessage(data + 3); // 16 -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_016.js b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_016.js deleted file mode 100755 index d69080d55..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_016.js +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ - -import worker from '@ohos.worker'; -const parentPort = worker.workerPort; - -parentPort.onmessage = function(e) { - console.info("worker:: worker receive data " + e.data); - let data = e.data; - parentPort.postMessage(data.length); -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_017.js b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_017.js deleted file mode 100755 index 4e2866f06..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_017.js +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ - -import worker from '@ohos.worker'; -const workerPort = worker.workerPort; - -class MyModel { - name = "worker" - Init() { - this.name = "MyModel" - } -} - -workerPort.onmessage = function(e) { - let obj = new MyModel(); - workerPort.postMessage(obj); -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_018.js b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_018.js deleted file mode 100755 index 08face1f4..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_018.js +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ - -import worker from '@ohos.worker'; -const workerPort = worker.workerPort; - -workerPort.onmessage = function(e) { - const data = e.data; - data.add(1); - data.add(2); - workerPort.postMessage(data); -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_019.js b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_019.js deleted file mode 100755 index 5118e6318..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_019.js +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ - -import worker from '@ohos.worker'; -const workerPort = worker.workerPort; - -workerPort.onmessage = function(e) { - const data = e.data; - data.set("worker", "success"); - workerPort.postMessage(data); -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_020.js b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_020.js deleted file mode 100755 index 72947d8eb..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_020.js +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ - -import worker from '@ohos.worker'; -const workerPort = worker.workerPort; - -workerPort.onmessage = function(e) { - const data = e.data; - const view = new Int8Array(data).fill(3); - workerPort.postMessage(view); -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_021.js b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_021.js deleted file mode 100755 index 3829bed0d..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_021.js +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ - -import worker from '@ohos.worker'; -const workerPort = worker.workerPort; - -workerPort.onmessage = function(e) { - const data = e.data; - let str = "HI Worker"; - let newStr = str.replace(data, "$2, $1!"); - workerPort.postMessage(newStr); -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_022.js b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_022.js deleted file mode 100755 index 882302543..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_022.js +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ - -import worker from '@ohos.worker'; -const workerPort = worker.workerPort; - -workerPort.onmessage = function(e) { - try { - workerPort.postMessage(); - } catch (e) { - let data = e.message; - workerPort.postMessage(data); - } -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_023.js b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_023.js deleted file mode 100755 index dddd1a835..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_023.js +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ - -import worker from '@ohos.worker'; -const workerPort = worker.workerPort; - -workerPort.onmessage = function(e) { - try { - workerPort.postMessage("123", "123"); - } catch (e) { - let data = e.message; - workerPort.postMessage(data); - } -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_024.js b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_024.js deleted file mode 100755 index 0cc7f24ce..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_024.js +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ - -import worker from '@ohos.worker'; -const workerPort = worker.workerPort; - -workerPort.onmessage = function(e) { - try { - const symbol = Symbol(); - workerPort.postMessage(symbol); - } catch (e) { - let data = e.message; - workerPort.postMessage(data); - } -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_025.js b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_025.js deleted file mode 100755 index a97b237dd..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_025.js +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ - -import worker from '@ohos.worker'; -const workerPort = worker.workerPort; - -workerPort.onmessage = function(e) { - workerPort.close(); -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_026.js b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_026.js deleted file mode 100755 index c37b4e205..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_026.js +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ - -import worker from '@ohos.worker'; -const workerPort = worker.workerPort; - -workerPort.onmessage = function(e) { - let model = e.data; - let str = model.name; - workerPort.postMessage(str); -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_027.js b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_027.js deleted file mode 100755 index fab999317..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_027.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ - -import worker from '@ohos.worker'; -const workerPort = worker.workerPort; - -workerPort.onmessage = function(e) { - let model = e.data; - let str = model.Init(); -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_028.js b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_028.js deleted file mode 100755 index a0463554c..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_028.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import worker from "@ohos.worker" - -const parentPort = worker.workerPort; - -var ss = undefined; -var res = 0; -parentPort.onmessage = function(e) { - let data = e.data; - switch(data.type) { - case "new": - ss = new worker.ThreadWorker("entry_test/ets/workers/newworker_029.js"); - ss.onmessageerror = function (e) { - res++; - ss.terminate() - } - ss.onexit = function() { - parentPort.postMessage(res); - } - try { - const data = Symbol(); - ss.postMessage(data); - } catch (error) { - console.info("worker:: recv error message: " + error.message); - } - break; - default: - break; - } -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_029.js b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_029.js deleted file mode 100755 index 3829bed0d..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_029.js +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ - -import worker from '@ohos.worker'; -const workerPort = worker.workerPort; - -workerPort.onmessage = function(e) { - const data = e.data; - let str = "HI Worker"; - let newStr = str.replace(data, "$2, $1!"); - workerPort.postMessage(newStr); -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_030.js b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_030.js deleted file mode 100755 index 5bc996731..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_030.js +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ - -import worker from '@ohos.worker'; -const parentPort = worker.workerPort; - -parentPort.onmessage = function(e) { - parentPort.close() -} diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_031.js b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_031.js deleted file mode 100755 index 241f7ddae..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_031.js +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ - -import worker from '@ohos.worker'; -const parentPort = worker.workerPort; - -parentPort.onmessage = function(e) { - parentPort.postMessage("hello world") -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_032.js b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_032.js deleted file mode 100755 index ea3f72507..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_032.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import worker from "@ohos.worker" - -const parentPort = worker.workerPort; - -var ss = undefined; -var length = undefined; -var exception = undefined; -parentPort.onmessage = function(e) { - let data = e.data; - switch(data.type) { - case "new": - ss = new worker.ThreadWorker("entry_test/ets/workers/newworker_0031.js"); - ss.onexit = function () { - - parentPort.postMessage(exception); - } - const buffer = new ArrayBuffer(8) - ss.postMessage(buffer, [buffer]) - try { - length = buffer.byteLength - } catch (e) { - exception = e.message - } - - console.log("worker:: length is " + length) - console.log("worker:: exception is " + exception) - ss.terminate() - break; - default: - break; - } -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_033.js b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_033.js deleted file mode 100755 index 78e75378b..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_033.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ - -import worker from '@ohos.worker'; -const parentPort = worker.workerPort; - -parentPort.onmessage = function(e) { - let data = e.data; - console.info("worker:: worker thread worker data is " + data.data); - switch(data.type) { - case "normal": - console.info("worker:: worker thread receive data " + data.data); - parentPort.postMessage(data); - console.info("worker:: worker thread post back"); - break; - case "error": - throw new Error("123"); - case "buffer": - console.info("worker:: worker.js receive buffer length is " + data.data.byteLength); - parentPort.postMessage(data, [data.data]); - console.info("worker:: worker.js post buffer length is " + data.data.byteLength); - break; - case "self": - parentPort.postMessage(data.name); - default: - console.info("worker:: worker.js receive unknow type"); - break - } -} - -// Deserialization error -parentPort.onmessageerror = function() { - console.info("worker:: worker.js onmessageerror"); -} - -// js execution error -parentPort.onerror = function(data) { - console.info("worker:: worker.js onerror " + data.lineno + ", msg = " + data.message + ", filename = " + data.filename + ", colno = " + data.colno); -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_034.js b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_034.js deleted file mode 100755 index 2fa7891cd..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_034.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ - -import worker from '@ohos.worker'; -const parentPort = worker.workerPort; - -parentPort.onmessage = function(e) { - parentPort.postMessage(parentPort.name) - throw new Error("123") -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_035.js b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_035.js deleted file mode 100755 index 3e4ca9666..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_035.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import worker from "@ohos.worker" -const parentPort = worker.workerPort; - -var ss = undefined; -let res = undefined; -let mse = undefined; -parentPort.onmessage = function(e) { - let data = e.data; - switch(data.type) { - case "new": - ss = new worker.ThreadWorker("entry_test/ets/workers/newworker_034.js", {name:"worker"}); - ss.onerror = function (e) { - res = e.message; - parentPort.postMessage(res); - } - ss.onmessage = function (e) { - mse = e.data - } - ss.postMessage("hello world"); - break; - default: - break; - } -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_036.js b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_036.js deleted file mode 100755 index 78e75378b..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/ets/workers/newworker_036.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ - -import worker from '@ohos.worker'; -const parentPort = worker.workerPort; - -parentPort.onmessage = function(e) { - let data = e.data; - console.info("worker:: worker thread worker data is " + data.data); - switch(data.type) { - case "normal": - console.info("worker:: worker thread receive data " + data.data); - parentPort.postMessage(data); - console.info("worker:: worker thread post back"); - break; - case "error": - throw new Error("123"); - case "buffer": - console.info("worker:: worker.js receive buffer length is " + data.data.byteLength); - parentPort.postMessage(data, [data.data]); - console.info("worker:: worker.js post buffer length is " + data.data.byteLength); - break; - case "self": - parentPort.postMessage(data.name); - default: - console.info("worker:: worker.js receive unknow type"); - break - } -} - -// Deserialization error -parentPort.onmessageerror = function() { - console.info("worker:: worker.js onmessageerror"); -} - -// js execution error -parentPort.onerror = function(data) { - console.info("worker:: worker.js onerror " + data.lineno + ", msg = " + data.message + ", filename = " + data.filename + ", colno = " + data.colno); -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/module.json b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/module.json deleted file mode 100755 index a4443e713..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/module.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "module": { - "name": "entry_test", - "type": "feature", - "description": "$string:module_test_desc", - "mainElement": "TestAbility", - "deviceTypes": [ - "phone" - ], - "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", - "skills": [ - { - "actions": [ - "action.system.home" - ], - "entities": [ - "entity.system.home" - ] - } - ] - } - ] - } -} diff --git a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/resources/base/element/color.json b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/resources/base/element/color.json deleted file mode 100755 index 3c712962d..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/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/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/resources/base/element/string.json b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/resources/base/element/string.json deleted file mode 100755 index 65d8fa5a7..000000000 --- a/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/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/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/resources/base/media/icon.png b/commonlibrary/crossplatform/commonlibraryWorkeretstest/src/main/resources/base/media/icon.png deleted file mode 100755 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6BLrPFWk?s;$LOP{GmJpBl$qoSA!PUg~PA65-S00{{S`XKG6NkG0RgjEntPrmV+?0|00mu7;+5 zrdpa{2QLqPJ4Y{j7=Mrl{BaxrkdY69+c~(w{Fv-v&aR%aEI&JYSeRTLWm!zbv;?)_ ziZB;fwGbbeL5Q}YLx`J$lp~A09KK8t_z}PZ=4ZzgdeKtgoc+o5EvN9A1K1_<>M?MBqb#!ASf&# zEX?<)!RH(7>1P+j=jqG(58}TVN-$psA6K}atCuI!KTJD&FMmH-78ZejBm)0qc{ESp z|LuG1{QnBUJRg_E=h1#XMWt2%fcoN@l7eAS!Es?Q+;XsRNPhiiE=@AqlLkJzF`O18 zbsbSmKN=aaq8k3NFYZfDWpKmM!coBU0(XnL8R{4=i|wi{!uWYM2je{U{B*K2PVdu&=E zTq*-XsEsJ$u5H4g6DIm2Y!DN`>^v|AqlwuCD;w45K0@eqauiqWf7l&o)+YLHm~|L~ z7$0v5mkobriU!H<@mVJHLlmQqzQ3d6Rh_-|%Yy2li*tHO>_vcnuZ7OR_xkAIuIU&x z-|8Y0wj|6|a6_I(v91y%k_kNw6pnkNdxjqG8!%Vz_d%c_!X+6-;1`GC9_FpjoHev5fEV7RhJ>r=mh-jp$fqbqRJ=obwdgLDVP5+s zy1=_DWG0Y-Jb3t^WXmkr(d9~08k-|#Ly zaNOmT(^9tIb&eb4%CzIT zAm3CUtWSr1t4?h1kk#NBi{U|pJslvME{q|_eS^3En>SOq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a`e5R@)+5d9&)@hTC$(QJ diff --git a/commonlibrary/crossplatform/commonlibrarybufferetstest/src/main/ets/TestAbility/TestAbility.ets b/commonlibrary/crossplatform/commonlibrarybufferetstest/src/main/ets/TestAbility/TestAbility.ets deleted file mode 100755 index a535e83f7..000000000 --- a/commonlibrary/crossplatform/commonlibrarybufferetstest/src/main/ets/TestAbility/TestAbility.ets +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import UIAbility from '@ohos.app.ability.UIAbility'; -import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; -import hilog from '@ohos.hilog'; -import { Hypium } from '@ohos/hypium'; -import testsuite from '../test/List.test'; -import window from '@ohos.window'; - -export default class TestAbility extends UIAbility { - onCreate(want, 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) ?? ''); - var abilityDelegator: any - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var abilityDelegatorArguments: any - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - hilog.info(0x0000, 'testTag', '%{public}s', 'start run testcase!!!'); - Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) - } - - onDestroy() { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onDestroy'); - } - - onWindowStageCreate(windowStage: window.WindowStage) { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageCreate'); - windowStage.loadContent('TestAbility/pages/Index', (err, data) => { - 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. Data: %{public}s', - JSON.stringify(data) ?? ''); - }); - } - - 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/commonlibrary/crossplatform/commonlibrarybufferetstest/src/main/ets/TestAbility/pages/Index.ets b/commonlibrary/crossplatform/commonlibrarybufferetstest/src/main/ets/TestAbility/pages/Index.ets deleted file mode 100755 index dbc536ca8..000000000 --- a/commonlibrary/crossplatform/commonlibrarybufferetstest/src/main/ets/TestAbility/pages/Index.ets +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import hilog from '@ohos.hilog'; - -@Entry -@Component -struct Index { - aboutToAppear() { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility index aboutToAppear'); - } - @State message: string = 'Hello World' - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Button() { - Text('next page') - .fontSize(20) - .fontWeight(FontWeight.Bold) - }.type(ButtonType.Capsule) - .margin({ - top: 20 - }) - .backgroundColor('#0D9FFB') - .width('35%') - .height('5%') - .onClick(()=>{ - }) - } - .width('100%') - } - .height('100%') - } - } \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibrarybufferetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/commonlibrary/crossplatform/commonlibrarybufferetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts deleted file mode 100755 index 92a16d84e..000000000 --- a/commonlibrary/crossplatform/commonlibrarybufferetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts +++ /dev/null @@ -1,49 +0,0 @@ -import hilog from '@ohos.hilog'; -import TestRunner from '@ohos.application.testRunner'; -import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; - -var abilityDelegator = undefined -var abilityDelegatorArguments = undefined - -async function onAbilityCreateCallback() { - hilog.info(0x0000, 'testTag', '%{public}s', 'onAbilityCreateCallback'); -} - -async function addAbilityMonitorCallback(err: any) { - 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() { - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun run'); - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var testAbilityName = abilityDelegatorArguments.bundleName + '.TestAbility' - let lMonitor = { - abilityName: testAbilityName, - onAbilityCreate: onAbilityCreateCallback, - }; - abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) - var cmd = 'aa start -d 0 -a TestAbility' + ' -b ' + abilityDelegatorArguments.bundleName - var debug = abilityDelegatorArguments.parameters['-D'] - if (debug == 'true') - { - cmd += ' -D' - } - hilog.info(0x0000, 'testTag', 'cmd : %{public}s', cmd); - abilityDelegator.executeShellCommand(cmd, - (err: any, d: any) => { - hilog.info(0x0000, 'testTag', 'executeShellCommand : err : %{public}s', JSON.stringify(err) ?? ''); - hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.stdResult ?? ''); - hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.exitCode ?? ''); - }) - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun end'); - } -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibrarybufferetstest/src/main/ets/test/Buffer.test.ets b/commonlibrary/crossplatform/commonlibrarybufferetstest/src/main/ets/test/Buffer.test.ets deleted file mode 100755 index 627a7f3dc..000000000 --- a/commonlibrary/crossplatform/commonlibrarybufferetstest/src/main/ets/test/Buffer.test.ets +++ /dev/null @@ -1,4003 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; -import buffer from "@ohos.buffer"; - -type BufferEncoding = "ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "base64url" | "latin1" | "binary" | "hex"; -export default function BufferTest() { - describe("BufferTest", function () { - /** - * @tc.number : TEST_ALLOC_001 - * @tc.name : testAlloc001 - * @tc.desc : Allocates a new Buffer for a fixed size bytes. If fill is undefined, the Buffer will be zero-filled. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer.alloc(10); - */ - it("testAlloc001", 0, function () { - let buf = buffer.alloc(10); - expect(buf.length).assertEqual(10); - }); - - /** - * @tc.number : TEST_ALLOC_002 - * @tc.name : testAlloc002 - * @tc.desc : Allocates a new Buffer for a fixed size bytes. If fill is undefined, the Buffer will be zero-filled. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer.alloc(10).fill(string); - */ - it("testAlloc002", 0, function () { - let encodeArr: BufferEncoding[] = ["utf8", "utf-8", "ucs2", "ucs-2", "ascii", "latin1", "binary", "utf16le", "base64", "base64url", "hex"]; - for (const encode of encodeArr) { - let buf = buffer.alloc(10).fill("ab$#", undefined, undefined, encode); - expect(buf.length).assertEqual(10); - } - }); - - /** - * @tc.number : TEST_ALLOC_003 - * @tc.name : testAlloc003 - * @tc.desc : Allocates a new Buffer for a fixed size bytes. If fill is undefined, the Buffer will be zero-filled. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer.alloc(10).fill(buffer); - */ - it("testAlloc003", 0, function () { - let buf1 = buffer.alloc(10); - let buf = buffer.alloc(10).fill(buf1); - expect(buf.length).assertEqual(10); - }); - - /** - * @tc.number : TEST_ALLOC_004 - * @tc.name : testAlloc004 - * @tc.desc : Allocates a new Buffer for a fixed size bytes. If fill is undefined, the Buffer will be zero-filled. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer.alloc(0); - */ - it("testAlloc004", 0, function () { - let buf = buffer.alloc(0); - expect(buf.length).assertEqual(0); - }); - - /** - * @tc.number : TEST_ALLOC_005 - * @tc.name : testAlloc005 - * @tc.desc : Allocates a new Buffer for a fixed size bytes. If fill is undefined, the Buffer will be zero-filled. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer.alloc(0).fill(string, encode); - */ - it("testAlloc005", 0, function () { - let encodeArr: BufferEncoding[] = ["utf8", "utf-8", "ucs2", "ucs-2", "ascii", "latin1", "binary", "utf16le", "base64", "base64url", "hex"]; - for (const encode of encodeArr) { - let buf = buffer.alloc(0).fill("ab$#", undefined, undefined, encode); - expect(buf.length).assertEqual(0); - } - }); - - /** - * @tc.number : TEST_ALLOC_006 - * @tc.name : testAlloc006 - * @tc.desc : Allocates a new Buffer for a fixed size bytes. If fill is undefined, the Buffer will be zero-filled. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer.alloc(0).fill(buffer); - */ - it("testAlloc006", 0, function () { - let buf1 = buffer.alloc(10); - let buf = buffer.alloc(0).fill(buf1); - expect(buf.length).assertEqual(0); - }); - - /** - * @tc.number : TEST_ALLOC_007 - * @tc.name : testAlloc007 - * @tc.desc : Allocates a new Buffer for a fixed size bytes. If fill is undefined, the Buffer will be zero-filled. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer.alloc(-5); - */ - it("testAlloc007", 0, function () { - try { - let buf = buffer.alloc(-5); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The type of "size" must be number and the value cannot be negative. Received value is: -5'); - } - }); - - /** - * @tc.number : TEST_ALLOC_008 - * @tc.name : testAlloc008 - * @tc.desc : Allocates a new Buffer for a fixed size bytes. If fill is undefined, the Buffer will be zero-filled. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer.alloc(10, string, encode); - */ - it("testAlloc008", 0, function () { - let encodeArr: BufferEncoding[] = ["utf8", "utf-8", "ucs2", "ucs-2", "ascii", "latin1", "binary", "utf16le", "base64", "base64url", "hex"]; - for (const encode of encodeArr) { - let buf = buffer.alloc(10, "ab$#", encode); - expect(buf.length).assertEqual(10); - } - }); - - /** - * @tc.number : TEST_ALLOC_009 - * @tc.name : testAlloc009 - * @tc.desc : Allocates a new Buffer for a fixed size bytes. If fill is undefined, the Buffer will be zero-filled. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer.alloc(0).fill(string, encode); - */ - it("testAlloc009", 0, function () { - let encodeArr: BufferEncoding[] = ["utf8", "utf-8", "ucs2", "ucs-2", "ascii", "latin1", "binary", "utf16le", "base64", "base64url", "hex"]; - for (const encode of encodeArr) { - let buf = buffer.alloc(0, "ab$#", encode); - expect(buf.length).assertEqual(0); - } - }); - - /** - * @tc.number : TEST_ALLOC_010 - * @tc.name : testAlloc010 - * @tc.desc : Allocates a new Buffer for a fixed size bytes. If fill is undefined, the Buffer will be zero-filled. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer.alloc(5.5); - */ - it("testAlloc010", 0, function () { - let buf = buffer.alloc(5.5); - expect(buf.length).assertEqual(5); - }); - - /** - * @tc.number : TEST_ALLOC_UNINITIALIZED_001 - * @tc.name : testAllocUninitialized001 - * @tc.desc : Allocates a new un-pooled Buffer for a fixed size bytes. The Buffer will not be initially filled. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer.allocUninitialized(10); - */ - it("testAllocUninitialized001", 0, function () { - let buf = buffer.allocUninitialized(10); - expect(buf.length).assertEqual(10); - }); - - /** - * @tc.number : TEST_ALLOC_UNINITIALIZED_002 - * @tc.name : testAllocUninitialized002 - * @tc.desc : Allocates a new un-pooled Buffer for a fixed size bytes. The Buffer will not be initially filled. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer.allocUninitialized(0); - */ - it("testAllocUninitialized002", 0, function () { - let buf = buffer.allocUninitialized(0); - expect(buf.length).assertEqual(0); - }); - - /** - * @tc.number : TEST_ALLOC_UNINITIALIZED_003 - * @tc.name : testAllocUninitialized003 - * @tc.desc : Allocates a new un-pooled Buffer for a fixed size bytes. The Buffer will not be initially filled. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer.allocUninitialized(-5); - */ - it("testAllocUninitialized003", 0, function () { - try { - let buf = buffer.allocUninitialized(-5); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The type of "size" must be number and the value cannot be negative. Received value is: -5'); - } - }); - - /** - * @tc.number : TEST_ALLOC_UNINITIALIZED_FROM_POOL_001 - * @tc.name : testAllocUninitializedFromPool001 - * @tc.desc : Allocates a new un-pooled Buffer for a fixed size bytes. The Buffer will not be initially filled. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer.allocUninitializedFromPool(10); - */ - it("testAllocUninitializedFromPool001", 0, function () { - let buf = buffer.allocUninitializedFromPool(10); - expect(buf.length).assertEqual(10); - }); - - /** - * @tc.number : TEST_ALLOC_UNINITIALIZED_FROM_POOL_002 - * @tc.name : testAllocUninitializedFromPool002 - * @tc.desc : Allocates a new un-pooled Buffer for a fixed size bytes. The Buffer will not be initially filled. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer.allocUninitializedFromPool(10); - */ - it("testAllocUninitializedFromPool002", 0, function () { - let encodeArr: BufferEncoding[] = ["utf8", "utf-8", "ucs2", "ucs-2", "ascii", "latin1", "binary", "utf16le", "base64", "base64url", "hex"]; - for (const encode of encodeArr) { - let buf = buffer.allocUninitializedFromPool(10).fill("abcd", undefined, undefined, encode); - expect(buf.length).assertEqual(10); - } - }); - - /** - * @tc.number : TEST_ALLOC_UNINITIALIZED_FROM_POOL_003 - * @tc.name : testAllocUninitializedFromPool003 - * @tc.desc : Allocates a new un-pooled Buffer for a fixed size bytes. The Buffer will not be initially filled. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer.allocUninitializedFromPool(10).fill(buffer); - */ - it("testAllocUninitializedFromPool003", 0, function () { - let buf1 = buffer.allocUninitializedFromPool(10); - let buf = buffer.allocUninitializedFromPool(10).fill(buf1); - expect(buf.length).assertEqual(10); - }); - - /** - * @tc.number : TEST_ALLOC_UNINITIALIZED_FROM_POOL_004 - * @tc.name : testAllocUninitializedFromPool004 - * @tc.desc : Allocates a new un-pooled Buffer for a fixed size bytes. The Buffer will not be initially filled. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer.allocUninitializedFromPool(0); - */ - it("testAllocUninitializedFromPool004", 0, function () { - let buf = buffer.allocUninitializedFromPool(0); - expect(buf.length).assertEqual(0); - }); - - /** - * @tc.number : TEST_ALLOC_UNINITIALIZED_FROM_POOL_005 - * @tc.name : testAllocUninitializedFromPool005 - * @tc.desc : Allocates a new un-pooled Buffer for a fixed size bytes. The Buffer will not be initially filled. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer.allocUninitializedFromPool(0).fill(string, encode); - */ - it("testAllocUninitializedFromPool005", 0, function () { - let encodeArr: BufferEncoding[] = ["utf8", "utf-8", "ucs2", "ucs-2", "ascii", "latin1", "binary", "utf16le", "base64", "base64url", "hex"]; - for (const encode of encodeArr) { - let buf = buffer.allocUninitializedFromPool(0).fill("abcd", undefined, undefined, encode); - expect(buf.length).assertEqual(0); - } - }); - - /** - * @tc.number : TEST_ALLOC_UNINITIALIZED_FROM_POOL_006 - * @tc.name : testAllocUninitializedFromPool006 - * @tc.desc : Allocates a new un-pooled Buffer for a fixed size bytes. The Buffer will not be initially filled. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer.allocUninitializedFromPool(10).fill(buffer); - */ - it("testAllocUninitializedFromPool006", 0, function () { - let buf1 = buffer.allocUninitializedFromPool(10); - let buf = buffer.allocUninitializedFromPool(0).fill(buf1); - expect(buf.length).assertEqual(0); - }); - - /** - * @tc.number : TEST_ALLOC_UNINITIALIZED_FROM_POOL_007 - * @tc.name : testAllocUninitializedFromPool007 - * @tc.desc : Allocates a new un-pooled Buffer for a fixed size bytes. The Buffer will not be initially filled. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer.allocUninitializedFromPool(-5); - */ - it("testAllocUninitializedFromPool007", 0, function () { - try { - let buf = buffer.allocUninitializedFromPool(-5); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The type of "size" must be number and the value cannot be negative. Received value is: -5'); - } - }); - - /** - * @tc.number : TEST_ALLOC_UNINITIALIZED_FROM_POOL_008 - * @tc.name : testAllocUninitializedFromPool008 - * @tc.desc : Allocates a new un-pooled Buffer for a fixed size bytes. The Buffer will not be initially filled. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer.allocUninitializedFromPool(5.5); - */ - it("testAllocUninitializedFromPool008", 0, function () { - let buf = buffer.allocUninitializedFromPool(5.5); - expect(buf.length).assertEqual(5); - }); - - /** - * @tc.number : TEST_BYTE_LENGTH_001 - * @tc.name : testByteLength001 - * @tc.desc : Returns the byte length of a string when encoded using `encoding`. - * This is not the same as [`String.prototype.length`], which does not account - * for the encoding that is used to convert the string into bytes. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer.byteLength("abcd"); - */ - it("testByteLength001", 0, function () { - let byteLen = buffer.byteLength("abcd"); - expect(byteLen).assertEqual(4); - }); - - /** - * @tc.number : TEST_BYTE_LENGTH_002 - * @tc.name : testByteLength002 - * @tc.desc : Returns the byte length of a string when encoded using `encoding`. - * This is not the same as [`String.prototype.length`], which does not account - * for the encoding that is used to convert the string into bytes. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer.byteLength("测试"); - */ - it("testByteLength002", 0, function () { - let byteLen = buffer.byteLength("测试"); - expect(byteLen).assertEqual(6); - }); - - /** - * @tc.number : TEST_BYTE_LENGTH_003 - * @tc.name : testByteLength003 - * @tc.desc : Returns the byte length of a string when encoded using `encoding`. - * This is not the same as [`String.prototype.length`], which does not account - * for the encoding that is used to convert the string into bytes. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer.byteLength("$&@*%"); - */ - it("testByteLength003", 0, function () { - let byteLen = buffer.byteLength("$&@*%"); - expect(byteLen).assertEqual(5); - }); - - /** - * @tc.number : TEST_BYTE_LENGTH_004 - * @tc.name : testByteLength004 - * @tc.desc : Returns the byte length of a string when encoded using `encoding`. - * This is not the same as [`String.prototype.length`], which does not account - * for the encoding that is used to convert the string into bytes. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer.byteLength(string, encode); - */ - it("testByteLength004", 0, function () { - let encodeArr: BufferEncoding[] = ["utf8", "utf-8", "ucs2", "ucs-2", "ascii", "latin1", "binary", "utf16le", "base64", "base64url", "hex"]; - let result = [4, 4, 8, 8, 4, 4, 4, 8, 3, 3, 2]; - for (let i = 0, len = encodeArr.length; i < len; i++) { - let byteLen = buffer.byteLength("abcd", encodeArr[i]); - expect(byteLen).assertEqual(result[i]); - } - }); - - /** - * @tc.number : TEST_BYTE_LENGTH_005 - * @tc.name : testByteLength005 - * @tc.desc : Returns the byte length of a string when encoded using `encoding`. - * This is not the same as [`String.prototype.length`], which does not account - * for the encoding that is used to convert the string into bytes. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer.byteLength(arrayBuffer); - */ - it("testByteLength005", 0, function () { - let uintarr = new Uint8Array(2); - uintarr[0] = 21; - uintarr[1] = 31; - let byteLen = buffer.byteLength(uintarr.buffer); - expect(byteLen).assertEqual(2); - }); - - /** - * @tc.number : TEST_CONCAT_001 - * @tc.name : testConcat001 - * @tc.desc : Returns a new `Buffer` which is the result of concatenating - * all the `Buffer`instances in the `list` together. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let buf1 = buffer.from("1236"); - * let buf2 = buffer.from("1235"); - * let buf = buffer.concat([buf1, buf2]); - */ - it("testConcat001", 0, function () { - let buf1 = buffer.from("1236"); - let buf2 = buffer.from("1235"); - let buf = buffer.concat([buf1, buf2]); - let str = buf.toString(); - expect(str).assertEqual("12361235"); - }); - - /** - * @tc.number : TEST_CONCAT_002 - * @tc.name : testConcat002 - * @tc.desc : Returns a new `Buffer` which is the result of concatenating - * all the `Buffer`instances in the `list` together. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let buf1 = buffer.from("测试"); - * let buf2 = buffer.from("$&*"); - * let buf = buffer.concat([buf1, buf2]); - */ - it("testConcat002", 0, function () { - let buf1 = buffer.from("测试"); - let buf2 = buffer.from("$&*"); - let buf = buffer.concat([buf1, buf2]); - let str = buf.toString(); - expect(str).assertEqual("测试$&*"); - }); - - /** - * @tc.number : TEST_CONCAT_003 - * @tc.name : testConcat003 - * @tc.desc : Returns a new `Buffer` which is the result of concatenating - * all the `Buffer`instances in the `list` together. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let buf1 = buffer.from("123$"); - * let buf2 = buffer.from("*35"); - * let buf = buffer.concat([buf1, buf2]); - */ - it("testConcat003", 0, function () { - let buf1 = buffer.from("123$"); - let buf2 = buffer.from("*35"); - let buf3 = buffer.concat([buf1, buf2]); - let buf = buffer.alloc(5).fill(buf3); - let str = buf.toString(); - expect(str).assertEqual("123$*"); - }); - - /** - * @tc.number : TEST_CONCAT_004 - * @tc.name : testConcat004 - * @tc.desc : Returns a new `Buffer` which is the result of concatenating - * all the `Buffer`instances in the `list` together. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let buf1 = buffer.from("123$"); - * let buf2 = buffer.from("*35"); - * let buf = buffer.concat([buf1, buf2]); - */ - it("testConcat004", 0, function () { - let buf1 = buffer.from("123$"); - let buf2 = buffer.from("*35"); - try { - let buf = buffer.concat([buf1, buf2], -1); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "totalLength" is out of range. It must be >= 0 and <= 4294967296. Received value is: -1'); - } - }); - - /** - * @tc.number : TEST_FROM_001 - * @tc.name : testFrom001 - * @tc.desc : Copies the passed buffer data onto a new Buffer instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer.from(uint8Array); - */ - it("testFrom001", 0, function () { - let uarr = new Uint8Array(3); - uarr[0] = 0x12; - uarr[1] = 0x34; - uarr[2] = 0x56; - let buf = buffer.from(uarr); - let str = buf.toString("hex"); - expect(str).assertEqual("123456"); - }); - - /** - * @tc.number : TEST_FROM_002 - * @tc.name : testFrom002 - * @tc.desc : Allocates a new Buffer using an array of bytes in the range 0 – 255. - * Array entries outside that range will be truncated to fit into it. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer.from(array); - */ - it("testFrom002", 0, function () { - const buf = buffer.from([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]); - let str = buf.toString("hex"); - expect(str).assertEqual("627566666572"); - }); - - /** - * @tc.number : TEST_FROM_003 - * @tc.name : testFrom003 - * @tc.desc : This creates a view of the ArrayBuffer without copying the underlying memory. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer.from(arrayBuffer); - */ - it("testFrom003", 0, function () { - const arr = new Uint8Array(2); - arr[0] = 97; - arr[1] = 98; - const buf = buffer.from(arr.buffer); - arr[0] = 99; - buf[1] = 100; - let str = buf.toString("hex"); - expect(str).assertEqual("6364"); - expect(arr[1]).assertEqual(100); - }); - - /** - * @tc.number : TEST_FROM_004 - * @tc.name : testFrom004 - * @tc.desc : This creates a view of the ArrayBuffer without copying the underlying memory. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer.from(arrayBuffer, byteOffset); - */ - it("testFrom004", 0, function () { - const arr = new Uint8Array(2); - arr[0] = 97; - arr[1] = 98; - const buf = buffer.from(arr.buffer, 1); - buf[0] = 99; - buf[1] = 100; - let str = buf.toString("hex"); - expect(str).assertEqual("63"); - expect(arr[1]).assertEqual(99); - expect(buf[0]).assertEqual(99); - expect(buf[1]).assertEqual(undefined); - }); - - /** - * @tc.number : TEST_FROM_005 - * @tc.name : testFrom005 - * @tc.desc : This creates a view of the ArrayBuffer without copying the underlying memory. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer2.from(buffer1); - */ - it("testFrom005", 0, function () { - const buf1 = buffer.from("buffer"); - const buf2 = buffer.from(buf1); - buf1[0] = 0x61; - let str = buf1.toString(); - expect(str).assertEqual("auffer"); - str = buf2.toString(); - expect(str).assertEqual("buffer"); - }); - - /** - * @tc.number : TEST_FROM_006 - * @tc.name : testFrom006 - * @tc.desc : This creates a view of the ArrayBuffer without copying the underlying memory. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer.from(string); - */ - it("testFrom006", 0, function () { - const buf1 = buffer.from("this is a test"); - let str = buf1.toString(); - expect(str).assertEqual("this is a test"); - }); - - /** - * @tc.number : TEST_FROM_007 - * @tc.name : testFrom007 - * @tc.desc : Creates a new Buffer containing string. The encoding parameter identifies the character encoding - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer.from(string, encoding); - */ - it("testFrom007", 0, function () { - const buf1 = buffer.from("F1刘FG", "hex"); - let str = buf1.toString("hex"); - expect(str).assertEqual("f1"); - - let buf2 = buffer.from("F1FG", "ascii"); - str = buf2.toString("ascii"); - expect(str).assertEqual("F1FG"); - - let buf3 = buffer.from("F1FG刘", "base64"); - str = buf3.toString("base64"); - expect(str).assertEqual("F1FG"); - - let buf4 = buffer.from("F1FG刘", "base64url"); - str = buf4.toString("base64url"); - expect(str).assertEqual("F1FG"); - - let buf5 = buffer.from("F1FG", "binary"); - str = buf5.toString("binary"); - expect(str).assertEqual("F1FG"); - - let buf6 = buffer.from("F1FG", "latin1"); - str = buf6.toString("latin1"); - expect(str).assertEqual("F1FG"); - - let buf7 = buffer.from("F1FG刘", "ucs2"); - str = buf7.toString("ucs2"); - expect(str).assertEqual("F1FG刘"); - - let buf8 = buffer.from("F1FG刘", "utf16le"); - str = buf8.toString("utf16le"); - expect(str).assertEqual("F1FG刘"); - - let buf9 = buffer.from("F1FG刘", "ucs2"); - str = buf9.toString("ucs2"); - expect(str).assertEqual("F1FG刘"); - - let buf10 = buffer.from("F1FG刘", "utf-8"); - str = buf10.toString("utf-8"); - expect(str).assertEqual("F1FG刘"); - - let buf11 = buffer.from("F1FG刘", "utf8"); - str = buf11.toString("utf8"); - expect(str).assertEqual("F1FG刘"); - }); - - /** - * @tc.number : TEST_FROM_008 - * @tc.name : testFrom008 - * @tc.desc : For the object whose value returned by valueof() function is strictly equal to object - * or supports symbol To primitive object, a new buffer instance is created. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer.from(object); - */ - it("testFrom008", 0, function () { - const buf = buffer.from(new String("this is a test")); - let str = buf.toString(); - expect(str).assertEqual("this is a test"); - }); - - /** - * @tc.number : TEST_FROM_009 - * @tc.name : testFrom009 - * @tc.desc : For the object whose value returned by valueof() function is strictly equal to object - * or supports symbol To primitive object, a new buffer instance is created. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer.from(object); - */ - it("testFrom009", 0, function () { - const buf = buffer.from(new String("this is a test"), "utf8", 14); - let str = buf.toString(); - expect(str).assertEqual("this is a test"); - }); - - /** - * @tc.number : TEST_IS_BUFFER_001 - * @tc.name : testIsBuffer001 - * @tc.desc : Returns true if obj is a Buffer, false otherwise - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer.isBuffer(buf); - */ - it("testIsBuffer001", 0, function () { - let buf = buffer.alloc(1); - let flag = buffer.isBuffer(buf); - expect(flag).assertEqual(true); - }); - - /** - * @tc.number : TEST_IS_BUFFER_002 - * @tc.name : testIsBuffer002 - * @tc.desc : Returns true if obj is a Buffer, false otherwise - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer.isBuffer(buf); - */ - it("testIsBuffer002", 0, function () { - let obj = new Object(1); - let flag = buffer.isBuffer(obj); - expect(flag).assertEqual(false); - }); - - /** - * @tc.number : TEST_IS_ENCODING_001 - * @tc.name : testIsEncoding001 - * @tc.desc : Returns true if encoding is the name of a supported character encoding, or false otherwise. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer.isEncoding("utf8"); - */ - it("testIsEncoding001", 0, function () { - let flag = buffer.isEncoding("utf8"); - expect(flag).assertEqual(true); - }); - - /** - * @tc.number : TEST_IS_ENCODING_002 - * @tc.name : testIsEncoding002 - * @tc.desc : Returns true if encoding is the name of a supported character encoding, or false otherwise. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer.isEncoding(encode); - */ - it("testIsEncoding002", 0, function () { - let encodeArr = ["utf8", "utf-8", "ucs2", "ucs-2", "ascii", "latin1", "binary", "utf16le", "utf-16le", "base64", "base64url", "hex"]; - for (const encode of encodeArr) { - let flag = buffer.isEncoding(encode); - expect(flag).assertEqual(true); - } - }); - - /** - * @tc.number : TEST_IS_ENCODING_003 - * @tc.name : testIsEncoding003 - * @tc.desc : Returns true if encoding is the name of a supported character encoding, or false otherwise. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer.isEncoding('gbk'); - */ - it("testIsEncoding003", 0, function () { - let flag = buffer.isEncoding("gbk"); - expect(flag).assertEqual(false); - }); - - /** - * @tc.number : TEST_COMPARE_001 - * @tc.name : testCompare001 - * @tc.desc : Compares buf with target and returns a number indicating whether buf comes before, after, - * or is the same as target in sort order. Comparison is based on the actual sequence of - * bytes in each Buffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer.isEncoding('gbk'); - */ - it("testCompare001", 0, function () { - let buf1 = buffer.from("1236"); - let buf2 = buffer.from("1235"); - let res = buffer.compare(buf1, buf2); - expect(res).assertEqual(1); - }); - - /** - * @tc.number : TEST_TRANSCODE_001 - * @tc.name : testTranscode001 - * @tc.desc : Re-encodes the given Buffer or Uint8Array instance from one character encoding to another. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer.transcode(buf1, "ascii", "ucs2"); - */ - it("testTranscode001", 0, function () { - let buf1 = buffer.from("1236"); - let buf = buffer.transcode(buf1, "ascii", "ucs2"); - let str = buf.toString("ucs2"); - expect(str).assertEqual("1236"); - }); - - /** - * @tc.number : TEST_TRANSCODE_002 - * @tc.name : testTranscode002 - * @tc.desc : Re-encodes the given Buffer or Uint8Array instance from one character encoding to another. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer.transcode(buf1, "ascii", "ucs2"); - */ - it("testTranscode002", 0, function () { - let buf1 = buffer.from("测试"); - let buf = buffer.transcode(buf1, "utf8", "ucs2"); - let str = buf.toString("ucs2"); - expect(str).assertEqual("测试"); - }); - - /** - * @tc.number : TEST_FILL_001 - * @tc.name : testFill001 - * @tc.desc : Fills buf with the specified value. If the offset and end are not given, the entire buf will be filled. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer.alloc(3).fill("abc"); - */ - it("testFill001", 0, function () { - let buf = buffer.alloc(3).fill("abc"); - let str = buf.toString(); - expect(str).assertEqual("abc"); - }); - - /** - * @tc.number : TEST_FILL_002 - * @tc.name : testFill002 - * @tc.desc : Fills buf with the specified value. If the offset and end are not given, the entire buf will be filled. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer.alloc(10).fill('F1刘FG', 0, 10, 'hex'); - */ - it("testFill002", 0, function () { - const buf1 = buffer.alloc(10).fill("F1刘FG", 0, 10, "hex"); - let str = buf1.toString("hex"); - expect(str).assertEqual("f1f1f1f1f1f1f1f1f1f1"); - - let buf2 = buffer.alloc(10).fill("F1刘FG", 0, 10, "ascii"); - str = buf2.toString("hex"); - expect(str).assertEqual("46311846474631184647"); - - let buf3 = buffer.alloc(10).fill("F1FG", 0, 10, "base64"); - str = buf3.toString("hex"); - expect(str).assertEqual("17514617514617514617"); - - let buf4 = buffer.alloc(10).fill("F1刘FG", 0, 10, "binary"); - str = buf4.toString("hex"); - expect(str).assertEqual("46311846474631184647"); - - let buf5 = buffer.alloc(10).fill("F1刘FG", 0, 10, "latin1"); - str = buf5.toString("hex"); - expect(str).assertEqual("46311846474631184647"); - - let buf6 = buffer.alloc(10).fill("F1刘FG", 0, 10, "ucs2"); - str = buf6.toString("hex"); - expect(str).assertEqual("46003100185246004700"); - - let buf7 = buffer.alloc(10).fill("F1刘FG", 0, 10, "utf8"); - str = buf7.toString("hex"); - expect(str).assertEqual("4631e5889846474631e5"); - }); - - /** - * @tc.number : TEST_FILL_003 - * @tc.name : testFill003 - * @tc.desc : Fills buf with the specified value. If the offset and end are not given, the entire buf will be filled. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer.alloc(3).fill("$*$"); - */ - it("testFill003", 0, function () { - let buf = buffer.alloc(3).fill("$*$"); - let str = buf.toString(); - expect(str).assertEqual("$*$"); - }); - - /** - * @tc.number : TEST_FILL_004 - * @tc.name : testFill004 - * @tc.desc : Fills buf with the specified value. If the offset and end are not given, the entire buf will be filled. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer.alloc(3).fill("$*$"); - */ - it("testFill004", 0, function () { - try { - let buf = buffer.alloc(3).fill("$*$", -1); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 4294967296. Received value is: -1'); - } - }); - - /** - * @tc.number : TEST_FILL_005 - * @tc.name : testFill005 - * @tc.desc : Fills buf with the specified value. If the offset and end are not given, the entire buf will be filled. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buffer.alloc(3).fill("$*$", 0, 5); - */ - it("testFill005", 0, function () { - try { - let buf = buffer.alloc(3).fill("$*$", 0, 5); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "end" is out of range. It must be >= 0 and <= 3. Received value is: 5'); - } - }); - - /** - * @tc.number : TEST_COMPARE_002 - * @tc.name : testCompare002 - * @tc.desc : Compares buf with target and returns a number indicating whether buf comes before, after, - * or is the same as target in sort order. Comparison is based on the actual sequence of - * bytes in each Buffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buf1.compare(buf2); - */ - it("testCompare002", 0, function () { - let buf1 = buffer.from("1236"); - let buf2 = buffer.from("1235"); - let res = buf1.compare(buf2); - expect(res).assertEqual(1); - }); - - /** - * @tc.number : TEST_COMPARE_003 - * @tc.name : testCompare003 - * @tc.desc : Compares buf with target and returns a number indicating whether buf comes before, after, - * or is the same as target in sort order. Comparison is based on the actual sequence of - * bytes in each Buffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buf1.compare(buf2, -1); - */ - it("testCompare003", 0, function () { - let buf1 = buffer.from("1236"); - let buf2 = buffer.from("1235"); - try { - let res = buf1.compare(buf2, -1); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "targetStart" is out of range. It must be >= 0 and <= 4294967296. Received value is: -1'); - } - }); - - /** - * @tc.number : TEST_COPY_001 - * @tc.name : testCopy001 - * @tc.desc : Copies data from a region of buf to a region in target, - * even if the target memory region overlaps with buf. - * If sourceEnd is greater than the length of the target, the length of the target shall prevail, - * and the extra part will not be overwritten. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buf1.copy(buf2); - */ - it("testCopy001", 0, function () { - let buf1 = buffer.from("1236"); - let buf2 = buffer.from("1235"); - let num = buf1.copy(buf2); - expect(num).assertEqual(4); - let str = buf2.toString(); - expect(str).assertEqual("1236"); - }); - - /** - * @tc.number : TEST_COPY_002 - * @tc.name : testCopy002 - * @tc.desc : Copies data from a region of buf to a region in target, - * even if the target memory region overlaps with buf. - * If sourceEnd is greater than the length of the target, the length of the target shall prevail, - * and the extra part will not be overwritten. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buf1.copy(buf2, targetStart, sourceStart, sourceEnd); - */ - it("testCopy002", 0, function () { - let buf1 = buffer.from("abcdefg"); - let buf2 = buffer.from("1235789"); - let num = buf1.copy(buf2, 2, 1, 3); - expect(num).assertEqual(2); - let str = buf2.toString(); - expect(str).assertEqual("12bc789"); - }); - - /** - * @tc.number : TEST_COPY_003 - * @tc.name : testCopy003 - * @tc.desc : Copies data from a region of buf to a region in target, - * even if the target memory region overlaps with buf. - * If sourceEnd is greater than the length of the target, the length of the target shall prevail, - * and the extra part will not be overwritten. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buf1.copy(buf2); - */ - it("testCopy003", 0, function () { - let buf1 = buffer.from("123656"); - let buf2 = buffer.from("1235"); - let num = buf1.copy(buf2); - expect(num).assertEqual(4); - let str = buf2.toString(); - expect(str).assertEqual("1236"); - }); - - /** - * @tc.number : TEST_COPY_004 - * @tc.name : testCopy004 - * @tc.desc : Copies data from a region of buf to a region in target, - * even if the target memory region overlaps with buf. - * If sourceEnd is greater than the length of the target, the length of the target shall prevail, - * and the extra part will not be overwritten. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buf1.copy(buf2); - */ - it("testCopy004", 0, function () { - let buf1 = buffer.from("123656"); - let buf2 = buffer.from("1235"); - try { - let num = buf1.copy(buf2, -1); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "targetStart" is out of range. It must be >= 0. Received value is: -1'); - } - }); - - /** - * @tc.number : TEST_COPY_005 - * @tc.name : testCopy005 - * @tc.desc : Copies data from a region of buf to a region in target, - * even if the target memory region overlaps with buf. - * If sourceEnd is greater than the length of the target, the length of the target shall prevail, - * and the extra part will not be overwritten. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buf1.copy(buf2); - */ - it("testCopy005", 0, function () { - let buf1 = buffer.from("ab$#"); - let buf2 = buffer.from("123556"); - let num = buf1.copy(buf2); - expect(num).assertEqual(4); - let str = buf2.toString(); - expect(str).assertEqual("ab$#56"); - }); - - /** - * @tc.number : TEST_BUFFER_LENGTH_001 - * @tc.name : testBufferLength001 - * @tc.desc : Returns the number of bytes in buf. - * @tc.size : MediumTest - * @tc.type : Field - * @tc.level : level 0 - */ - it("testBufferLength001", 0, function () { - let buf = buffer.from("1236"); - let len = buf.length; - expect(len).assertEqual(4); - }); - - /** - * @tc.number : TEST_BUFFER_BYTE_OFFSET_001 - * @tc.name : testBufferByteOffset001 - * @tc.desc : Returns the number of bytes in buf. - * @tc.size : MediumTest - * @tc.type : Field - * @tc.level : level 0 - */ - it("testBufferByteOffset001", 0, function () { - let buf = buffer.from("1236"); - let offset = buf.byteOffset; - expect(offset >= 0).assertTrue(); - }); - - /** - * @tc.number : TEST_BUFFER_BUFFER_001 - * @tc.name : testBufferBuffer001 - * @tc.desc : Returns the number of bytes in buf. - * @tc.size : MediumTest - * @tc.type : Field - * @tc.level : level 0 - */ - it("testBufferBuffer001", 0, function () { - let buf = buffer.from("1236"); - console.info(typeof buf.buffer); - expect(buf.buffer != null).assertTrue(); - }); - - /** - * @tc.number : TEST_EQUALS_001 - * @tc.name : testEquals001 - * @tc.desc : Returns true if both buf and otherBuffer have exactly the same bytes, false otherwise. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buf1.equals(buf2); - */ - it("testEquals001", 0, function () { - let buf1 = buffer.from("1236"); - let buf2 = buffer.from("1235"); - let res = buf1.equals(buf2); - expect(res).assertEqual(false); - }); - - /** - * @tc.number : TEST_EQUALS_002 - * @tc.name : testEquals002 - * @tc.desc : Returns true if both buf and otherBuffer have exactly the same bytes, false otherwise. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buf1.equals(buf2); - */ - it("testEquals002", 0, function () { - let buf1 = buffer.from("1236测试"); - let buf2 = buffer.from("1236测试"); - let res = buf1.equals(buf2); - expect(res).assertEqual(true); - }); - - /** - * @tc.number : TEST_EQUALS_003 - * @tc.name : testEquals003 - * @tc.desc : Returns true if both buf and otherBuffer have exactly the same bytes, false otherwise. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buf1.equals(buf2); - */ - it("testEquals003", 0, function () { - let buf1 = buffer.from("O@O"); - let buf2 = buffer.from("O^O"); - let res = buf1.equals(buf2); - expect(res).assertEqual(false); - }); - - /** - * @tc.number : TEST_INCLUDES_001 - * @tc.name : testIncludes001 - * @tc.desc : Returns true if value was found in buf, false otherwise. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let buf1 = buffer.from("13236"); buf1.includes("3"); - */ - it("testIncludes001", 0, function () { - let buf1 = buffer.from("13236"); - let flag = buf1.includes("3"); - expect(flag).assertEqual(true); - }); - - /** - * @tc.number : TEST_INCLUDES_002 - * @tc.name : testIncludes002 - * @tc.desc : Returns true if value was found in buf, false otherwise. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let buf1 = buffer.from("13236"); buf1.includes("3", 2); - */ - it("testIncludes002", 0, function () { - let buf1 = buffer.from("13236"); - let flag = buf1.includes("3", 2); - expect(flag).assertEqual(true); - }); - - /** - * @tc.number : TEST_INCLUDES_003 - * @tc.name : testIncludes003 - * @tc.desc : Returns true if value was found in buf, false otherwise. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let buf1 = buffer.from("13236"); buf1.includes("32"); - */ - it("testIncludes003", 0, function () { - let buf1 = buffer.from("13236"); - let flag = buf1.includes("32"); - expect(flag).assertEqual(true); - }); - - /** - * @tc.number : TEST_INCLUDES_004 - * @tc.name : testIncludes004 - * @tc.desc : Returns true if value was found in buf, false otherwise. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let buf1 = buffer.from("13236"); buf1.includes("32"); - */ - it("testIncludes004", 0, function () { - let buf1 = buffer.from("13236"); - let flag = buf1.includes("32", 2); - expect(flag).assertEqual(false); - }); - - /** - * @tc.number : TEST_INCLUDES_005 - * @tc.name : testIncludes005 - * @tc.desc : Returns true if value was found in buf, false otherwise. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let buf1 = buffer.from("13236"); buf1.includes("32"); - */ - it("testIncludes005", 0, function () { - let buf1 = buffer.from("测试特殊字符$#@!"); - let flag = buf1.includes("#@"); - expect(flag).assertEqual(true); - flag = buf1.includes("测试"); - expect(flag).assertEqual(true); - }); - - /** - * @tc.number : TEST_INCLUDES_006 - * @tc.name : testIncludes006 - * @tc.desc : Returns true if value was found in buf, false otherwise. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let buf1 = buffer.from("13236"); buf1.includes("32"); - */ - it("testIncludes006", 0, function () { - let buf1 = buffer.from("13236"); - let flag = buf1.includes("abc"); - expect(flag).assertEqual(false); - }); - - /** - * @tc.number : TEST_INDEX_OF_001 - * @tc.name : testIndexOf001 - * @tc.desc : The index of the first occurrence of value in buf. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let buf1 = buffer.from("13236"); buf1.indexOf("3"); - */ - it("testIndexOf001", 0, function () { - let buf1 = buffer.from("13236"); - let index = buf1.indexOf("3"); - expect(index).assertEqual(1); - }); - - /** - * @tc.number : TEST_INDEX_OF_002 - * @tc.name : testIndexOf002 - * @tc.desc : The index of the first occurrence of value in buf. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let buf1 = buffer.from("13236"); buf1.indexOf("3"); - */ - it("testIndexOf002", 0, function () { - let buf1 = buffer.from("13236"); - let index = buf1.indexOf("3", 2); - expect(index).assertEqual(3); - }); - - /** - * @tc.number : TEST_INDEX_OF_003 - * @tc.name : testIndexOf003 - * @tc.desc : The index of the first occurrence of value in buf. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let index = buf1.indexOf(value); - */ - it("testIndexOf003", 0, function () { - let buf1 = buffer.from("13236235"); - let index = buf1.indexOf("23"); - expect(index).assertEqual(2); - }); - - /** - * @tc.number : TEST_INDEX_OF_004 - * @tc.name : testIndexOf004 - * @tc.desc : The index of the first occurrence of value in buf. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let index = buf1.indexOf(value); - */ - it("testIndexOf004", 0, function () { - let buf1 = buffer.from("测试特殊字符$#@!"); - let index = buf1.indexOf("@"); - expect(index).assertEqual(20); - }); - - /** - * @tc.number : TEST_INDEX_OF_005 - * @tc.name : testIndexOf005 - * @tc.desc : The index of the first occurrence of value in buf. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let index = buf1.indexOf(value, byteOffset); - */ - it("testIndexOf005", 0, function () { - let buf1 = buffer.from("13236235"); - let index = buf1.indexOf("23", 3); - expect(index).assertEqual(5); - }); - - /** - * @tc.number : TEST_INDEX_OF_006 - * @tc.name : testIndexOf006 - * @tc.desc : The index of the first occurrence of value in buf. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let buf1 = buffer.from("13236"); buf1.indexOf("a"); - */ - it("testIndexOf006", 0, function () { - let buf1 = buffer.from("13236"); - let index = buf1.indexOf("a"); - expect(index).assertEqual(-1); - }); - - /** - * @tc.number : TEST_KEYS_001 - * @tc.name : testKeys001 - * @tc.desc : Creates and returns an iterator of buf keys (indices). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buf1.keys(); - */ - it("testKeys001", 0, function () { - let buf1 = buffer.from("1234"); - let keys = buf1.keys(); - let index = 0; - for (const key of keys) { - expect(key).assertEqual(index); - index++; - } - }); - - /** - * @tc.number : TEST_KEYS_002 - * @tc.name : testKeys002 - * @tc.desc : Creates and returns an iterator of buf keys (indices). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buf1.keys(); - */ - it("testKeys002", 0, function () { - let uarr = new Uint8Array(4); - uarr[0] = 0x31; - uarr[1] = 0x32; - uarr[2] = 0x33; - uarr[3] = 0x34; - let buf1 = buffer.from(uarr); - let keys = buf1.keys(); - let index = 0; - for (const key of keys) { - expect(key).assertEqual(index); - index++; - } - }); - - /** - * @tc.number : TEST_VALUES_001 - * @tc.name : testValues001 - * @tc.desc : Creates and returns an iterator for buf values (bytes). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buf1.values(); - */ - it("testValues001", 0, function () { - let buf1 = buffer.from("1234"); - let keys = buf1.values(); - let va = 49; - for (const value of keys) { - expect(value).assertEqual(va); - va++; - } - }); - - /** - * @tc.number : TEST_VALUES_002 - * @tc.name : testValues002 - * @tc.desc : Creates and returns an iterator for buf values (bytes). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buf1.values(); - */ - it("testValues002", 0, function () { - let uarr = new Uint8Array(4); - uarr[0] = 0x31; - uarr[1] = 0x32; - uarr[2] = 0x33; - uarr[3] = 0x34; - let buf1 = buffer.from(uarr); - let keys = buf1.values(); - let va = 0x31; - for (const value of keys) { - expect(value).assertEqual(va); - va++; - } - }); - - /** - * @tc.number : TEST_ENTRIES_001 - * @tc.name : testEntries001 - * @tc.desc : Creates and returns an iterator of [index, byte] pairs from the contents of buf - * which is contructed from an Uint8Array. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buf1.entries(); - */ - it("testEntries001", 0, function () { - let buf1 = buffer.from("1234"); - let entries = buf1.entries(); - let va = 49, - index = 0; - for (const [key, value] of entries) { - expect(key).assertEqual(index); - expect(value).assertEqual(va); - va++; - index++; - } - }); - - /** - * @tc.number : TEST_ENTRIES_002 - * @tc.name : testEntries002 - * @tc.desc : Creates and returns an iterator of [index, byte] pairs from the contents of buf - * which is contructed from an Uint8Array. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buf1.entries(); - */ - it("testEntries002", 0, function () { - let uarr = new Uint8Array(4); - uarr[0] = 0x31; - uarr[1] = 0x32; - uarr[2] = 0x33; - uarr[3] = 0x34; - let buf1 = buffer.from(uarr); - let entries = buf1.entries(); - let va = 49, - index = 0; - for (const [key, value] of entries) { - expect(key).assertEqual(index); - expect(value).assertEqual(va); - va++; - index++; - } - }); - - /** - * @tc.number : TEST_LAST_INDEX_OF_001 - * @tc.name : testLastIndexOf001 - * @tc.desc : The index of the last occurrence of value in buf. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let buf1 = buffer.from("13236"); buf1.lastIndexOf("3"); - */ - it("testLastIndexOf001", 0, function () { - let buf1 = buffer.from("13236"); - let index = buf1.lastIndexOf("3"); - expect(index).assertEqual(3); - }); - - /** - * @tc.number : TEST_LAST_INDEX_OF_002 - * @tc.name : testLastIndexOf002 - * @tc.desc : The index of the last occurrence of value in buf. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let buf1 = buffer.from("13236"); buf1.lastIndexOf("3", 2); - */ - it("testLastIndexOf002", 0, function () { - let buf1 = buffer.from("13236"); - let index = buf1.lastIndexOf("3", 2); - expect(index).assertEqual(1); - }); - - /** - * @tc.number : TEST_LAST_INDEX_OF_003 - * @tc.name : testLastIndexOf003 - * @tc.desc : The index of the last occurrence of value in buf. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let buf1 = buffer.from("13236235"); buf1.lastIndexOf("23"); - */ - it("testLastIndexOf003", 0, function () { - let buf1 = buffer.from("13236235"); - let index = buf1.lastIndexOf("23"); - expect(index).assertEqual(5); - }); - - /** - * @tc.number : TEST_LAST_INDEX_OF_004 - * @tc.name : testLastIndexOf004 - * @tc.desc : The index of the last occurrence of value in buf. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let buf1 = buffer.from("13236235"); buf1.lastIndexOf("23", 3); - */ - it("testLastIndexOf004", 0, function () { - let buf1 = buffer.from("13236235"); - let index = buf1.lastIndexOf("23", 3); - expect(index).assertEqual(2); - }); - - /** - * @tc.number : TEST_LAST_INDEX_OF_005 - * @tc.name : testLastIndexOf005 - * @tc.desc : The index of the last occurrence of value in buf. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let buf1 = buffer.from("13236"); buf1.lastIndexOf("a"); - */ - it("testLastIndexOf005", 0, function () { - let buf1 = buffer.from("13236"); - let index = buf1.lastIndexOf("a"); - expect(index).assertEqual(-1); - }); - - /** - * @tc.number : TEST_LAST_INDEX_OF_006 - * @tc.name : testLastIndexOf006 - * @tc.desc : Returns true if value was found in buf, false otherwise. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let buf = buffer.from("13236"); buf.lastIndexOf("a", 0, "utf8"); - */ - it("testLastIndexOf006", 0, function () { - let encodeArr: BufferEncoding[] = ["utf8", "utf-8", "ucs2", "ucs-2", "ascii", "latin1", "binary", "utf16le", "base64", "base64url", "hex"]; - let buf = buffer.from("13236"); - for (const encode of encodeArr) { - let index = buf.lastIndexOf("ab", 0, encode); - expect(index).assertEqual(-1); - } - }); - - /** - * @tc.number : TEST_READ_BIG_INT_64_BE_001 - * @tc.name : testReadBigInt64BE001 - * @tc.desc : Reads a signed, big-endian 64-bit integer from buf at the specified offset. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testReadBigInt64BE001", 0, function () { - let buf = buffer.from([0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x79, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78]); - const result = buf.readBigInt64BE(0).toString(16); - expect(result).assertEqual("6364656667686979"); - }); - - /** - * @tc.number : TEST_READ_BIG_INT_64_BE_002 - * @tc.name : testReadBigInt64BE002 - * @tc.desc : Reads a signed, big-endian 64-bit integer from buf at the specified offset. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testReadBigInt64BE002", 0, function () { - let buf = buffer.from([0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78]); - try { - let ref = buf.readBigInt64BE(1).toString(16); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 0. Received value is: 1'); - } - }); - - /** - * @tc.number : TEST_READ_BIG_INT_64_LE_001 - * @tc.name : testReadBigInt64LE001 - * @tc.desc : Reads a signed, little-endian 64-bit integer from buf at the specified offset. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testReadBigInt64LE001", 0, function () { - let buf = buffer.from([0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78]); - let ref = buf.readBigInt64LE(0).toString(16); - expect(ref).assertEqual("7069686766656463"); - }); - - /** - * @tc.number : TEST_READ_BIG_INT_64_LE_002 - * @tc.name : testReadBigInt64LE002 - * @tc.desc : Reads a signed, little-endian 64-bit integer from buf at the specified offset. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testReadBigInt64LE002", 0, function () { - let buf = buffer.from([0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78]); - try { - let ref = buf.readBigInt64LE(1).toString(16); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 0. Received value is: 1'); - } - }); - - /** - * @tc.number : TEST_READ_BIG_U_INT_64_BE_001 - * @tc.name : testReadBigUInt64BE001 - * @tc.desc : Reads a unsigned, big-endian 64-bit integer from buf at the specified offset. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testReadBigUInt64BE001", 0, function () { - let buf = buffer.from([0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78]); - let ref = buf.readBigUInt64BE(0).toString(16); - expect(ref).assertEqual("6364656667686970"); - }); - - /** - * @tc.number : TEST_READ_BIG_U_INT_64_BE_002 - * @tc.name : testReadBigUInt64BE002 - * @tc.desc : Reads a unsigned, big-endian 64-bit integer from buf at the specified offset. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testReadBigUInt64BE002", 0, function () { - let buf = buffer.from([0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78]); - try { - let ref = buf.readBigUInt64BE(1).toString(16); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 0. Received value is: 1'); - } - }); - - /** - * @tc.number : TEST_READ_BIG_U_INT_64_LE_001 - * @tc.name : testReadBigUInt64LE001 - * @tc.desc : Reads a unsigned, little-endian 64-bit integer from buf at the specified offset. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testReadBigUInt64LE001", 0, function () { - let buf = buffer.from([0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78]); - let ref = buf.readBigUInt64LE(0).toString(16); - expect(ref).assertEqual("7069686766656463"); - }); - - /** - * @tc.number : TEST_READ_BIG_U_INT_64_LE_002 - * @tc.name : testReadBigUInt64LE002 - * @tc.desc : Reads a unsigned, little-endian 64-bit integer from buf at the specified offset. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testReadBigUInt64LE002", 0, function () { - let buf = buffer.from([0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78]); - try { - let ref = buf.readBigUInt64LE(1).toString(16); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 0. Received value is: 1'); - } - }); - - /** - * @tc.number : TEST_READ_DOUBLE_BE_001 - * @tc.name : testReadDoubleBE001 - * @tc.desc : Reads a 64-bit, big-endian double from buf at the specified offset. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testReadDoubleBE001", 0, function () { - let buf = buffer.allocUninitializedFromPool(8); - buf.writeDoubleBE(123.456, 0); - let ref = buf.readDoubleBE(); - expect(ref).assertEqual(123.456); - }); - - /** - * @tc.number : TEST_READ_DOUBLE_BE_002 - * @tc.name : testReadDoubleBE002 - * @tc.desc : Reads a 64-bit, big-endian double from buf at the specified offset. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testReadDoubleBE002", 0, function () { - let buf = buffer.allocUninitializedFromPool(8); - buf.writeDoubleBE(123.456, 0); - try { - let ref = buf.readDoubleBE(1); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 0. Received value is: 1'); - } - }); - - /** - * @tc.number : TEST_READ_DOUBLE_LE_001 - * @tc.name : testReadDoubleLE001 - * @tc.desc : Reads a 64-bit, little-endian double from buf at the specified offset. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testReadDoubleLE001", 0, function () { - let buf = buffer.allocUninitializedFromPool(8); - buf.writeDoubleLE(123.456, 0); - let ref = buf.readDoubleLE(); - expect(ref).assertEqual(123.456); - }); - - /** - * @tc.number : TEST_READ_DOUBLE_LE_002 - * @tc.name : testReadDoubleLE002 - * @tc.desc : Reads a 64-bit, little-endian double from buf at the specified offset. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testReadDoubleLE002", 0, function () { - let buf = buffer.allocUninitializedFromPool(8); - buf.writeDoubleLE(123.456, 0); - try { - let ref = buf.readDoubleLE(1); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 0. Received value is: 1'); - } - }); - - /** - * @tc.number : TEST_READ_FLOAT_BE_001 - * @tc.name : testReadFloatBE001 - * @tc.desc : Reads a 32-bit, big-endian float from buf at the specified offset. - * @tc.size : . - * @tc.type : Method - * @tc.level : level 2 - */ - it("testReadFloatBE001", 0, function () { - let buf = buffer.allocUninitializedFromPool(4); - buf.writeFloatBE(0xcabcbcbc, 0); - let ref = buf.readFloatBE(0).toString(16); - expect(ref).assertEqual("cabcbd00"); - }); - - /** - * @tc.number : TEST_READ_FLOAT_BE_002 - * @tc.name : testReadFloatBE002 - * @tc.desc : Reads a 32-bit, big-endian float from buf at the specified offset. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testReadFloatBE002", 0, function () { - let buf = buffer.allocUninitializedFromPool(4); - buf.writeFloatBE(0xcabcbcbc, 0); - try { - let ref = buf.readFloatBE(1).toString(16); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 0. Received value is: 1'); - } - }); - - /** - * @tc.number : TEST_READ_FLOAT_LE_001 - * @tc.name : testReadFloatLE001 - * @tc.desc : Reads a 32-bit, little-endian float from buf at the specified offset. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testReadFloatLE001", 0, function () { - let buf = buffer.allocUninitializedFromPool(4); - buf.writeFloatLE(0xcabcbcbc, 0); - let ref = buf.readFloatLE(0).toString(16); - expect(ref).assertEqual("cabcbd00"); - }); - - /** - * @tc.number : TEST_READ_FLOAT_LE_002 - * @tc.name : testReadFloatLE002 - * @tc.desc : Reads a 32-bit, little-endian float from buf at the specified offset. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testReadFloatLE002", 0, function () { - let buf = buffer.allocUninitializedFromPool(4); - buf.writeFloatLE(0xcabcbcbc, 0); - try { - let ref = buf.readFloatLE(1).toString(16); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 0. Received value is: 1'); - } - }); - - /** - * @tc.number : TEST_READ_INT_8_001 - * @tc.name : testReadInt8001 - * @tc.desc : Reads a signed 8-bit integer from buf at the specified offset. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testReadInt8001", 0, function () { - let buf = buffer.allocUninitializedFromPool(2); - buf.writeInt8(0x12); - let ref = buf.readInt8(0).toString(16); - expect(ref).assertEqual("12"); - }); - - /** - * @tc.number : TEST_READ_INT_8_002 - * @tc.name : testReadInt8002 - * @tc.desc : Reads a signed 8-bit integer from buf at the specified offset. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testReadInt8002", 0, function () { - let buf = buffer.allocUninitializedFromPool(2); - buf.writeInt8(0x12); - try { - let ref = buf.readInt8(2).toString(16); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 1. Received value is: 2'); - } - }); - - /** - * @tc.number : TEST_READ_INT_16_BE_001 - * @tc.name : testReadInt16BE001 - * @tc.desc : Reads a signed, big-endian 16-bit integer from buf at the specified offset. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testReadInt16BE001", 0, function () { - let buf = buffer.alloc(2); - buf.writeInt16BE(0x1234, 0); - let ref = buf.readInt16BE(0).toString(16); - expect(ref).assertEqual("1234"); - }); - - /** - * @tc.number : TEST_READ_INT_16_BE_002 - * @tc.name : testReadInt16BE002 - * @tc.desc : Reads a signed, big-endian 16-bit integer from buf at the specified offset. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testReadInt16BE002", 0, function () { - let buf = buffer.alloc(2); - buf.writeInt16BE(0x1234, 0); - try { - let ref = buf.readInt16BE(1).toString(16); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 0. Received value is: 1'); - } - }); - - /** - * @tc.number : TEST_READ_INT_16_LE_001 - * @tc.name : testReadInt16LE001 - * @tc.desc : Reads a signed, little-endian 16-bit integer from buf at the specified offset. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testReadInt16LE001", 0, function () { - let buf = buffer.alloc(2); - buf.writeInt16BE(0x1234, 0); - let ref = buf.readInt16LE(0).toString(16); - expect(ref).assertEqual("3412"); - }); - - /** - * @tc.number : TEST_READ_INT_16_LE_002 - * @tc.name : testReadInt16LE002 - * @tc.desc : Reads a signed, little-endian 16-bit integer from buf at the specified offset. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testReadInt16LE002", 0, function () { - let buf = buffer.alloc(2); - buf.writeInt16BE(0x1234, 0); - try { - let ref = buf.readInt16LE(1); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 0. Received value is: 1'); - } - }); - - /** - * @tc.number : TEST_READ_INT_32_BE_001 - * @tc.name : testReadInt32BE001 - * @tc.desc : Reads a signed, big-endian 32-bit integer from buf at the specified offset. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testReadInt32BE001", 0, function () { - let buf = buffer.alloc(4); - buf.writeInt32BE(0x12345678, 0); - let ref = buf.readInt32BE(0).toString(16); - expect(ref).assertEqual("12345678"); - }); - - /** - * @tc.number : TEST_READ_INT_32_BE_002 - * @tc.name : testReadInt32BE002 - * @tc.desc : Reads a signed, big-endian 32-bit integer from buf at the specified offset. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testReadInt32BE002", 0, function () { - let buf = buffer.alloc(4); - buf.writeInt32BE(0x12345678, 0); - try { - let ref = buf.readInt32BE(1); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 0. Received value is: 1'); - } - }); - - /** - * @tc.number : TEST_READ_INT_32_LE_001 - * @tc.name : testReadInt32LE001 - * @tc.desc : Reads a signed, little-endian 32-bit integer from buf at the specified offset. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testReadInt32LE001", 0, function () { - let buf = buffer.alloc(4); - buf.writeInt32BE(0x12345678, 0); - let ref = buf.readInt32LE(0).toString(16); - expect(ref).assertEqual("78563412"); - }); - - /** - * @tc.number : TEST_READ_INT_32_LE_002 - * @tc.name : testReadInt32LE002 - * @tc.desc : Reads a signed, little-endian 32-bit integer from buf at the specified offset. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testReadInt32LE002", 0, function () { - let buf = buffer.alloc(4); - buf.writeInt32BE(0x12345678, 0); - try { - let ref = buf.readInt32LE(1); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 0. Received value is: 1'); - } - }); - - /** - * @tc.number : TEST_READ_INT_BE_001 - * @tc.name : testReadIntBE001 - * @tc.desc : Reads byteLength number of bytes from buf at the specified offset and interprets - * the result as a big-endian, two's complement signed value supporting up to 48 bits of accuracy. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testReadIntBE001", 0, function () { - let buf = buffer.allocUninitializedFromPool(6); - buf.writeIntBE(0x123456789011, 0, 6); - let ref = buf.readIntBE(0, 5).toString(16); - expect(ref).assertEqual("1234567890"); - }); - - /** - * @tc.number : TEST_READ_INT_BE_002 - * @tc.name : testReadIntBE002 - * @tc.desc : Reads byteLength number of bytes from buf at the specified offset and interprets - * the result as a big-endian, two's complement signed value supporting up to 48 bits of accuracy. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testReadIntBE002", 0, function () { - let buf = buffer.allocUninitializedFromPool(6); - buf.writeIntBE(0x123456789011, 0, 6); - try { - let ref = buf.readIntBE(2, 5).toString(16); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 1. Received value is: 2'); - } - }); - - /** - * @tc.number : TEST_READ_INT_LE_001 - * @tc.name : testReadIntLE001 - * @tc.desc : Reads byteLength number of bytes from buf at the specified offset and interprets - * the result as a little-endian, two's complement signed value supporting up to 48 bits of accuracy. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testReadIntLE001", 0, function () { - let buf = buffer.allocUninitializedFromPool(6); - buf.writeIntLE(0x123456789011, 0, 6); - let ref = buf.readIntLE(0, 5).toString(16); - expect(ref).assertEqual("3456789011"); - }); - - /** - * @tc.number : TEST_READ_INT_LE_002 - * @tc.name : testReadIntLE002 - * @tc.desc : Reads byteLength number of bytes from buf at the specified offset and interprets - * the result as a little-endian, two's complement signed value supporting up to 48 bits of accuracy. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testReadIntLE002", 0, function () { - let buf = buffer.allocUninitializedFromPool(6); - buf.writeIntLE(0x123456789011, 0, 6); - try { - let ref = buf.readIntLE(2, 5).toString(16); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 1. Received value is: 2'); - } - }); - - /** - * @tc.number : TEST_READ_U_INT_8_001 - * @tc.name : testReadUInt8001 - * @tc.desc : Reads an unsigned 8-bit integer from buf at the specified offset. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testReadUInt8001", 0, function () { - let buf = buffer.allocUninitializedFromPool(4); - buf.writeUInt8(0x42); - let ref = buf.readUInt8(0).toString(16); - expect(ref).assertEqual("42"); - }); - - /** - * @tc.number : TEST_READ_U_INT_8_002 - * @tc.name : testReadUInt8002 - * @tc.desc : Reads an unsigned 8-bit integer from buf at the specified offset. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testReadUInt8002", 0, function () { - let buf = buffer.allocUninitializedFromPool(4); - buf.writeUInt8(0x42); - try { - let ref = buf.readUInt8(4).toString(16); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 3. Received value is: 4'); - } - }); - - /** - * @tc.number : TEST_READ_U_INT_16_BE_001 - * @tc.name : testReadUInt16BE001 - * @tc.desc : Reads an unsigned, big-endian 16-bit integer from buf at the specified offset. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testReadUInt16BE001", 0, function () { - let buf = buffer.allocUninitializedFromPool(4); - buf.writeUInt16BE(0x1234, 0); - let ref = buf.readUInt16BE(0).toString(16); - expect(ref).assertEqual("1234"); - }); - - /** - * @tc.number : TEST_READ_U_INT_16_BE_002 - * @tc.name : testReadUInt16BE002 - * @tc.desc : Reads an unsigned, big-endian 16-bit integer from buf at the specified offset. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testReadUInt16BE002", 0, function () { - let buf = buffer.allocUninitializedFromPool(4); - buf.writeUInt16BE(0x1234, 0); - try { - let ref = buf.readUInt16BE(3).toString(16); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 2. Received value is: 3'); - } - }); - - /** - * @tc.number : TEST_READ_U_INT_16_LE_001 - * @tc.name : testReadUInt16LE001 - * @tc.desc : Reads an unsigned, little-endian 16-bit integer from buf at the specified offset. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testReadUInt16LE001", 0, function () { - let buf = buffer.allocUninitializedFromPool(4); - buf.writeUInt16LE(0x1234, 0); - let ref = buf.readUInt16LE(0).toString(16); - expect(ref).assertEqual("1234"); - }); - - /** - * @tc.number : TEST_READ_U_INT_16_LE_002 - * @tc.name : testReadUInt16LE002 - * @tc.desc : Reads an unsigned, little-endian 16-bit integer from buf at the specified offset. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testReadUInt16LE002", 0, function () { - let buf = buffer.allocUninitializedFromPool(4); - buf.writeUInt16LE(0x1234, 0); - try { - let ref = buf.readUInt16LE(3).toString(16); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 2. Received value is: 3'); - } - }); - - /** - * @tc.number : TEST_READ_U_INT_32_BE_001 - * @tc.name : testReadUInt32BE001 - * @tc.desc : Reads an unsigned, big-endian 32-bit integer from buf at the specified offset. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testReadUInt32BE001", 0, function () { - let buf = buffer.allocUninitializedFromPool(4); - buf.writeUInt32BE(0x12345678, 0); - let ref = buf.readUInt32BE(0).toString(16); - expect(ref).assertEqual("12345678"); - }); - - /** - * @tc.number : TEST_READ_U_INT_32_BE_002 - * @tc.name : testReadUInt32BE002 - * @tc.desc : Reads an unsigned, big-endian 32-bit integer from buf at the specified offset. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testReadUInt32BE002", 0, function () { - let buf = buffer.allocUninitializedFromPool(4); - buf.writeUInt32BE(0x12345678, 0); - try { - let ref = buf.readUInt32BE(1).toString(16); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 0. Received value is: 1'); - } - }); - - /** - * @tc.number : TEST_READ_U_INT_32_LE_001 - * @tc.name : testReadUInt32LE001 - * @tc.desc : Reads an unsigned, little-endian 32-bit integer from buf at the specified offset. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testReadUInt32LE001", 0, function () { - let buf = buffer.allocUninitializedFromPool(4); - buf.writeUInt32LE(0x12345678, 0); - let ref = buf.readUInt32LE(0).toString(16); - expect(ref).assertEqual("12345678"); - }); - - /** - * @tc.number : TEST_READ_U_INT_32_LE_002 - * @tc.name : testReadUInt32LE002 - * @tc.desc : Reads an unsigned, little-endian 32-bit integer from buf at the specified offset. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testReadUInt32LE002", 0, function () { - let buf = buffer.allocUninitializedFromPool(4); - buf.writeUInt32LE(0x12345678, 0); - try { - let ref = buf.readUInt32LE(1).toString(16); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 0. Received value is: 1'); - } - }); - - /** - * @tc.number : TEST_READ_U_INT_BE_001 - * @tc.name : testReadUIntBE001 - * @tc.desc : Reads an unsigned 8-bit integer from buf at the specified offset. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testReadUIntBE001", 0, function () { - let buf = buffer.allocUninitializedFromPool(4); - buf.writeUIntBE(0x13141516, 0, 4); - let ref = buf.readUIntBE(0, 3).toString(16); - expect(ref).assertEqual("131415"); - }); - - /** - * @tc.number : TEST_READ_U_INT_BE_002 - * @tc.name : testReadUIntBE002 - * @tc.desc : Reads an unsigned 8-bit integer from buf at the specified offset. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testReadUIntBE002", 0, function () { - let buf = buffer.allocUninitializedFromPool(4); - buf.writeUIntBE(0x13141516, 0, 4); - try { - let ref = buf.readUIntBE(2, 3).toString(16); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 1. Received value is: 2'); - } - }); - - /** - * @tc.number : TEST_READ_U_INT_LE_001 - * @tc.name : testReadUIntLE001 - * @tc.desc : Reads byteLength number of bytes from buf at the specified offset and interprets - * the result as an unsigned, little-endian integer supporting up to 48 bits of accuracy. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testReadUIntLE001", 0, function () { - let buf = buffer.allocUninitializedFromPool(4); - buf.writeUIntLE(0x13141516, 0, 4); - let ref = buf.readUIntLE(0, 3).toString(16); - expect(ref).assertEqual("141516"); - }); - - /** - * @tc.number : TEST_READ_U_INT_LE_002 - * @tc.name : testReadUIntLE002 - * @tc.desc : Reads byteLength number of bytes from buf at the specified offset and interprets - * the result as an unsigned, little-endian integer supporting up to 48 bits of accuracy. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testReadUIntLE002", 0, function () { - let buf = buffer.allocUninitializedFromPool(4); - buf.writeUIntLE(0x13141516, 0, 4); - try { - let ref = buf.readUIntLE(2, 3).toString(16); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 1. Received value is: 2'); - } - }); - - /** - * @tc.number : TEST_SUBARRAY_001 - * @tc.name : testSubarray001 - * @tc.desc : Returns a new Buffer that references the same memory as the original, - * but offset and cropped by the start and end indices. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buf1.subarray(0, 3); - */ - it("testSubarray001", 0, function () { - let buf1 = buffer.from("1236"); - let buf = buf1.subarray(0, 3); - let str = buf.toString(); - expect(str).assertEqual("123"); - }); - - /** - * @tc.number : TEST_SUBARRAY_002 - * @tc.name : testSubarray002 - * @tc.desc : Returns a new Buffer that references the same memory as the original, - * but offset and cropped by the start and end indices. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buf1.subarray(3, 4); - */ - it("testSubarray002", 0, function () { - let buf1 = buffer.from("1236"); - let buf = buf1.subarray(3, 4); - let str = buf.toString(); - expect(str).assertEqual("6"); - }); - - /** - * @tc.number : TEST_SUBARRAY_003 - * @tc.name : testSubarray003 - * @tc.desc : Returns a new Buffer that references the same memory as the original, - * but offset and cropped by the start and end indices. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buf1.subarray(-3, 0); - */ - it("testSubarray003", 0, function () { - let buf1 = buffer.from("1236"); - let buf = buf1.subarray(-3, 0); - expect(buf.length).assertEqual(0); - }); - - /** - * @tc.number : TEST_SUBARRAY_004 - * @tc.name : testSubarray004 - * @tc.desc : Returns a new Buffer that references the same memory as the original, - * but offset and cropped by the start and end indices. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buf1.subarray(6, 9); - */ - it("testSubarray004", 0, function () { - let buf1 = buffer.from("1236"); - let buf = buf1.subarray(6, 9); - expect(buf.length).assertEqual(0); - }); - - /** - * @tc.number : TEST_SWAP_16_001 - * @tc.name : testSwap16001 - * @tc.desc : Interprets buf as an array of unsigned 16-bit integers and swaps the byte order in-place. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buf1.swap16(); - */ - it("testSwap16001", 0, function () { - let buf1 = buffer.from("1323"); - buf1.swap16(); - let str = buf1.toString("hex"); - expect(str).assertEqual("33313332"); - }); - - /** - * @tc.number : TEST_SWAP_16_002 - * @tc.name : testSwap16002 - * @tc.desc : Interprets buf as an array of unsigned 16-bit integers and swaps the byte order in-place. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buf1.swap16(); - */ - it("testSwap16002", 0, function () { - let buf1 = buffer.from("132"); - try { - buf1.swap16(); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual("Buffer size must be a multiple of 16-bits"); - } - }); - - /** - * @tc.number : TEST_SWAP_32_001 - * @tc.name : testSwap32001 - * @tc.desc : Interprets buf as an array of unsigned 32-bit integers and swaps the byte order in-place. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buf1.swap32(); - */ - it("testSwap32001", 0, function () { - let buf1 = buffer.from("1234"); - buf1.swap32(); - let str = buf1.toString(); - expect(str).assertEqual("4321"); - }); - - /** - * @tc.number : TEST_SWAP_32_002 - * @tc.name : testSwap32002 - * @tc.desc : Interprets buf as an array of unsigned 16-bit integers and swaps the byte order in-place. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buf1.swap32(); - */ - it("testSwap32002", 0, function () { - let buf1 = buffer.from("132"); - try { - buf1.swap32(); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual("Buffer size must be a multiple of 32-bits"); - } - }); - - /** - * @tc.number : TEST_SWAP_64_001 - * @tc.name : testSwap64001 - * @tc.desc : Interprets buf as an array of unsigned 64-bit integers and swaps the byte order in-place. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buf1.swap64(); - */ - it("testSwap64001", 0, function () { - let buf1 = buffer.from("12345678"); - buf1.swap64(); - let str = buf1.toString(); - expect(str).assertEqual("87654321"); - }); - - /** - * @tc.number : TEST_SWAP_64_002 - * @tc.name : testSwap64002 - * @tc.desc : Interprets buf as an array of unsigned 64-bit integers and swaps the byte order in-place. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buf1.swap64(); - */ - it("testSwap64002", 0, function () { - let buf1 = buffer.from("1234567"); - try { - buf1.swap64(); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual("Buffer size must be a multiple of 64-bits"); - } - }); - - /** - * @tc.number : TEST_TO_JSON_001 - * @tc.name : testToJSON001 - * @tc.desc : Returns a JSON representation of buf. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buf1.toJSON(); - */ - it("testToJSON001", 0, function () { - let buf1 = buffer.from([0x1, 0x2, 0x3, 0x4, 0x5]); - let obj = buf1.toJSON(); - expect(obj["data"].length == 5).assertTrue(); - }); - - /** - * @tc.number : TEST_TO_STRING_001 - * @tc.name : testToString001 - * @tc.desc : Decodes buf to a string according to the specified character encoding in encoding. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buf1.toString(); - */ - it("testToString001", 0, function () { - let buf1 = buffer.from("1236"); - let str = buf1.toString(); - expect(str).assertEqual("1236"); - }); - - /** - * @tc.number : TEST_TO_STRING_002 - * @tc.name : testToString002 - * @tc.desc : Decodes buf to a string according to the specified character encoding in encoding. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buf1.toString(); - */ - it("testToString002", 0, function () { - let buf1 = buffer.from("张三"); - let str = buf1.toString(); - expect(str).assertEqual("张三"); - }); - - /** - * @tc.number : TEST_TO_STRING_003 - * @tc.name : testToString003 - * @tc.desc : Decodes buf to a string according to the specified character encoding in encoding. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buf1.toString("binary"); - */ - it("testToString003", 0, function () { - let buf1 = buffer.from("abc"); - let str = buf1.toString("binary"); - expect(str).assertEqual("abc"); - }); - - /** - * @tc.number : TEST_TO_STRING_004 - * @tc.name : testToString004 - * @tc.desc : Decodes buf to a string according to the specified character encoding in encoding. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buf1.toString("binary"); - */ - it("testToString004", 0, function () { - let buf1 = buffer.from("abc"); - let str = buf1.toString("ascii"); - expect(str).assertEqual("abc"); - }); - - /** - * @tc.number : TEST_TO_STRING_005 - * @tc.name : testToString005 - * @tc.desc : Decodes buf to a string according to the specified character encoding in encoding. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buf1.toString("base64"); - */ - it("testToString005", 0, function () { - let buf1 = buffer.from("abc"); - let str = buf1.toString("base64"); - expect(str).assertEqual("YWJj"); - }); - - /** - * @tc.number : TEST_TO_STRING_006 - * @tc.name : testToString006 - * @tc.desc : Decodes buf to a string according to the specified character encoding in encoding. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buf1.toString("hex"); - */ - it("testToString006", 0, function () { - let buf1 = buffer.from("abc"); - let str = buf1.toString("hex"); - expect(str).assertEqual("616263"); - }); - - /** - * @tc.number : TEST_TO_STRING_007 - * @tc.name : testToString007 - * @tc.desc : Decodes buf to a string according to the specified character encoding in encoding. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buf1.toString("latin1"); - */ - it("testToString007", 0, function () { - let buf1 = buffer.from("abc"); - let str = buf1.toString("latin1"); - expect(str).assertEqual("abc"); - }); - - /** - * @tc.number : TEST_TO_STRING_008 - * @tc.name : testToString008 - * @tc.desc : Decodes buf to a string according to the specified character encoding in encoding. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buf1.toString("ucs2"); - */ - it("testToString008", 0, function () { - let buf1 = buffer.from("abc"); - let str = buf1.toString("ucs2"); - expect(str).assertEqual("扡"); - }); - - /** - * @tc.number : TEST_TO_STRING_009 - * @tc.name : testToString009 - * @tc.desc : Decodes buf to a string according to the specified character encoding in encoding. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buf1.toString("utf16le"); - */ - it("testToString009", 0, function () { - let buf1 = buffer.from("abc"); - let str = buf1.toString("utf16le"); - expect(str).assertEqual("扡"); - }); - - /** - * @tc.number : TEST_TO_STRING_010 - * @tc.name : testToString010 - * @tc.desc : Decodes buf to a string according to the specified character encoding in encoding. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buf1.toString(); - */ - it("testToString010", 0, function () { - let buf1 = buffer.from("!@#$%^&*"); - let str = buf1.toString(); - expect(str).assertEqual("!@#$%^&*"); - }); - - /** - * @tc.number : TEST_WRITE_001 - * @tc.name : testWrite001 - * @tc.desc : Writes string to buf at offset according to the character encoding in encoding. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buf.write("abcde", "latin1"); - */ - it("testWrite001", 0, function () { - let buf = buffer.alloc(8); - try { - let offset = buf.write("abcde", -1); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 7. Received value is: -1'); - } - }); - - /** - * @tc.number : TEST_WRITE_002 - * @tc.name : testWrite002 - * @tc.desc : Writes string to buf at offset according to the character encoding in encoding. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buf.write("abcde", "latin1"); - */ - it("testWrite002", 0, function () { - let buf = buffer.alloc(8); - try { - let offset = buf.write("abcde", 1, 9); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "length" is out of range. It must be >= 0 and <= 8. Received value is: 9'); - } - }); - - /** - * @tc.number : TEST_WRITE_003 - * @tc.name : testWrite003 - * @tc.desc : Writes string to buf at offset according to the character encoding in encoding. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : buf.write("abcd", 0 ,4); - */ - it("testWrite003", 0, function () { - let buf = buffer.alloc(4); - buf.write("abcd", 0, 4); - const result = buf.toString(); - expect(result).assertEqual("abcd"); - }); - - /** - * @tc.number : TEST_WRITE_BIG_INT_64_BE_001 - * @tc.name : testWriteBigInt64BE001 - * @tc.desc : Writes value to buf at the specified offset as big-endian. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testWriteBigInt64BE001", 0, function () { - let buf = buffer.allocUninitializedFromPool(8); - let ref = buf.writeBigInt64BE(BigInt(0x0102030405060708), 0); - expect(ref).assertEqual(8); - }); - - /** - * @tc.number : TEST_WRITE_BIG_INT_64_BE_002 - * @tc.name : testWriteBigInt64BE002 - * @tc.desc : Writes value to buf at the specified offset as big-endian. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testWriteBigInt64BE002", 0, function () { - let buf = buffer.allocUninitializedFromPool(8); - try { - let ref = buf.writeBigInt64BE(BigInt(0x0102030405060708), 1); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 0. Received value is: 1'); - } - }); - - /** - * @tc.number : TEST_WRITE_BIG_INT_64_LE_001 - * @tc.name : testWriteBigInt64LE001 - * @tc.desc : Writes value to buf at the specified offset as little-endian. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testWriteBigInt64LE001", 0, function () { - let buf = buffer.allocUninitializedFromPool(8); - let ref = buf.writeBigInt64LE(BigInt(0x0102030405060708), 0); - expect(ref).assertEqual(8); - }); - - /** - * @tc.number : TEST_WRITE_BIG_INT_64_LE_002 - * @tc.name : testWriteBigInt64LE002 - * @tc.desc : Writes value to buf at the specified offset as little-endian. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testWriteBigInt64LE002", 0, function () { - let buf = buffer.allocUninitializedFromPool(8); - try { - let ref = buf.writeBigInt64LE(BigInt(0x0102030405060708), 1); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 0. Received value is: 1'); - } - }); - - /** - * @tc.number : TEST_WRITE_BIG_U_INT_64_BE_001 - * @tc.name : testWriteBigUInt64BE001 - * @tc.desc : Writes value to buf at the specified offset as big-endian. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testWriteBigUInt64BE001", 0, function () { - let buf = buffer.allocUninitializedFromPool(8); - let ref = buf.writeBigUInt64BE(BigInt(0x0102030405060708), 0); - expect(ref).assertEqual(8); - }); - - /** - * @tc.number : TEST_WRITE_BIG_U_INT_64_BE_002 - * @tc.name : testWriteBigUInt64BE002 - * @tc.desc : Writes value to buf at the specified offset as big-endian. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testWriteBigUInt64BE002", 0, function () { - let buf = buffer.allocUninitializedFromPool(8); - try { - let ref = buf.writeBigUInt64BE(BigInt(0x0102030405060708), 1); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 0. Received value is: 1'); - } - }); - - /** - * @tc.number : TEST_WRITE_BIG_U_INT_64_LE_001 - * @tc.name : testWriteBigUInt64LE001 - * @tc.desc : Writes value to buf at the specified offset as little-endian. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testWriteBigUInt64LE001", 0, function () { - let buf = buffer.allocUninitializedFromPool(8); - let ref = buf.writeBigUInt64LE(BigInt(0x0102030405060708), 0); - expect(ref).assertEqual(8); - }); - - /** - * @tc.number : TEST_WRITE_BIG_U_INT_64_LE_002 - * @tc.name : testWriteBigUInt64LE002 - * @tc.desc : Writes value to buf at the specified offset as little-endian. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testWriteBigUInt64LE002", 0, function () { - let buf = buffer.allocUninitializedFromPool(8); - try { - let ref = buf.writeBigUInt64LE(BigInt(0x0102030405060708), 1); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 0. Received value is: 1'); - } - }); - - /** - * @tc.number : TEST_WRITE_DOUBLE_BE_001 - * @tc.name : testWriteDoubleBE001 - * @tc.desc : Writes string to buf at offset according to the character encoding in encoding. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testWriteDoubleBE001", 0, function () { - let buf = buffer.allocUninitializedFromPool(8); - let ref = buf.writeDoubleBE(123.456, 0); - expect(ref).assertEqual(8); - }); - - /** - * @tc.number : TEST_WRITE_DOUBLE_BE_002 - * @tc.name : testWriteDoubleBE002 - * @tc.desc : Writes value to buf at the specified offset as big-endian. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testWriteDoubleBE002", 0, function () { - let buf = buffer.allocUninitializedFromPool(8); - try { - let ref = buf.writeDoubleBE(123.456, 1); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 0. Received value is: 1'); - } - }); - - /** - * @tc.number : TEST_WRITE_DOUBLE_LE_001 - * @tc.name : testWriteDoubleLE001 - * @tc.desc : Writes value to buf at the specified offset as little-endian. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testWriteDoubleLE001", 0, function () { - let buf = buffer.allocUninitializedFromPool(8); - let ref = buf.writeDoubleLE(123.456, 0); - expect(ref).assertEqual(8); - }); - - /** - * @tc.number : TEST_WRITE_DOUBLE_LE_002 - * @tc.name : testWriteDoubleLE002 - * @tc.desc : Writes value to buf at the specified offset as little-endian. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testWriteDoubleLE002", 0, function () { - let buf = buffer.allocUninitializedFromPool(8); - try { - let ref = buf.writeDoubleLE(123.456, 1); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 0. Received value is: 1'); - } - }); - - /** - * @tc.number : TEST_WRITE_FLOAT_BE_001 - * @tc.name : testWriteFloatBE001 - * @tc.desc : Writes value to buf at the specified offset as big-endian. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testWriteFloatBE001", 0, function () { - let buf = buffer.allocUninitializedFromPool(4); - let ref = buf.writeFloatBE(0xcabcbcbc, 0); - expect(ref).assertEqual(4); - }); - - /** - * @tc.number : TEST_WRITE_FLOAT_BE_002 - * @tc.name : testWriteFloatBE002 - * @tc.desc : Writes value to buf at the specified offset as big-endian. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testWriteFloatBE002", 0, function () { - let buf = buffer.allocUninitializedFromPool(4); - try { - let ref = buf.writeFloatBE(0xcabcbcbc, 5); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 0. Received value is: 5'); - } - }); - - /** - * @tc.number : TEST_WRITE_FLOAT_LE_001 - * @tc.name : testWriteFloatLE001 - * @tc.desc : Writes value to buf at the specified offset as little-endian. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testWriteFloatLE001", 0, function () { - let buf = buffer.allocUninitializedFromPool(16); - let ref = buf.writeFloatLE(0xcabcbcbc, 12); - expect(ref).assertEqual(16); - }); - - /** - * @tc.number : TEST_WRITE_FLOAT_LE_002 - * @tc.name : testWriteFloatLE002 - * @tc.desc : Writes value to buf at the specified offset as little-endian. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testWriteFloatLE002", 0, function () { - let buf = buffer.allocUninitializedFromPool(4); - try { - let ref = buf.writeFloatLE(0xcabcbcbc, 5); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 0. Received value is: 5'); - } - }); - - /** - * @tc.number : TEST_WRITE_INT_8_001 - * @tc.name : testWriteInt8001 - * @tc.desc : Writes value to buf at the specified offset. - * value must be a valid signed 8-bit integer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testWriteInt8001", 0, function () { - let buf = buffer.allocUninitializedFromPool(2); - let ref = buf.writeInt8(2, 0); - expect(ref).assertEqual(1); - }); - - /** - * @tc.number : TEST_WRITE_INT_8_002 - * @tc.name : testWriteInt8002 - * @tc.desc : Writes value to buf at the specified offset. - * value must be a valid signed 8-bit integer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testWriteInt8002", 0, function () { - let buf = buffer.allocUninitializedFromPool(2); - try { - let ref = buf.writeInt8(2, -1); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 1. Received value is: -1'); - } - }); - - /** - * @tc.number : TEST_WRITE_INT_8_003 - * @tc.name : testWriteInt8003 - * @tc.desc : Writes value to buf at the specified offset.value must be a valid signed 8-bit integer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testWriteInt8003", 0, function () { - let buf = buffer.allocUninitializedFromPool(2); - try { - let ref = buf.writeInt8(0x13245, 0); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "value" is out of range. It must be >= -128 and <= 127. Received value is: 78405'); - } - }); - - /** - * @tc.number : TEST_WRITE_INT_8_004 - * @tc.name : testWriteInt8004 - * @tc.desc : Writes value to buf at the specified offset.value must be a valid signed 8-bit integer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testWriteInt8004", 0, function () { - let buf = buffer.allocUninitializedFromPool(2); - let ref = buf.writeInt8(0x2, 1); - expect(ref).assertEqual(2); - }); - - /** - * @tc.number : TEST_WRITE_INT_16_BE_001 - * @tc.name : testWriteInt16BE001 - * @tc.desc : Writes value to buf at the specified offset as big-endian. - * The value must be a valid signed 16-bit integer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let ref = buf.writeInt32LE(0x12345678, 0); - */ - it("testWriteInt16BE001", 0, function () { - let buf = buffer.alloc(2); - let ref = buf.writeInt16BE(0x7bca, 0); - expect(ref).assertEqual(2); - }); - - /** - * @tc.number : TEST_WRITE_INT_16_BE_002 - * @tc.name : testWriteInt16BE002 - * @tc.desc : Writes value to buf at the specified offset as big-endian. - * The value must be a valid signed 16-bit integer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testWriteInt16BE002", 0, function () { - let buf = buffer.alloc(2); - try { - let ref = buf.writeInt16BE(0x7bca, -1); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 0. Received value is: -1'); - } - }); - - /** - * @tc.number : TEST_WRITE_INT_16_BE_003 - * @tc.name : testWriteInt16BE003 - * @tc.desc : Writes value to buf at the specified offset as big-endian. - * The value must be a valid signed 16-bit integer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testWriteInt16BE003", 0, function () { - let buf = buffer.alloc(2); - try { - let ref = buf.writeInt16BE(0x123456, 0); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "value" is out of range. It must be >= -32768 and <= 32767. Received value is: 1193046'); - } - }); - - /** - * @tc.number : TEST_WRITE_INT_16_BE_004 - * @tc.name : testWriteInt16BE004 - * @tc.desc : Writes value to buf at the specified offset as big-endian. - * The value must be a valid signed 16-bit integer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testWriteInt16BE004", 0, function () { - let buf = buffer.alloc(2); - try { - let ref = buf.writeInt16BE(0x7bca, 1); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 0. Received value is: 1'); - } - }); - - /** - * @tc.number : TEST_WRITE_INT_16_LE_001 - * @tc.name : testWriteInt16LE001 - * @tc.desc : Writes value to buf at the specified offset as little-endian. - * The value must be a valid signed 16-bit integer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let ref = buf.writeInt16LE(0x1234, 0); - */ - it("testWriteInt16LE001", 0, function () { - let buf = buffer.alloc(2); - let ref = buf.writeInt16LE(0x1234, 0); - expect(ref).assertEqual(2); - }); - - /** - * @tc.number : TEST_WRITE_INT_16_LE_002 - * @tc.name : testWriteInt16LE002 - * @tc.desc : Writes value to buf at the specified offset as little-endian. - * The value must be a valid signed 16-bit integer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testWriteInt16LE002", 0, function () { - let buf = buffer.alloc(2); - try { - let ref = buf.writeInt16LE(0x7bca, -1); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 0. Received value is: -1'); - } - }); - - /** - * @tc.number : TEST_WRITE_INT_16_LE_003 - * @tc.name : testWriteInt16LE003 - * @tc.desc : Writes value to buf at the specified offset as little-endian. - * The value must be a valid signed 16-bit integer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testWriteInt16LE003", 0, function () { - let buf = buffer.alloc(2); - try { - let ref = buf.writeInt16LE(0x123456, 0); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "value" is out of range. It must be >= -32768 and <= 32767. Received value is: 1193046'); - } - }); - - /** - * @tc.number : TEST_WRITE_INT_16_LE_004 - * @tc.name : testWriteInt16LE004 - * @tc.desc : Writes value to buf at the specified offset as little-endian. - * The value must be a valid signed 16-bit integer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testWriteInt16LE004", 0, function () { - let buf = buffer.alloc(2); - try { - let ref = buf.writeInt16LE(0x1234, 1); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 0. Received value is: 1'); - } - }); - - /** - * @tc.number : TEST_WRITE_INT_32_BE_001 - * @tc.name : testWriteInt32BE001 - * @tc.desc : Writes value to buf at the specified offset as big-endian. - * The value must be a valid signed 32-bit integer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example: let ref = buf.writeInt32BE(0x12345678, 0); - */ - it("testWriteInt32BE001", 0, function () { - let buf = buffer.alloc(4); - let ref = buf.writeInt32BE(0x12345678, 0); - expect(ref).assertEqual(4); - }); - - /** - * @tc.number : TEST_WRITE_INT_32_BE_002 - * @tc.name : testWriteInt32BE002 - * @tc.desc : Writes value to buf at the specified offset as big-endian. - * The value must be a valid signed 32-bit integer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testWriteInt32BE002", 0, function () { - let buf = buffer.alloc(4); - try { - let ref = buf.writeInt32BE(0x12345678, -1); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 0. Received value is: -1'); - } - }); - - /** - * @tc.number : TEST_WRITE_INT_32_BE_003 - * @tc.name : testWriteInt32BE003 - * @tc.desc : Writes value to buf at the specified offset as big-endian. - * The value must be a valid signed 32-bit integer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testWriteInt32BE003", 0, function () { - let buf = buffer.alloc(4); - try { - let ref = buf.writeInt32BE(0x123456789, 0); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "value" is out of range. It must be >= -2147483648 and <= 2147483647. Received value is: 4886718345'); - } - }); - - /** - * @tc.number : TEST_WRITE_INT_32_LE_001 - * @tc.name : testWriteInt32LE001 - * @tc.desc : Writes value to buf at the specified offset as little-endian. - * The value must be a valid signed 32-bit integer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let ref = buf.writeInt32LE(0x12345678, 0); - */ - it("testWriteInt32LE001", 0, function () { - let buf = buffer.alloc(4); - let ref = buf.writeInt32LE(0x12345678, 0); - expect(ref).assertEqual(4); - }); - - /** - * @tc.number : TEST_WRITE_INT_32_LE_002 - * @tc.name : testWriteInt32LE002 - * @tc.desc : Writes value to buf at the specified offset as little-endian. - * The value must be a valid signed 32-bit integer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let ref = buf.writeInt32LE(0x12345678, -1); - */ - it("testWriteInt32LE002", 0, function () { - let buf = buffer.alloc(4); - try { - let ref = buf.writeInt32LE(0x12345678, -1); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 0. Received value is: -1'); - } - }); - - /** - * @tc.number : TEST_WRITE_INT_32_LE_003 - * @tc.name : testWriteInt32LE003 - * @tc.desc : Writes value to buf at the specified offset as little-endian. - * The value must be a valid signed 32-bit integer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let ref = buf.writeInt32LE(0x12345678, 0); - */ - it("testWriteInt32LE003", 0, function () { - let buf = buffer.alloc(4); - try { - let ref = buf.writeInt32LE(0x123456789, 0); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "value" is out of range. It must be >= -2147483648 and <= 2147483647. Received value is: 4886718345'); - } - }); - - /** - * @tc.number : TEST_WRITE_INT_32_LE_004 - * @tc.name : testWriteInt32LE004 - * @tc.desc : Writes value to buf at the specified offset as little-endian. - * The value must be a valid signed 32-bit integer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let ref = buf.writeInt32LE(0x12345678, 1); - */ - it("testWriteInt32LE004", 0, function () { - let buf = buffer.alloc(4); - try { - let ref = buf.writeInt32LE(0x12345678, 1); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 0. Received value is: 1'); - } - }); - - /** - * @tc.number : TEST_WRITE_INT_BE_001 - * @tc.name : testWriteIntBE001 - * @tc.desc : Writes byteLength bytes of value to buf at the specified offset as big-endian. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let ref = buf.writeInt32LE(0x12345678, 1); - */ - it("testWriteIntBE001", 0, function () { - let buf = buffer.allocUninitializedFromPool(6); - let ref = buf.writeIntBE(0x1234567890ab, 0, 6); - expect(ref).assertEqual(6); - }); - - /** - * @tc.number : TEST_WRITE_INT_BE_002 - * @tc.name : testWriteIntBE002 - * @tc.desc : Writes byteLength bytes of value to buf at the specified offset as big-endian. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let ref = buf.writeInt32LE(0x12345678, 1); - */ - it("testWriteIntBE002", 0, function () { - let buf = buffer.allocUninitializedFromPool(6); - try { - let ref = buf.writeIntBE(0x1234567890ab, 1, 6); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 0. Received value is: 1'); - } - }); - - /** - * @tc.number : TEST_WRITE_INT_LE_001 - * @tc.name : testWriteIntLE001 - * @tc.desc : Writes byteLength bytes of value to buf at the specified offset as little-endian. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let ref = buf.writeInt32LE(0x12345678, 1); - */ - it("testWriteIntLE001", 0, function () { - let buf = buffer.allocUninitializedFromPool(6); - let ref = buf.writeIntLE(0x1234567890ab, 0, 6); - expect(ref).assertEqual(6); - }); - - /** - * @tc.number : TEST_WRITE_INT_LE_002 - * @tc.name : testWriteIntLE002 - * @tc.desc : Writes byteLength bytes of value to buf at the specified offset as little-endian. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let ref = buf.writeIntLE(0x1234567890ab, 1, 6); - */ - it("testWriteIntLE002", 0, function () { - let buf = buffer.allocUninitializedFromPool(6); - try { - let ref = buf.writeIntLE(0x1234567890ab, 1, 6); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 0. Received value is: 1'); - } - }); - - /** - * @tc.number : TEST_WRITE_U_INT_8_001 - * @tc.name : testWriteUInt8001 - * @tc.desc : Writes value to buf at the specified offset. value must be a valid unsigned 8-bit integer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let ref = buf.writeUInt8(0x42, 3); - */ - it("testWriteUInt8001", 0, function () { - let buf = buffer.allocUninitializedFromPool(4); - let ref = buf.writeUInt8(0x42, 3); - expect(ref).assertEqual(4); - }); - - /** - * @tc.number : TEST_WRITE_U_INT_8_002 - * @tc.name : testWriteUInt8002 - * @tc.desc : Writes value to buf at the specified offset. value must be a valid unsigned 8-bit integer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let ref = buf.writeUInt8(0x42, -1); - */ - it("testWriteUInt8002", 0, function () { - let buf = buffer.allocUninitializedFromPool(4); - try { - let ref = buf.writeUInt8(0x42, -1); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 3. Received value is: -1'); - } - }); - - /** - * @tc.number : TEST_WRITE_U_INT_8_003 - * @tc.name : testWriteUInt8003 - * @tc.desc : Writes value to buf at the specified offset. value must be a valid unsigned 8-bit integer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let ref = buf.writeUInt8(0x42, 1); - */ - it("testWriteUInt8003", 0, function () { - let buf = buffer.allocUninitializedFromPool(4); - let ref = buf.writeUInt8(0x42, 1); - expect(ref).assertEqual(2); - }); - - /** - * @tc.number : TEST_WRITE_U_INT_16_BE_001 - * @tc.name : testWriteUInt16BE001 - * @tc.desc : Writes value to buf at the specified offset as big-endian. - * The value must be a valid unsigned 16-bit integer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let ref = buf.writeUInt8(0x42, 1); - */ - it("testWriteUInt16BE001", 0, function () { - let buf = buffer.allocUninitializedFromPool(4); - let ref = buf.writeUInt16BE(0xdead, 0); - expect(ref).assertEqual(2); - }); - - /** - * @tc.number : TEST_WRITE_U_INT_16_BE_002 - * @tc.name : testWriteUInt16BE002 - * @tc.desc : Writes value to buf at the specified offset as big-endian. - * The value must be a valid unsigned 16-bit integer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let ref = buf.writeUInt16BE(0xdeadfc, 0); - */ - it("testWriteUInt16BE002", 0, function () { - let buf = buffer.allocUninitializedFromPool(4); - try { - let ref = buf.writeUInt16BE(0xdeadfc, 0); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "value" is out of range. It must be >= 0 and <= 65535. Received value is: 14593532'); - } - }); - - /** - * @tc.number : TEST_WRITE_U_INT_16_BE_003 - * @tc.name : testWriteUInt16BE003 - * @tc.desc : Writes value to buf at the specified offset as big-endian. - * The value must be a valid unsigned 16-bit integer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let ref = buf.writeUInt16BE(0xdeadfc, 0); - */ - it("testWriteUInt16BE003", 0, function () { - let buf = buffer.allocUninitializedFromPool(4); - try { - let ref = buf.writeUInt16BE(0xdead, -1); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 2. Received value is: -1'); - } - }); - - /** - * @tc.number : TEST_WRITE_U_INT_16_BE_004 - * @tc.name : testWriteUInt16BE004 - * @tc.desc : Writes value to buf at the specified offset as big-endian. - * The value must be a valid unsigned 16-bit integer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let ref = buf.writeUInt16LE(0xdead, 1); - */ - it("testWriteUInt16BE004", 0, function () { - let buf = buffer.allocUninitializedFromPool(4); - let ref = buf.writeUInt16BE(0xdead, 1); - expect(ref).assertEqual(3); - }); - - /** - * @tc.number : TEST_WRITE_U_INT_16_LE_001 - * @tc.name : testWriteUInt16LE001 - * @tc.desc : Writes value to buf at the specified offset as little-endian. - * The value must be a valid unsigned 16-bit integer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let ref = buf.writeUInt16LE(0xdead, 0); - */ - it("testWriteUInt16LE001", 0, function () { - let buf = buffer.allocUninitializedFromPool(4); - let ref = buf.writeUInt16LE(0xdead, 0); - expect(ref).assertEqual(2); - }); - - /** - * @tc.number : TEST_WRITE_U_INT_16_LE_002 - * @tc.name : testWriteUInt16LE002 - * @tc.desc : Writes value to buf at the specified offset as little-endian. - * The value must be a valid unsigned 16-bit integer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testWriteUInt16LE002", 0, function () { - let buf = buffer.allocUninitializedFromPool(4); - try { - let ref = buf.writeUInt16LE(0xdeadfc, 0); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "value" is out of range. It must be >= 0 and <= 65535. Received value is: 14593532'); - } - }); - - /** - * @tc.number : TEST_WRITE_U_INT_16_LE_003 - * @tc.name : testWriteUInt16LE003 - * @tc.desc : Writes value to buf at the specified offset as little-endian. - * The value must be a valid unsigned 16-bit integer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testWriteUInt16LE003", 0, function () { - let buf = buffer.allocUninitializedFromPool(4); - try { - let ref = buf.writeUInt16LE(0xdead, -1); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 2. Received value is: -1'); - } - }); - - /** - * @tc.number : TEST_WRITE_U_INT_16_LE_004 - * @tc.name : testWriteUInt16LE004 - * @tc.desc : Writes value to buf at the specified offset as little-endian. - * The value must be a valid unsigned 16-bit integer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let ref = buf.writeUInt16LE(0xdead, 0); - */ - it("testWriteUInt16LE004", 0, function () { - let buf = buffer.allocUninitializedFromPool(4); - let ref = buf.writeUInt16LE(0xdead, 1); - expect(ref).assertEqual(3); - }); - - /** - * @tc.number : TEST_WRITE_U_INT_32_BE_001 - * @tc.name : testWriteUInt32BE001 - * @tc.desc : Writes value to buf at the specified offset as big-endian. - * The value must be a valid unsigned 32-bit integer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let ref = buf.writeUInt32BE(0xfeedface, 0); - */ - it("testWriteUInt32BE001", 0, function () { - let buf = buffer.allocUninitializedFromPool(4); - let ref = buf.writeUInt32BE(0xfeedface, 0); - expect(ref).assertEqual(4); - }); - - /** - * @tc.number : TEST_WRITE_U_INT_32_BE_002 - * @tc.name : testWriteUInt32BE002 - * @tc.desc : Writes value to buf at the specified offset as big-endian. - * The value must be a valid unsigned 32-bit integer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let ref = buf.writeUInt32BE(0xfeedface, -1); - */ - it("testWriteUInt32BE002", 0, function () { - let buf = buffer.allocUninitializedFromPool(4); - try { - let ref = buf.writeUInt32BE(0xfeedface, -1); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 0. Received value is: -1'); - } - }); - - /** - * @tc.number : TEST_WRITE_U_INT_32_BE_003 - * @tc.name : testWriteUInt32BE003 - * @tc.desc : Writes value to buf at the specified offset as big-endian. - * The value must be a valid unsigned 32-bit integer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let ref = buf.writeUInt32BE(0xfeedface, 1); - */ - it("testWriteUInt32BE003", 0, function () { - let buf = buffer.allocUninitializedFromPool(4); - try { - let ref = buf.writeUInt32BE(0xfeedface, 1); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 0. Received value is: 1'); - } - }); - - /** - * @tc.number : TEST_WRITE_U_INT_32_LE_001 - * @tc.name : testWriteUInt32LE001 - * @tc.desc : Writes value to buf at the specified offset as little-endian. - * The value must be a valid unsigned 32-bit integer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let ref = buf.writeUInt32LE(0xfeedface, 0); - */ - it("testWriteUInt32LE001", 0, function () { - let buf = buffer.allocUninitializedFromPool(4); - let ref = buf.writeUInt32LE(0xfeedface, 0); - expect(ref).assertEqual(4); - }); - - /** - * @tc.number : TEST_WRITE_U_INT_32_LE_002 - * @tc.name : testWriteUInt32LE002 - * @tc.desc : Writes value to buf at the specified offset as little-endian. - * The value must be a valid unsigned 32-bit integer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let ref = buf.writeUInt32LE(0xfeedface, -1); - */ - it("testWriteUInt32LE002", 0, function () { - let buf = buffer.allocUninitializedFromPool(4); - try { - let ref = buf.writeUInt32LE(0xfeedface, -1); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 0. Received value is: -1'); - } - }); - - /** - * @tc.number : TEST_WRITE_U_INT_32_LE_003 - * @tc.name : testWriteUInt32LE003 - * @tc.desc : Writes value to buf at the specified offset as little-endian. - * The value must be a valid unsigned 32-bit integer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let ref = buf.writeUInt32LE(0xfeedface, 1); - */ - it("testWriteUInt32LE003", 0, function () { - let buf = buffer.allocUninitializedFromPool(4); - try { - let ref = buf.writeUInt32LE(0xfeedface, 1); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 0. Received value is: 1'); - } - }); - - /** - * @tc.number : TEST_WRITE_U_INT_BE_001 - * @tc.name : testWriteUIntBE001 - * @tc.desc : Writes byteLength bytes of value to buf at the specified offset as big-endian. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let ref = buf.writeUInt8(0x42, 3); - */ - it("testWriteUIntBE001", 0, function () { - let buf = buffer.allocUninitializedFromPool(4); - let ref = buf.writeUIntBE(0x13141516, 0, 4); - expect(ref).assertEqual(4); - }); - - /** - * @tc.number : TEST_WRITE_U_INT_BE_002 - * @tc.name : testWriteUIntBE002 - * @tc.desc : Writes byteLength bytes of value to buf at the specified offset as big-endian. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testWriteUIntBE002", 0, function () { - let buf = buffer.allocUninitializedFromPool(4); - try { - let ref = buf.writeUIntBE(0x13141516, 0, 1); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "value" is out of range. It must be >= 0 and <= 255. Received value is: 320083222'); - } - }); - - /** - * @tc.number : TEST_WRITE_U_INT_BE_003 - * @tc.name : testWriteUIntBE003 - * @tc.desc : Writes byteLength bytes of value to buf at the specified offset as big-endian. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testWriteUIntBE003", 0, function () { - let buf = buffer.allocUninitializedFromPool(4); - try { - let ref = buf.writeUIntBE(0x13141516, 1, 4); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 0. Received value is: 1'); - } - }); - - /** - * @tc.number : TEST_WRITE_U_INT_LE_001 - * @tc.name : testWriteUIntLE001 - * @tc.desc : Writes byteLength bytes of value to buf at the specified offset as little-endian. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let ref = buf.writeUIntLE(0x13141516, 0, 4); - */ - it("testWriteUIntLE001", 0, function () { - let buf = buffer.allocUninitializedFromPool(4); - let ref = buf.writeUIntLE(0x13141516, 0, 4); - expect(ref).assertEqual(4); - }); - - /** - * @tc.number : TEST_WRITE_U_INT_LE_002 - * @tc.name : testWriteUIntLE002 - * @tc.desc : Writes byteLength bytes of value to buf at the specified offset as little-endian. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testWriteUIntLE002", 0, function () { - let buf = buffer.allocUninitializedFromPool(4); - try { - let ref = buf.writeUIntLE(0x13141516, 0, 1); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "value" is out of range. It must be >= 0 and <= 255. Received value is: 320083222'); - } - }); - - /** - * @tc.number : TEST_WRITE_U_INT_LE_003 - * @tc.name : testWriteUIntLE003 - * @tc.desc : Writes byteLength bytes of value to buf at the specified offset as little-endian. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testWriteUIntLE003", 0, function () { - let buf = buffer.allocUninitializedFromPool(4); - try { - let ref = buf.writeUIntLE(0x13141516, 1, 4); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.message).assertEqual('The value of "offset" is out of range. It must be >= 0 and <= 0. Received value is: 1'); - } - }); - - /** - * @tc.number : TEST_WRITE_U_INT_LE_004 - * @tc.name : testWriteUIntLE004 - * @tc.desc : Writes byteLength bytes of value to buf at the specified offset as little-endian. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - */ - it("testWriteUIntLE004", 0, function () { - let buf = buffer.allocUninitializedFromPool(5); - let ref = buf.writeUIntLE(0x13141516, 1, 4); - expect(ref).assertEqual(5); - }); - - /** - * @tc.number : TEST_BLOB_CONSTRUCTOR_001 - * @tc.name : testBlobConstructor001 - * @tc.desc : Creates a new Blob object containing a concatenation of the given sources. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let blob2 = new buffer.Blob(["a", "b", "c"], { type: "new type", endings: "transparent" }); - */ - it("testBlobConstructor001", 0, async function () { - let blob2 = new buffer.Blob(["a", "b", "c"], { type: "new type", endings: "transparent" }); - let promise = blob2.text(); - promise.then((value) => { - expect(value).assertEqual("abc"); - }); - }); - - /** - * @tc.number : TEST_BLOB_CONSTRUCTOR_002 - * @tc.name : testBlobConstructor002 - * @tc.desc : Creates a new Blob object containing a concatenation of the given sources. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let blob2 = new buffer.Blob([arrBuf], { type: "new type", endings: "transparent" }); - */ - it("testBlobConstructor002", 0, async function () { - let arrBuf = new ArrayBuffer(3); - let uint8arr = new Uint8Array(arrBuf); - uint8arr[0] = 97; - uint8arr[1] = 98; - uint8arr[2] = 99; - let blob2 = new buffer.Blob([arrBuf], { type: "new type", endings: "transparent" }); - blob2.text().then((value) => { - expect(value).assertEqual("abc"); - }); - }); - - /** - * @tc.number : TEST_BLOB_CONSTRUCTOR_003 - * @tc.name : testBlobConstructor003 - * @tc.desc : Creates a new Blob object containing a concatenation of the given sources. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let blob2 = new buffer.Blob([uint8arr], { type: "new type", endings: "transparent" }) - */ - it("testBlobConstructor003", 0, async function () { - let uint8arr = new Uint8Array(3); - uint8arr[0] = 97; - uint8arr[1] = 98; - uint8arr[2] = 99; - let blob2 = new buffer.Blob([uint8arr], { type: "new type", endings: "transparent" }); - blob2.text().then((value) => { - expect(value).assertEqual("abc"); - }); - }); - - /** - * @tc.number : TEST_BLOB_CONSTRUCTOR_004 - * @tc.name : testBlobConstructor004 - * @tc.desc : Creates a new Blob object containing a concatenation of the given sources. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let blob2 = new buffer.Blob([view], { type: "new type", endings: "transparent" }) - */ - it("testBlobConstructor004", 0, async function () { - let arrBuf = new ArrayBuffer(3); - let uint8arr = new Uint8Array(arrBuf); - uint8arr[0] = 97; - uint8arr[1] = 98; - uint8arr[2] = 99; - let view = new DataView(arrBuf); - let blob2 = new buffer.Blob([view], { type: "new type", endings: "transparent" }); - blob2.text().then((value) => { - expect(value).assertEqual("abc"); - }); - }); - - /** - * @tc.number : TEST_BLOB_CONSTRUCTOR_005 - * @tc.name : testBlobConstructor005 - * @tc.desc : Creates a new Blob object containing a concatenation of the given sources. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let blob2 = new buffer.Blob(["a", "b", "c"], { type: "new type", endings: "transparent" }); - * let blob = new buffer.Blob([blob2]); - */ - it("testBlobConstructor005", 0, async function () { - let blob2 = new buffer.Blob(["a", "b", "c"], { type: "new type", endings: "transparent" }); - let blob = new buffer.Blob([blob2]); - blob.text().then((value) => { - expect(value).assertEqual("abc"); - }); - }); - - /** - * @tc.number : TEST_BLOB_SIZE_001 - * @tc.name : testBlobSize001 - * @tc.desc : The total size of the Blob in bytes. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 0 - */ - it("testBlobSize001", 0, function () { - let blob = new buffer.Blob(["a", "b", "c"]); - let size = blob.size; - expect(size).assertEqual(3); - }); - - /** - * @tc.number : TEST_BLOB_TYPE_001 - * @tc.name : testBlobType001 - * @tc.desc : The content-type of the Blob. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 0 - */ - it("testBlobType001", 0, function () { - let blob = new buffer.Blob(["a", "b", "c"], { type: "mime", endings: "transparent" }); - let type = blob.type; - expect(type).assertEqual("mime"); - }); - - /** - * @tc.number : TEST_BLOB_ARRAY_BUFFER_001 - * @tc.name : testBlobArrayBuffer001 - * @tc.desc : Returns a promise that fulfills with an containing a copy of the Blob data. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let blob2 = new buffer.Blob(["a", "b", "c"], { type: "new type", endings: "transparent" }); - */ - it("testBlobArrayBuffer001", 0, async function () { - let blob2 = new buffer.Blob(["a", "b", "c"], { type: "new type", endings: "transparent" }); - blob2.arrayBuffer().then((value) => { - let arr = new Uint8Array(value); - for (let i = 0, len = arr.length; i < len; i++) { - expect(arr[i]).assertEqual(97 + i); - } - }); - }); - - /** - * @tc.number : TEST_BLOB_Slice_001 - * @tc.name : testBlobSlice001 - * @tc.desc : Creates and returns a new Blob containing a subset of this Blob objects data. - * The original Blob is not altered. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let blob2 = new buffer.Blob(["a", "b", "c"], { type: "new type", endings: "transparent" }); - * let blob = blob2.slice(0, 1); - */ - it("testBlobSlice001", 0, async function () { - let blob2 = new buffer.Blob(["a", "b", "c"], { type: "new type", endings: "transparent" }); - let blob = blob2.slice(0, 1); - blob.arrayBuffer().then((value) => { - let arr = new Uint8Array(value); - expect(arr[0]).assertEqual(97); - expect(arr[1]).assertEqual(98); - expect(arr[2]).assertEqual(99); - }); - }); - - /** - * @tc.number : TEST_BLOB_TEXT_001 - * @tc.name : testBlobText001 - * @tc.desc : Returns a promise that fulfills with the contents of the Blob decoded as a UTF-8 string. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : level 2 - * For example : let blob2 = new buffer.Blob(["a", "b", "c"], { type: "new type", endings: "transparent" }); - */ - it("testBlobText001", 0, async function () { - let blob2 = new buffer.Blob(["a", "b", "c"], { type: "new type", endings: "transparent" }); - blob2.text().then((value) => { - expect(value).assertEqual("abc"); - }); - }); - }); -} diff --git a/commonlibrary/crossplatform/commonlibrarybufferetstest/src/main/ets/test/List.test.ets b/commonlibrary/crossplatform/commonlibrarybufferetstest/src/main/ets/test/List.test.ets deleted file mode 100755 index 0250ae020..000000000 --- a/commonlibrary/crossplatform/commonlibrarybufferetstest/src/main/ets/test/List.test.ets +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import BufferTest from './Buffer.test' - -export default function testsuite() { - BufferTest() -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibrarybufferetstest/src/main/module.json b/commonlibrary/crossplatform/commonlibrarybufferetstest/src/main/module.json deleted file mode 100755 index a4443e713..000000000 --- a/commonlibrary/crossplatform/commonlibrarybufferetstest/src/main/module.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "module": { - "name": "entry_test", - "type": "feature", - "description": "$string:module_test_desc", - "mainElement": "TestAbility", - "deviceTypes": [ - "phone" - ], - "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", - "skills": [ - { - "actions": [ - "action.system.home" - ], - "entities": [ - "entity.system.home" - ] - } - ] - } - ] - } -} diff --git a/commonlibrary/crossplatform/commonlibrarybufferetstest/src/main/resources/base/element/color.json b/commonlibrary/crossplatform/commonlibrarybufferetstest/src/main/resources/base/element/color.json deleted file mode 100755 index 3c712962d..000000000 --- a/commonlibrary/crossplatform/commonlibrarybufferetstest/src/main/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/commonlibrary/crossplatform/commonlibrarybufferetstest/src/main/resources/base/element/string.json b/commonlibrary/crossplatform/commonlibrarybufferetstest/src/main/resources/base/element/string.json deleted file mode 100755 index 65d8fa5a7..000000000 --- a/commonlibrary/crossplatform/commonlibrarybufferetstest/src/main/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/commonlibrary/crossplatform/commonlibrarybufferetstest/src/main/resources/base/media/icon.png b/commonlibrary/crossplatform/commonlibrarybufferetstest/src/main/resources/base/media/icon.png deleted file mode 100755 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6BLrPFWk?s;$LOP{GmJpBl$qoSA!PUg~PA65-S00{{S`XKG6NkG0RgjEntPrmV+?0|00mu7;+5 zrdpa{2QLqPJ4Y{j7=Mrl{BaxrkdY69+c~(w{Fv-v&aR%aEI&JYSeRTLWm!zbv;?)_ ziZB;fwGbbeL5Q}YLx`J$lp~A09KK8t_z}PZ=4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ZFd{T z-<_VnGSpk}%w$v8rdv{xrulL^0-gt%Nup#Yi6a0!_A#7EoYWyq%B{@W`sT!+_oW#3 zp6w_;*wMg@{&0Brc%BsC;sU0DDTY4$mf8K>hRx^e53k){+%tqo zOq?Fek^h5Zj}^CJUl^V@1rS^ixbQRi(qGdzUii)JN^j$yljU2k9L+j;KKsgIcb2hF zYyEV2+eB}-?my?Qb&vn(+W9f8Se+O_F?%XQTg~0m#dqJT-}~PB^;yULb9!?UlkP3M zXjmQUTZ3N-+UV7u_oc7T`J@C&aA1~X&$9Oh(EL=|IQT^!dPV8Ft4WRU4ln;sc1?q)SvhB0#GjHtT5~rHBeDEdb@-+bE7N&f8EUGWMl~s6rN2b8rl0BW0%=-PQ6|Y`i_3|jy s0sH(b+ycC1!;8IrbFNN17O^l#vc`Tc-C*zIDDE>O=l)mteffz00l6(*hyVZp diff --git a/commonlibrary/crossplatform/commonlibraryconvertxmletstest/src/main/ets/TestAbility/TestAbility.ets b/commonlibrary/crossplatform/commonlibraryconvertxmletstest/src/main/ets/TestAbility/TestAbility.ets deleted file mode 100644 index 368aef919..000000000 --- a/commonlibrary/crossplatform/commonlibraryconvertxmletstest/src/main/ets/TestAbility/TestAbility.ets +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import UIAbility from '@ohos.app.ability.UIAbility'; -import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; -import hilog from '@ohos.hilog'; -import { Hypium } from '@ohos/hypium'; -import testsuite from '../test/List.test'; -import window from '@ohos.window'; - -export default class TestAbility extends UIAbility { - onCreate(want, 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) ?? ''); - var abilityDelegator: any - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var abilityDelegatorArguments: any - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - hilog.info(0x0000, 'testTag', '%{public}s', 'start run testcase!!!'); - Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) - } - - onDestroy() { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onDestroy'); - } - - onWindowStageCreate(windowStage: window.WindowStage) { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageCreate'); - windowStage.loadContent('TestAbility/pages/Index', (err, data) => { - 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. Data: %{public}s', - JSON.stringify(data) ?? ''); - }); - } - - 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/commonlibrary/crossplatform/commonlibraryconvertxmletstest/src/main/ets/TestAbility/pages/Index.ets b/commonlibrary/crossplatform/commonlibraryconvertxmletstest/src/main/ets/TestAbility/pages/Index.ets deleted file mode 100644 index e95640899..000000000 --- a/commonlibrary/crossplatform/commonlibraryconvertxmletstest/src/main/ets/TestAbility/pages/Index.ets +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import hilog from '@ohos.hilog'; - -@Entry -@Component -struct Index { - aboutToAppear() { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility index aboutToAppear'); - } - @State message: string = 'Hello World' - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Button() { - Text('next page') - .fontSize(20) - .fontWeight(FontWeight.Bold) - }.type(ButtonType.Capsule) - .margin({ - top: 20 - }) - .backgroundColor('#0D9FFB') - .width('35%') - .height('5%') - .onClick(()=>{ - }) - } - .width('100%') - } - .height('100%') - } - } \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryconvertxmletstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/commonlibrary/crossplatform/commonlibraryconvertxmletstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts deleted file mode 100644 index 92a16d84e..000000000 --- a/commonlibrary/crossplatform/commonlibraryconvertxmletstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts +++ /dev/null @@ -1,49 +0,0 @@ -import hilog from '@ohos.hilog'; -import TestRunner from '@ohos.application.testRunner'; -import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; - -var abilityDelegator = undefined -var abilityDelegatorArguments = undefined - -async function onAbilityCreateCallback() { - hilog.info(0x0000, 'testTag', '%{public}s', 'onAbilityCreateCallback'); -} - -async function addAbilityMonitorCallback(err: any) { - 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() { - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun run'); - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var testAbilityName = abilityDelegatorArguments.bundleName + '.TestAbility' - let lMonitor = { - abilityName: testAbilityName, - onAbilityCreate: onAbilityCreateCallback, - }; - abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) - var cmd = 'aa start -d 0 -a TestAbility' + ' -b ' + abilityDelegatorArguments.bundleName - var debug = abilityDelegatorArguments.parameters['-D'] - if (debug == 'true') - { - cmd += ' -D' - } - hilog.info(0x0000, 'testTag', 'cmd : %{public}s', cmd); - abilityDelegator.executeShellCommand(cmd, - (err: any, d: any) => { - hilog.info(0x0000, 'testTag', 'executeShellCommand : err : %{public}s', JSON.stringify(err) ?? ''); - hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.stdResult ?? ''); - hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.exitCode ?? ''); - }) - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun end'); - } -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryconvertxmletstest/src/main/ets/test/List.test.ets b/commonlibrary/crossplatform/commonlibraryconvertxmletstest/src/main/ets/test/List.test.ets deleted file mode 100644 index 6b5ba642b..000000000 --- a/commonlibrary/crossplatform/commonlibraryconvertxmletstest/src/main/ets/test/List.test.ets +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import XmlTest from './convertxml.test' - -export default function testsuite() { - XmlTest() -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryconvertxmletstest/src/main/ets/test/convertxml.test.ets b/commonlibrary/crossplatform/commonlibraryconvertxmletstest/src/main/ets/test/convertxml.test.ets deleted file mode 100644 index 943af1b5b..000000000 --- a/commonlibrary/crossplatform/commonlibraryconvertxmletstest/src/main/ets/test/convertxml.test.ets +++ /dev/null @@ -1,213 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; -import convertxml from "@ohos.convertxml"; -export default function XmlTest() { - describe("XmlTest", function () { - /** - * @tc.number: TEST_CONVERT_XML_001 - * @tc.name : testConvertXml001 - * @tc.desc : To convert XML text to JavaScript object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testConvertXml001", 0, function () { - let xml = "\n"; - let conv = new convertxml.ConvertXML(); - let options = { trim: false, declarationKey: "_declaration", instructionKey: "_instruction", attributesKey: "_attributes", textKey: "_text", cdataKey: "_cdata", doctypeKey: "_doctype", commentKey: "_comment", parentKey: "_parent", typeKey: "_type", nameKey: "_name", elementsKey: "_elements" }; - let result = conv.convertToJSObject(xml, options); - console.info(result["_elements"][0]["_name"]); - expect(result["_elements"][0]["_name"] == "a").assertEqual(true); - }); - - /** - * @tc.number: TEST_CONVERT_XML_002 - * @tc.name : testConvertXml002 - * @tc.desc : To convert XML text to JavaScript object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testConvertXml002", 0, function () { - let xml = '' + '' + "Happy" + ""; - let conv = new convertxml.ConvertXML(); - let options = { - trim: false, - declarationKey: "_declaration", - ignoreComment: true, - instructionKey: "_instruction", - attributesKey: "_attributes", - textKey: "_text", - cdataKey: "_cdata", - doctypeKey: "_doctype", - commentKey: "_comment", - parentKey: "_parent", - typeKey: "_type", - nameKey: "_name", - elementsKey: "_elements", - }; - let result = conv.convertToJSObject(xml, options); - console.info("================testConvert001================="); - console.info(result["_elements"][0]["_elements"][0]["_text"]); - console.info(result["_elements"][0]); - console.info(result["_elements"][0]["_name"]); - expect(result["_elements"][0]["_elements"][0]["_text"] == "Happy").assertEqual(true); - }); - - /** - * @tc.number: TEST_CONVERT_XML_003 - * @tc.name : testConvertXml003 - * @tc.desc : To convert XML text to JavaScript object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testConvertXml003", 0, function () { - let xml = "Hi"; - let conv = new convertxml.ConvertXML(); - let options = { trim: true, declarationKey: "_declaration", instructionKey: "_instruction", attributesKey: "_attributes", textKey: "_text", cdataKey: "_cdata", doctypeKey: "_doctype", commentKey: "_comment", parentKey: "_parent", typeKey: "_type", nameKey: "_name", elementsKey: "_elements" }; - let result = conv.convertToJSObject(xml, options); - console.info("================testConvert002================="); - console.info(result["_elements"][0]["_elements"][0]["_text"]); - expect(result["_elements"][0]["_elements"][0]["_text"] == "Hi").assertEqual(true); - }); - - /** - * @tc.number: TEST_CONVERT_XML_004 - * @tc.name : testConvertXml004 - * @tc.desc : To convert XML text to JavaScript object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testConvertXml004", 0, function () { - let xml = ""; - let conv = new convertxml.ConvertXML(); - let options = { trim: false, declarationKey: "_declaration", instructionKey: "_instruction", attributesKey: "_attributes", textKey: "_text", cdataKey: "_cdata", doctypeKey: "_doctype", commentKey: "_comment", parentKey: "_parent", typeKey: "_type", nameKey: "_name", elementsKey: "_elements" }; - let result = conv.convertToJSObject(xml, options); - console.info("================testConvert003================="); - console.info(result["_elements"][0]["_instruction"]); - expect(result["_elements"][0]["_instruction"] == "there").assertEqual(true); - }); - - /** - * @tc.number: TEST_CONVERT_XML_005 - * @tc.name : testConvertXml005 - * @tc.desc : To convert XML text to JavaScript object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testConvertXml005", 0, function () { - let xml = ""; - let conv = new convertxml.ConvertXML(); - let options = { trim: false, declarationKey: "_declaration", instructionKey: "_instruction", attributesKey: "_attributes", textKey: "_text", cdataKey: "_cdata", doctypeKey: "_doctype", commentKey: "_comment", parentKey: "_parent", typeKey: "_type", nameKey: "_name", elementsKey: "_elements" }; - let result = conv.convertToJSObject(xml, options); - console.info("================testConvert004================="); - console.info(result["_elements"][0]["_type"]); - expect(result["_elements"][0]["_type"] == "instruction").assertEqual(true); - }); - - /** - * @tc.number: TEST_CONVERT_OPTIONS_001 - * @tc.name : testConvertOptions001 - * @tc.desc : To test ConvertOptions. - * @tc.size : MediumTest - * @tc.type : Field - * @tc.level : Level 0 - */ - it("testConvertOptions001", 0, function () { - let xml = '' + '' + " Happy" + " Work" + " Play" + ""; - let conv = new convertxml.ConvertXML(); - let options = { - trim: false, - ignoreDeclaration: false, - ignoreInstruction: false, - ignoreAttributes: false, - ignoreComment: false, - ignoreCDATA: false, - ignoreDoctype: false, - ignoreText: false, - declarationKey: "_declaration", - instructionKey: "_instruction", - attributesKey: "_attributes", - textKey: "_text", - cdataKey: "_cdata", - doctypeKey: "_doctype", - commentKey: "_comment", - parentKey: "_parent", - typeKey: "_type", - nameKey: "_name", - elementsKey: "_elements", - }; - let result = conv.convertToJSObject(xml, options); - expect(result["_declaration"] != null).assertTrue(); - expect(result["_parent"] == null).assertTrue(); - expect(result["_elements"][0]["_type"] == "element").assertTrue(); - expect(result["_elements"][0]["_name"] == "note").assertTrue(); - expect(result["_elements"][0]["_elements"] != null).assertTrue(); - expect(result["_declaration"]["_attributes"]["version"] == "1.0").assertEqual(true); - }); - - /** - * @tc.number: TEST_CONVERT_OPTIONS_002 - * @tc.name : testConvertOptions002 - * @tc.desc : To test ConvertOptions. - * @tc.size : MediumTest - * @tc.type : Field - * @tc.level : Level 0 - */ - it("testConvertOptions002", 0, function () { - let xml = '' + "" + '' + " Happy" + " Work" + " Play" + ""; - let conv = new convertxml.ConvertXML(); - let options = { trim: false, declarationKey: "_declaration", instructionKey: "_instruction", attributesKey: "_attributes", textKey: "_text", cdataKey: "_cdata", doctypeKey: "doctype", commentKey: "_comment", parentKey: "_parent", typeKey: "_type", nameKey: "_name", elementsKey: "_elements" }; - let result = conv.convertToJSObject(xml, options); - expect(result["_elements"][0]["doctype"] == "foo").assertTrue(); - }); - - /** - * @tc.number: TEST_CONVERT_OPTIONS_003 - * @tc.name : testConvertOptions003 - * @tc.desc : To test ConvertOptions. - * @tc.size : MediumTest - * @tc.type : Field - * @tc.level : Level 0 - */ - it("testConvertOptions003", 0, function () { - let xml = ' " and & \t ]]>'; - let conv = new convertxml.ConvertXML(); - let options = { trim: false, declarationKey: "_declaration", instructionKey: "_instruction", attributesKey: "_attributes", textKey: "_text", cdataKey: "_cdata", doctypeKey: "_doctype", commentKey: "_comment", parentKey: "_parent", typeKey: "_type", nameKey: "_name", elementsKey: "_elements" }; - let result = conv.convertToJSObject(xml, options); - expect(result["_elements"][0]["_cdata"] != null).assertTrue(); - }); - - /** - * @tc.number: TEST_CONVERT_OPTIONS_004 - * @tc.name : testConvertOptions004 - * @tc.desc : To test ConvertOptions. - * @tc.size : MediumTest - * @tc.type : Field - * @tc.level : Level 0 - */ - it("testConvertOptions004", 0, function () { - let xml = "\n"; - let conv = new convertxml.ConvertXML(); - let options = { trim: false, declarationKey: "_declaration", instructionKey: "_instruction", attributesKey: "_attributes", textKey: "_text", cdataKey: "_cdata", doctypeKey: "_doctype", commentKey: "_comment", parentKey: "_parent", typeKey: "_type", nameKey: "_name", elementsKey: "_elements" }; - let result = conv.convertToJSObject(xml, options); - expect(result["_elements"][0]["_comment"] != null).assertTrue(); - }); - }); -} diff --git a/commonlibrary/crossplatform/commonlibraryconvertxmletstest/src/main/module.json b/commonlibrary/crossplatform/commonlibraryconvertxmletstest/src/main/module.json deleted file mode 100644 index a4443e713..000000000 --- a/commonlibrary/crossplatform/commonlibraryconvertxmletstest/src/main/module.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "module": { - "name": "entry_test", - "type": "feature", - "description": "$string:module_test_desc", - "mainElement": "TestAbility", - "deviceTypes": [ - "phone" - ], - "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", - "skills": [ - { - "actions": [ - "action.system.home" - ], - "entities": [ - "entity.system.home" - ] - } - ] - } - ] - } -} diff --git a/commonlibrary/crossplatform/commonlibraryconvertxmletstest/src/main/resources/base/element/color.json b/commonlibrary/crossplatform/commonlibraryconvertxmletstest/src/main/resources/base/element/color.json deleted file mode 100644 index 3c712962d..000000000 --- a/commonlibrary/crossplatform/commonlibraryconvertxmletstest/src/main/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/commonlibrary/crossplatform/commonlibraryconvertxmletstest/src/main/resources/base/element/string.json b/commonlibrary/crossplatform/commonlibraryconvertxmletstest/src/main/resources/base/element/string.json deleted file mode 100644 index 65d8fa5a7..000000000 --- a/commonlibrary/crossplatform/commonlibraryconvertxmletstest/src/main/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/commonlibrary/crossplatform/commonlibraryconvertxmletstest/src/main/resources/base/media/icon.png b/commonlibrary/crossplatform/commonlibraryconvertxmletstest/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6BLrPFWk?s;$LOP{GmJpBl$qoSA!PUg~PA65-S00{{S`XKG6NkG0RgjEntPrmV+?0|00mu7;+5 zrdpa{2QLqPJ4Y{j7=Mrl{BaxrkdY69+c~(w{Fv-v&aR%aEI&JYSeRTLWm!zbv;?)_ ziZB;fwGbbeL5Q}YLx`J$lp~A09KK8t_z}PZ=4ZzgdeKtgoc+o5EvN9A1K1_<>M?MBqb#!ASf&# zEX?<)!RH(7>1P+j=jqG(58}TVN-$psA6K}atCuI!KTJD&FMmH-78ZejBm)0qc{ESp z|LuG1{QnBUJRg_E=h1#XMWt2%fcoN@l7eAS!Es?Q+;XsRNPhiiE=@AqlLkJzF`O18 zbsbSmKN=aaq8k3NFYZfDWpKmM!coBU0(XnL8R{4=i|wi{!uWYM2je{U{B*K2PVdu&=E zTq*-XsEsJ$u5H4g6DIm2Y!DN`>^v|AqlwuCD;w45K0@eqauiqWf7l&o)+YLHm~|L~ z7$0v5mkobriU!H<@mVJHLlmQqzQ3d6Rh_-|%Yy2li*tHO>_vcnuZ7OR_xkAIuIU&x z-|8Y0wj|6|a6_I(v91y%k_kNw6pnkNdxjqG8!%Vz_d%c_!X+6-;1`GC9_FpjoHev5fEV7RhJ>r=mh-jp$fqbqRJ=obwdgLDVP5+s zy1=_DWG0Y-Jb3t^WXmkr(d9~08k-|#Ly zaNOmT(^9tIb&eb4%CzIT zAm3CUtWSr1t4?h1kk#NBi{U|pJslvME{q|_eS^3En>SOqSxyuN1x;Is@8~m?*>}** znrRFArP!K_52R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%YPq)r5sd%IJ^>?>rZQpZa&6@NZXWMhv+&Kos7?`_$V{;vPYff=#c-@kal zxFI;S5x+>=nGK%zWv@Q@X(1Hj!5qmJb5{n?_*lv~dZLcKopk!Z%zL+!6amDI{qIi0 z1GDcLDTz=TcPJKv5@`vL7As`(T2OR3yA&vsZ+~;NMAUZz0%5rq5T|$>y(Wa+bN5Eza-B&AU}xzek^PrSQM#E>|f4 diff --git a/commonlibrary/crossplatform/commonlibrarydequeetstest/src/main/ets/TestAbility/TestAbility.ets b/commonlibrary/crossplatform/commonlibrarydequeetstest/src/main/ets/TestAbility/TestAbility.ets deleted file mode 100644 index 368aef919..000000000 --- a/commonlibrary/crossplatform/commonlibrarydequeetstest/src/main/ets/TestAbility/TestAbility.ets +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import UIAbility from '@ohos.app.ability.UIAbility'; -import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; -import hilog from '@ohos.hilog'; -import { Hypium } from '@ohos/hypium'; -import testsuite from '../test/List.test'; -import window from '@ohos.window'; - -export default class TestAbility extends UIAbility { - onCreate(want, 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) ?? ''); - var abilityDelegator: any - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var abilityDelegatorArguments: any - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - hilog.info(0x0000, 'testTag', '%{public}s', 'start run testcase!!!'); - Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) - } - - onDestroy() { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onDestroy'); - } - - onWindowStageCreate(windowStage: window.WindowStage) { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageCreate'); - windowStage.loadContent('TestAbility/pages/Index', (err, data) => { - 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. Data: %{public}s', - JSON.stringify(data) ?? ''); - }); - } - - 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/commonlibrary/crossplatform/commonlibrarydequeetstest/src/main/ets/TestAbility/pages/Index.ets b/commonlibrary/crossplatform/commonlibrarydequeetstest/src/main/ets/TestAbility/pages/Index.ets deleted file mode 100644 index e95640899..000000000 --- a/commonlibrary/crossplatform/commonlibrarydequeetstest/src/main/ets/TestAbility/pages/Index.ets +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import hilog from '@ohos.hilog'; - -@Entry -@Component -struct Index { - aboutToAppear() { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility index aboutToAppear'); - } - @State message: string = 'Hello World' - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Button() { - Text('next page') - .fontSize(20) - .fontWeight(FontWeight.Bold) - }.type(ButtonType.Capsule) - .margin({ - top: 20 - }) - .backgroundColor('#0D9FFB') - .width('35%') - .height('5%') - .onClick(()=>{ - }) - } - .width('100%') - } - .height('100%') - } - } \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibrarydequeetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/commonlibrary/crossplatform/commonlibrarydequeetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts deleted file mode 100644 index 92a16d84e..000000000 --- a/commonlibrary/crossplatform/commonlibrarydequeetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts +++ /dev/null @@ -1,49 +0,0 @@ -import hilog from '@ohos.hilog'; -import TestRunner from '@ohos.application.testRunner'; -import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; - -var abilityDelegator = undefined -var abilityDelegatorArguments = undefined - -async function onAbilityCreateCallback() { - hilog.info(0x0000, 'testTag', '%{public}s', 'onAbilityCreateCallback'); -} - -async function addAbilityMonitorCallback(err: any) { - 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() { - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun run'); - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var testAbilityName = abilityDelegatorArguments.bundleName + '.TestAbility' - let lMonitor = { - abilityName: testAbilityName, - onAbilityCreate: onAbilityCreateCallback, - }; - abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) - var cmd = 'aa start -d 0 -a TestAbility' + ' -b ' + abilityDelegatorArguments.bundleName - var debug = abilityDelegatorArguments.parameters['-D'] - if (debug == 'true') - { - cmd += ' -D' - } - hilog.info(0x0000, 'testTag', 'cmd : %{public}s', cmd); - abilityDelegator.executeShellCommand(cmd, - (err: any, d: any) => { - hilog.info(0x0000, 'testTag', 'executeShellCommand : err : %{public}s', JSON.stringify(err) ?? ''); - hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.stdResult ?? ''); - hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.exitCode ?? ''); - }) - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun end'); - } -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibrarydequeetstest/src/main/ets/test/Deque.test.ets b/commonlibrary/crossplatform/commonlibrarydequeetstest/src/main/ets/test/Deque.test.ets deleted file mode 100644 index a42234175..000000000 --- a/commonlibrary/crossplatform/commonlibrarydequeetstest/src/main/ets/test/Deque.test.ets +++ /dev/null @@ -1,596 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import Deque from "@ohos.util.Deque"; -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; -export default function DequeTest() { - describe("DequeTest", function () { - /** - * @tc.number: TEST_CONSTRUCTOR_001 - * @tc.name : testConstructor001 - * @tc.desc : Create an Deque instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testConstructor001", 0, function () { - let deque = new Deque(); - expect(deque != null).assertTrue(); - }); - - /** - * @tc.number: TEST_LENGTH_001 - * @tc.name : testLength001 - * @tc.desc : Get the number of elements in the deque instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 0 - */ - it("testLength001", 0, function () { - let deque = new Deque(); - deque.insertEnd(8); - deque.insertEnd(9); - let size = deque.length; - expect(size).assertEqual(2); - }); - - /** - * @tc.number: TEST_INSERT_FRONT_001 - * @tc.name : testInsertFront001 - * @tc.desc : Add element to deque instance header. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testInsertFront001", 0, function () { - let deque = new Deque(); - deque.insertFront("一"); - let res = deque.getFirst(); - expect(res).assertEqual("一"); - }); - - /** - * @tc.number: TEST_INSERT_FRONT_002 - * @tc.name : testInsertFront002 - * @tc.desc : Add element to deque instance header. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testInsertFront002", 0, function () { - let deque = new Deque(); - deque.insertFront(8); - let res = deque.getFirst(); - expect(res).assertEqual(8); - }); - - /** - * @tc.number: TEST_INSERT_FRONT_003 - * @tc.name : testInsertFront003 - * @tc.desc : Add element to deque instance header. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testInsertFront003", 0, function () { - let deque = new Deque(); - let a = { name: "lala", age: "15" }; - deque.insertFront(a); - let res = deque.getFirst(); - expect(res).assertEqual(a); - }); - - /** - * @tc.number: TEST_INSERT_FRONT_004 - * @tc.name : testInsertFront004 - * @tc.desc : Add element to deque instance header. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testInsertFront004", 0, function () { - let deque = new Deque(); - deque.insertFront("$"); - let res = deque.getFirst(); - expect(res).assertEqual("$"); - }); - - /** - * @tc.number: TEST_INSERT_FRONT_005 - * @tc.name : testInsertFront005 - * @tc.desc : Add element to deque instance header. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testInsertFront005", 0, function () { - let deque = new Deque(); - deque.insertFront(" "); - let res = deque.getFirst(); - expect(res).assertEqual(" "); - }); - - /** - * @tc.number: TEST_INSERT_FRONT_006 - * @tc.name : testInsertFront006 - * @tc.desc : Add element to deque instance header. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testInsertFront006", 0, function () { - let deque = new Deque(); - deque.insertFront(null); - let res = deque.getFirst(); - expect(res).assertEqual(null); - }); - - /** - * @tc.number: TEST_INSERT_FRONT_007 - * @tc.name : testInsertFront007 - * @tc.desc : Add element to deque instance header. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testInsertFront007", 0, function () { - let deque = new Deque(); - deque.insertFront(undefined); - let res = deque.getFirst(); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_INSERT_FRONT_008 - * @tc.name : testInsertFront008 - * @tc.desc : Add element to deque instance header. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testInsertFront008", 0, function () { - let deque = new Deque(); - for (let i = 0; i < 100; i++) { - deque.insertFront(i); - let res = deque.getFirst(); - expect(res).assertEqual(i); - } - let res1 = deque.length; - expect(res1).assertEqual(100); - }); - - /** - * @tc.number: TEST_INSERT_FRONT_009 - * @tc.name : testInsertFront009 - * @tc.desc : Add element to deque instance header. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testInsertFront009", 0, function () { - let deque = new Deque(); - let a = [1, 2, 3, 4]; - deque.insertFront(a); - let res = deque.getFirst(); - expect(res).assertEqual(a); - }); - - /** - * @tc.number: TEST_INSERT_FRONT_010 - * @tc.name : testInsertFront010 - * @tc.desc : Add element to deque instance header. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testInsertFront010", 0, function () { - let deque = new Deque(); - try { - deque.insertFront.bind({}, "a")(); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200011); - expect(err.message).assertEqual(`The insertFront method cannot be bound`); - } - }); - - /** - * @tc.number: TEST_INSERT_END_001 - * @tc.name : testInsertEnd001 - * @tc.desc : Add element to deque instance end. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testInsertEnd001", 0, function () { - let deque = new Deque(); - deque.insertEnd(8); - let res = deque.getLast(); - expect(res).assertEqual(8); - }); - - /** - * @tc.number: TEST_INSERT_END_002 - * @tc.name : testInsertEnd002 - * @tc.desc : Add element to deque instance end. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testInsertEnd002", 0, function () { - let deque = new Deque(); - let a = ["a", "b", "c"]; - deque.insertEnd(a); - let res = deque.getLast(); - expect(res).assertEqual(a); - }); - - /** - * @tc.number: TEST_INSERT_END_003 - * @tc.name : testInsertEnd003 - * @tc.desc : Add element to deque instance end. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testInsertEnd003", 0, function () { - let deque = new Deque(); - let a = { class: "6班", say: "we" }; - deque.insertEnd(a); - let res = deque.getLast(); - expect(res).assertEqual(a); - }); - - /** - * @tc.number: TEST_INSERT_END_004 - * @tc.name : testInsertEnd004 - * @tc.desc : Add element to deque instance end. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testInsertEnd004", 0, function () { - let deque = new Deque(); - deque.insertEnd("$"); - let res = deque.getLast(); - expect(res).assertEqual("$"); - }); - - /** - * @tc.number: TEST_INSERT_END_005 - * @tc.name : testInsertEnd005 - * @tc.desc : Add element to deque instance end. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testInsertEnd005", 0, function () { - let deque = new Deque(); - deque.insertEnd(" "); - let res = deque.getLast(); - expect(res).assertEqual(" "); - }); - - /** - * @tc.number: TEST_INSERT_END_006 - * @tc.name : testInsertEnd006 - * @tc.desc : Add element to deque instance end. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testInsertEnd006", 0, function () { - let deque = new Deque(); - deque.insertEnd(null); - let res = deque.getLast(); - expect(res).assertEqual(null); - }); - - /** - * @tc.number: TEST_INSERT_END_007 - * @tc.name : testInsertEnd007 - * @tc.desc : Add element to deque instance end. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testInsertEnd007", 0, function () { - let deque = new Deque(); - deque.insertEnd(undefined); - let res = deque.getLast(); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_INSERT_END_008 - * @tc.name : testInsertEnd008 - * @tc.desc : Add element to deque instance end. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testInsertEnd008", 0, function () { - let deque = new Deque(); - for (let i = 0; i < 100; i++) { - deque.insertEnd(i); - let res = deque.getLast(); - expect(res).assertEqual(i); - } - let res1 = deque.length; - expect(res1).assertEqual(100); - }); - - /** - * @tc.number: TEST_HAS_001 - * @tc.name : testHas001 - * @tc.desc : Determine whether the deque instance contains the specified element. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testHas001", 0, function () { - let deque = new Deque(); - deque.insertEnd(6); - let res = deque.has(6); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_HAS_002 - * @tc.name : testHas002 - * @tc.desc : Determine whether the deque instance contains the specified element. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testHas002", 0, function () { - let deque = new Deque(); - deque.insertEnd(8); - let res = deque.has(6); - expect(res).assertEqual(false); - }); - - /** - * @tc.number: TEST_HAS_003 - * @tc.name : testHas003 - * @tc.desc : Determine whether the deque instance contains the specified element. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testHas003", 0, function () { - let deque = new Deque(); - let res = deque.has(6); - expect(res).assertEqual(false); - }); - - /** - * @tc.number: TEST_GET_FIRST_001 - * @tc.name : testGetFirst001 - * @tc.desc : Get the header element of the deque instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetFirst001", 0, function () { - let deque = new Deque(); - deque.insertEnd("四"); - deque.insertEnd("三"); - let res = deque.getFirst(); - expect(res).assertEqual("四"); - }); - - /** - * @tc.number: TEST_GET_FIRST_002 - * @tc.name : testGetFirst002 - * @tc.desc : Get the header element of the deque instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetFirst002", 0, function () { - let deque = new Deque(); - let res = deque.getFirst(); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_GET_LAST_001 - * @tc.name : testGetLast001 - * @tc.desc : Get the end element of the deque instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetLast001", 0, function () { - let deque = new Deque(); - deque.insertEnd(8); - deque.insertEnd("三"); - let res = deque.getLast(); - expect(res).assertEqual("三"); - }); - - /** - * @tc.number: TEST_GET_LAST_002 - * @tc.name : testGetLast002 - * @tc.desc : Get the end element of the deque instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetLast002", 0, function () { - let deque = new Deque(); - let res = deque.getLast(); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_POP_FIRST_001 - * @tc.name : testPopFirst001 - * @tc.desc : Delete the header element of a deque instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testPopFirst001", 0, function () { - let deque = new Deque(); - deque.insertEnd(8); - deque.insertFront("一"); - let res = deque.popFirst(); - expect(res).assertEqual("一"); - }); - - /** - * @tc.number: TEST_POP_FIRST_002 - * @tc.name : testPopFirst002 - * @tc.desc : Delete the header element of a deque instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testPopFirst002", 0, function () { - let deque = new Deque(); - let res = deque.popFirst(); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_POP_LAST_001 - * @tc.name : testPopLast001 - * @tc.desc : Delete the end element of a deque instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testPopLast001", 0, function () { - let deque = new Deque(); - deque.insertEnd(8); - deque.insertFront("一"); - deque.insertFront("二"); - let res = deque.popLast(); - expect(res).assertEqual(8); - }); - - /** - * @tc.number: TEST_POP_LAST_002 - * @tc.name : testPopLast002 - * @tc.desc : Delete the end element of a deque instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testPopLast002", 0, function () { - let deque = new Deque(); - let res = deque.popLast(); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_FOR_EACH_001 - * @tc.name : testForEach001 - * @tc.desc : Traversing elements in deque instances. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testForEach001", 0, function () { - let deque = new Deque(); - deque.insertEnd(8); - deque.insertFront("一"); - deque.insertFront("二"); - deque.insertEnd(1); - deque.insertEnd(2); - deque.insertEnd(3); - deque.insertEnd(4); - deque.insertEnd(5); - deque.insertEnd(6); - deque.insertFront("三"); - deque.insertFront("四"); - let arr = []; - deque.forEach((item, index) => { - arr.push(item); - }); - let a = ["四", "三", "二", "一", 8, 1, 2, 3, 4, 5, 6]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number: TEST_FOR_EACH_002 - * @tc.name : testForEach002 - * @tc.desc : Traversing elements in deque instances. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testForEach002", 0, function () { - let deque = new Deque(); - deque.insertEnd(8); - deque.insertEnd(1); - deque.insertEnd(2); - deque.insertEnd(3); - deque.insertEnd(3); - deque.insertEnd(4); - deque.insertEnd(5); - deque.insertEnd(6); - deque.popFirst(); - deque.popLast(); - deque.insertFront(8); - deque.insertEnd(6); - let arr = []; - deque.forEach((item, index) => { - arr.push(item); - }); - let a = [8, 1, 2, 3, 3, 4, 5, 6]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number: TEST_ITERATOR_001 - * @tc.name : testIterator001 - * @tc.desc : Iterate over all elements in the deque instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIterator001", 0, function () { - let deque = new Deque(); - deque.insertEnd(8); - deque.insertFront("a"); - deque.insertFront("b"); - deque.insertEnd(5); - deque.insertEnd(6); - deque.insertFront("s"); - deque.insertFront("z"); - deque.popFirst(); - deque.popLast(); - deque.insertFront("g"); - deque.insertEnd(6); - let size = deque.length; - let arr = []; - let itr = deque[Symbol.iterator](); - for (let i = 0; i < size; i++) { - arr.push(itr.next().value); - } - let a = ["g", "s", "b", "a", 8, 5, 6]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - }); -} diff --git a/commonlibrary/crossplatform/commonlibrarydequeetstest/src/main/ets/test/List.test.ets b/commonlibrary/crossplatform/commonlibrarydequeetstest/src/main/ets/test/List.test.ets deleted file mode 100644 index f76f2efdc..000000000 --- a/commonlibrary/crossplatform/commonlibrarydequeetstest/src/main/ets/test/List.test.ets +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import DequeTest from './Deque.test' - -export default function testsuite() { - DequeTest() -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibrarydequeetstest/src/main/module.json b/commonlibrary/crossplatform/commonlibrarydequeetstest/src/main/module.json deleted file mode 100644 index a4443e713..000000000 --- a/commonlibrary/crossplatform/commonlibrarydequeetstest/src/main/module.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "module": { - "name": "entry_test", - "type": "feature", - "description": "$string:module_test_desc", - "mainElement": "TestAbility", - "deviceTypes": [ - "phone" - ], - "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", - "skills": [ - { - "actions": [ - "action.system.home" - ], - "entities": [ - "entity.system.home" - ] - } - ] - } - ] - } -} diff --git a/commonlibrary/crossplatform/commonlibrarydequeetstest/src/main/resources/base/element/color.json b/commonlibrary/crossplatform/commonlibrarydequeetstest/src/main/resources/base/element/color.json deleted file mode 100644 index 3c712962d..000000000 --- a/commonlibrary/crossplatform/commonlibrarydequeetstest/src/main/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/commonlibrary/crossplatform/commonlibrarydequeetstest/src/main/resources/base/element/string.json b/commonlibrary/crossplatform/commonlibrarydequeetstest/src/main/resources/base/element/string.json deleted file mode 100644 index 65d8fa5a7..000000000 --- a/commonlibrary/crossplatform/commonlibrarydequeetstest/src/main/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/commonlibrary/crossplatform/commonlibrarydequeetstest/src/main/resources/base/media/icon.png b/commonlibrary/crossplatform/commonlibrarydequeetstest/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6BLrPFWk?s;$LOP{Gm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Pnc1fI&Sfi)_GQNLI0Pj6t{5jFXpFx*3OZs8~{vTPoi6F1LbYq`ZIvc}qkC6yc zL7HA9>N1}pl17mEh&-v2e<4kgOI#^Zyy#-n@_O0)H8*7DV-F@WU%TPZ^jRH>{%aZ! zUUNFnyt;bhD~TWWf98}Lm*B=#>BgIz5bz2Zlq5=4k~pbAB7FKXNtD)$N!cZt8{Ql7^Uf4& z+nH7QyH{2713&3oJ&7*`c*KCO=JTOXzT>yOymIaNs=dp0=C}51K0V+-NynH4^Cqd| zHCr}}Qmi}s5hEQRaOQKX#bCmF6Mo6eXd9ny8?w3icFP;UJgrIpeH86vH#e?ba~rH| zur6;pzcu^p zcQ>}~|C0?=?)`k_#G?2N3bW5@|-ixhY#*OQhnjTQODT@`}fixus8Kz rG>;UIOF6=sF?`I`bms>u-_2dWTX|BuZ%yIf?7@?H8~C>M?@stH?zdm| diff --git a/commonlibrary/crossplatform/commonlibraryhashmapetstest/src/main/ets/TestAbility/TestAbility.ets b/commonlibrary/crossplatform/commonlibraryhashmapetstest/src/main/ets/TestAbility/TestAbility.ets deleted file mode 100644 index 368aef919..000000000 --- a/commonlibrary/crossplatform/commonlibraryhashmapetstest/src/main/ets/TestAbility/TestAbility.ets +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import UIAbility from '@ohos.app.ability.UIAbility'; -import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; -import hilog from '@ohos.hilog'; -import { Hypium } from '@ohos/hypium'; -import testsuite from '../test/List.test'; -import window from '@ohos.window'; - -export default class TestAbility extends UIAbility { - onCreate(want, 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) ?? ''); - var abilityDelegator: any - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var abilityDelegatorArguments: any - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - hilog.info(0x0000, 'testTag', '%{public}s', 'start run testcase!!!'); - Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) - } - - onDestroy() { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onDestroy'); - } - - onWindowStageCreate(windowStage: window.WindowStage) { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageCreate'); - windowStage.loadContent('TestAbility/pages/Index', (err, data) => { - 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. Data: %{public}s', - JSON.stringify(data) ?? ''); - }); - } - - 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/commonlibrary/crossplatform/commonlibraryhashmapetstest/src/main/ets/TestAbility/pages/Index.ets b/commonlibrary/crossplatform/commonlibraryhashmapetstest/src/main/ets/TestAbility/pages/Index.ets deleted file mode 100644 index e95640899..000000000 --- a/commonlibrary/crossplatform/commonlibraryhashmapetstest/src/main/ets/TestAbility/pages/Index.ets +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import hilog from '@ohos.hilog'; - -@Entry -@Component -struct Index { - aboutToAppear() { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility index aboutToAppear'); - } - @State message: string = 'Hello World' - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Button() { - Text('next page') - .fontSize(20) - .fontWeight(FontWeight.Bold) - }.type(ButtonType.Capsule) - .margin({ - top: 20 - }) - .backgroundColor('#0D9FFB') - .width('35%') - .height('5%') - .onClick(()=>{ - }) - } - .width('100%') - } - .height('100%') - } - } \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryhashmapetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/commonlibrary/crossplatform/commonlibraryhashmapetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts deleted file mode 100644 index 92a16d84e..000000000 --- a/commonlibrary/crossplatform/commonlibraryhashmapetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts +++ /dev/null @@ -1,49 +0,0 @@ -import hilog from '@ohos.hilog'; -import TestRunner from '@ohos.application.testRunner'; -import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; - -var abilityDelegator = undefined -var abilityDelegatorArguments = undefined - -async function onAbilityCreateCallback() { - hilog.info(0x0000, 'testTag', '%{public}s', 'onAbilityCreateCallback'); -} - -async function addAbilityMonitorCallback(err: any) { - 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() { - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun run'); - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var testAbilityName = abilityDelegatorArguments.bundleName + '.TestAbility' - let lMonitor = { - abilityName: testAbilityName, - onAbilityCreate: onAbilityCreateCallback, - }; - abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) - var cmd = 'aa start -d 0 -a TestAbility' + ' -b ' + abilityDelegatorArguments.bundleName - var debug = abilityDelegatorArguments.parameters['-D'] - if (debug == 'true') - { - cmd += ' -D' - } - hilog.info(0x0000, 'testTag', 'cmd : %{public}s', cmd); - abilityDelegator.executeShellCommand(cmd, - (err: any, d: any) => { - hilog.info(0x0000, 'testTag', 'executeShellCommand : err : %{public}s', JSON.stringify(err) ?? ''); - hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.stdResult ?? ''); - hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.exitCode ?? ''); - }) - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun end'); - } -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryhashmapetstest/src/main/ets/test/HashMap.test.ets b/commonlibrary/crossplatform/commonlibraryhashmapetstest/src/main/ets/test/HashMap.test.ets deleted file mode 100644 index 7d2dfc60c..000000000 --- a/commonlibrary/crossplatform/commonlibraryhashmapetstest/src/main/ets/test/HashMap.test.ets +++ /dev/null @@ -1,973 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import HashMap from "@ohos.util.HashMap"; -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; -export default function HashMapTest() { - describe("HashMapTest", function () { - /** - * @tc.number: TEST_CONSTRUCTOR_001 - * @tc.name : testConstructor001 - * @tc.desc : Create an HashMap instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testConstructor001", 0, function () { - let hashMap = new HashMap(); - expect(hashMap != undefined).assertEqual(true); - }); - - /** - * @tc.number: TEST_LENGTH_001 - * @tc.name : testLength001 - * @tc.desc : Get the number of key value pairs in the HashMap instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 0 - */ - it("testLength001", 0, function () { - let hashMap = new HashMap(); - hashMap.set(1, "A"); - hashMap.set(2, "B"); - hashMap.set(3, "C"); - hashMap.set(4, "D"); - hashMap.set(5, "E"); - let res = hashMap.length; - expect(res).assertEqual(5); - }); - - /** - * @tc.number: TEST_IS_EMPTY_001 - * @tc.name : testIsEmpty001 - * @tc.desc : Determine whether the HashMap instance is empty. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsEmpty001", 0, function () { - let hashMap = new HashMap(); - hashMap.set(1, "A"); - hashMap.set(2, "B"); - hashMap.set(3, "C"); - hashMap.set(4, "D"); - hashMap.set(5, "E"); - let res = hashMap.length; - let res1 = hashMap.isEmpty(); - expect(res).assertEqual(5); - expect(res1).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_EMPTY_002 - * @tc.name : testIsEmpty002 - * @tc.desc : Determine whether the HashMap instance is empty. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsEmpty002", 0, function () { - let hashMap = new HashMap(); - hashMap.set(1, "A"); - hashMap.set(2, "B"); - hashMap.set(3, "C"); - hashMap.set(4, "D"); - hashMap.set(5, "E"); - hashMap.clear(); - let res = hashMap.length; - let res1 = hashMap.isEmpty(); - expect(res).assertEqual(0); - expect(res1).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_EMPTY_003 - * @tc.name : testIsEmpty003 - * @tc.desc : Determine whether the HashMap instance is empty. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsEmpty003", 0, function () { - let hashMap = new HashMap(); - try { - hashMap.isEmpty.bind({}, "a")(); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200011); - expect(err.message).assertEqual(`The isEmpty method cannot be bound`); - } - }); - - /** - * @tc.number: TEST_HAS_KEY_001 - * @tc.name : testHasKey001 - * @tc.desc : Determine whether the HashMap contains the specified key. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testHasKey001", 0, function () { - let hashMap = new HashMap(); - hashMap.set(1, "A"); - hashMap.set(2, "B"); - hashMap.set(3, "C"); - hashMap.set(4, "D"); - hashMap.set(5, "E"); - let res = hashMap.hasKey(3); - expect(res).assertEqual(true); - let res1 = hashMap.hasKey(8); - expect(res1).assertEqual(false); - }); - - /** - * @tc.number: TEST_HAS_KEY_002 - * @tc.name : testHasKey002 - * @tc.desc : Determine whether the HashMap contains the specified key. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testHasKey002", 0, function () { - let hashMap = new HashMap(); - let res = hashMap.hasKey(8); - expect(res).assertEqual(false); - }); - - /** - * @tc.number: TEST_HAS_KEY_003 - * @tc.name : testHasKey003 - * @tc.desc : Determine whether the HashMap contains the specified key. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testKeys003", 0, function () { - let hashMap = new HashMap(); - hashMap.set(1, "A"); - hashMap.set(2, "B"); - hashMap.set(3, "C"); - hashMap.set(4, "D"); - hashMap.set(5, "E"); - let res = hashMap.keys(); - for (let i = 0; i < hashMap.length; i++) { - let result = hashMap.hasKey(res.next().value); - expect(result).assertEqual(true); - } - }); - - /** - * @tc.number: TEST_HAS_KEY_004 - * @tc.name : testHasKey004 - * @tc.desc : Determine whether the HashMap contains the specified key. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testHasKey004", 0, function () { - let hashMap = new HashMap(); - try { - hashMap.hasKey.bind({}, "a")(); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200011); - expect(err.message).assertEqual(`The hasKey method cannot be bound`); - } - }); - - /** - * @tc.number: TEST_HAS_VALUE_001 - * @tc.name : testHasValue001 - * @tc.desc : Determine whether the HashMap contains the specified value. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testHasValue001", 0, function () { - let hashMap = new HashMap(); - hashMap.set(1, "A"); - hashMap.set(2, "B"); - hashMap.set(3, "C"); - hashMap.set(4, "D"); - hashMap.set(5, "E"); - let res = hashMap.hasValue("C"); - expect(res).assertEqual(true); - let res1 = hashMap.hasValue(8); - expect(res1).assertEqual(false); - }); - - /** - * @tc.number: TEST_HAS_VALUE_002 - * @tc.name : testHasValue002 - * @tc.desc : Determine whether the HashMap contains the specified value. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testHasValue002", 0, function () { - let hashMap = new HashMap(); - let res = hashMap.hasValue(8); - expect(res).assertEqual(false); - }); - - /** - * @tc.number: TEST_HAS_VALUE_003 - * @tc.name : testHasValue003 - * @tc.desc : Determine whether the HashMap contains the specified value. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testHasValue003", 0, function () { - let hashMap = new HashMap(); - hashMap.set(1, "A"); - hashMap.set(2, "B"); - hashMap.set(3, "C"); - hashMap.set(4, "D"); - hashMap.set(5, "E"); - let res = hashMap.values(); - for (let i = 0; i < hashMap.length; i++) { - let has = hashMap.hasValue(res.next().value); - expect(has).assertEqual(true); - } - }); - - /** - * @tc.number: TEST_GET_001 - * @tc.name : testGet001 - * @tc.desc : Get the corresponding value through the key. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGet001", 0, function () { - let hashMap = new HashMap(); - hashMap.set(1, "A"); - hashMap.set(2, "B"); - hashMap.set(3, "C"); - hashMap.set(4, "D"); - hashMap.set(5, "E"); - let res = hashMap.get(3); - expect(res).assertEqual("C"); - }); - - /** - * @tc.number: TEST_GET_002 - * @tc.name : testGet002 - * @tc.desc : Get the corresponding value through the key. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGet002", 0, function () { - let hashMap = new HashMap(); - let res = hashMap.get(3); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_GET_003 - * @tc.name : testGet003 - * @tc.desc : Get the corresponding value through the key. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGet003", 0, function () { - let hashMap = new HashMap(); - try { - hashMap.get.bind({}, "a")(); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200011); - expect(err.message).assertEqual(`The get method cannot be bound`); - } - }); - - /** - * @tc.number: TEST_SET_ALL_001 - * @tc.name : testSetAll001 - * @tc.desc : Copy key value pairs from one HashMap to another. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSetAll001", 0, function () { - let hashMap = new HashMap(); - hashMap.set(1, "A"); - hashMap.set(2, "B"); - hashMap.set(3, "C"); - hashMap.set(4, "D"); - hashMap.set(5, "E"); - let hashMap1 = new HashMap(); - hashMap1.set(1, 1); - hashMap1.set(2, 2); - hashMap.setAll(hashMap1); - let arr = []; - for (let [key, value] of hashMap) { - arr.push([key, value]); - } - arr.sort(function (a, b) { - return a[0] - b[0]; - }); - - for (let i = 0; i < arr.length; i++) { - expect(arr[i][0]).assertEqual(i + 1); - expect(arr[i][1]).assertEqual(hashMap.get(i + 1)); - } - }); - - /** - * @tc.number: TEST_SET_ALL_002 - * @tc.name : testSetAll002 - * @tc.desc : Copy key value pairs from one HashMap to another. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSetAll002", 0, function () { - let hashMap = new HashMap(); - let hashMap1 = new HashMap(); - hashMap1.set(1, 1); - hashMap1.set(2, 2); - hashMap.setAll(hashMap1); - let arr = []; - for (let [key, value] of hashMap) { - arr.push([key, value]); - } - arr.sort(function (a, b) { - return a[0] - b[0]; - }); - for (let i = 0; i < arr.length; i++) { - expect(JSON.stringify(arr[i])).assertEqual(JSON.stringify([i + 1, hashMap.get(i + 1)])); - } - }); - - /** - * @tc.number: TEST_SET_001 - * @tc.name : testSet001 - * @tc.desc : Add a pair of key value pairs to the HashMap. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSet001", 0, function () { - let hashMap = new HashMap(); - hashMap.set(1, "A"); - let res = hashMap.get(1); - expect(res).assertEqual("A"); - }); - - /** - * @tc.number: TEST_SET_002 - * @tc.name : testSet002 - * @tc.desc : Add a pair of key value pairs to the HashMap. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSet002", 0, function () { - let hashMap = new HashMap(); - hashMap.set(1, 2); - let res = hashMap.get(1); - expect(res).assertEqual(2); - }); - - /** - * @tc.number: TEST_SET_003 - * @tc.name : testSet003 - * @tc.desc : Add a pair of key value pairs to the HashMap. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSet003", 0, function () { - let hashMap = new HashMap(); - let c = [1, 2, 3]; - hashMap.set(1, c); - let res = hashMap.get(1); - expect(res).assertEqual(c); - }); - - /** - * @tc.number: TEST_SET_004 - * @tc.name : testSet004 - * @tc.desc : Add a pair of key value pairs to the HashMap. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSet004", 0, function () { - let hashMap = new HashMap(); - let c = { name: "lili", age: "13" }; - hashMap.set(1, c); - let res = hashMap.get(1); - expect(res).assertEqual(c); - }); - - /** - * @tc.number: TEST_SET_005 - * @tc.name : testSet005 - * @tc.desc : Add a pair of key value pairs to the HashMap. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSet005", 0, function () { - let hashMap = new HashMap(); - hashMap.set("a", "A"); - let res = hashMap.get("a"); - expect(res).assertEqual("A"); - }); - - /** - * @tc.number: TEST_SET_006 - * @tc.name : testSet006 - * @tc.desc : Add a pair of key value pairs to the HashMap. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSet006", 0, function () { - let hashMap = new HashMap(); - hashMap.set("", "A"); - let res = hashMap.get(""); - expect(res).assertEqual("A"); - }); - - /** - * @tc.number: TEST_SET_007 - * @tc.name : testSet007 - * @tc.desc : Add a pair of key value pairs to the HashMap. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSet007", 0, function () { - let hashMap = new HashMap(); - hashMap.set("$", "A"); - let res = hashMap.get("$"); - expect(res).assertEqual("A"); - }); - - /** - * @tc.number: TEST_SET_008 - * @tc.name : testSet008 - * @tc.desc : Add a pair of key value pairs to the HashMap. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSet008", 0, function () { - let hashMap = new HashMap(); - hashMap.set(3.14, "A"); - let res = hashMap.get(3.14); - expect(res).assertEqual("A"); - }); - - /** - * @tc.number: TEST_SET_009 - * @tc.name : testSet009 - * @tc.desc : Add a pair of key value pairs to the HashMap. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSet009", 0, function () { - let hashMap = new HashMap(); - hashMap.set(0.3, "A"); - let res = hashMap.get(0.3); - expect(res).assertEqual("A"); - }); - - /** - * @tc.number: TEST_SET_0010 - * @tc.name : testSet010 - * @tc.desc : Add a pair of key value pairs to the HashMap. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSet010", 0, function () { - let hashMap = new HashMap(); - hashMap.set(-1, "A"); - let res = hashMap.get(-1); - expect(res).assertEqual("A"); - }); - - /** - * @tc.number: TEST_SET_011 - * @tc.name : testSet011 - * @tc.desc : Add a pair of key value pairs to the HashMap. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSet011", 0, function () { - let hashMap = new HashMap(); - let a = {}; - hashMap.set(a, "A"); - let res = hashMap.get(a); - expect(res).assertEqual("A"); - }); - - /** - * @tc.number: TEST_SET_012 - * @tc.name : testSet012 - * @tc.desc : Add a pair of key value pairs to the HashMap. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSet012", 0, function () { - let hashMap = new HashMap(); - hashMap.set(1, null); - let res = hashMap.get(1); - expect(res).assertEqual(null); - }); - - /** - * @tc.number: TEST_SET_013 - * @tc.name : testSet013 - * @tc.desc : Add a pair of key value pairs to the HashMap. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSet013", 0, function () { - let hashMap = new HashMap(); - hashMap.set(1, "$"); - let res = hashMap.get(1); - expect(res).assertEqual("$"); - }); - - /** - * @tc.number: TEST_SET_014 - * @tc.name : testSet014 - * @tc.desc : Add a pair of key value pairs to the HashMap. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSet014", 0, function () { - let hashMap = new HashMap(); - hashMap.set(1, 3.14); - let res = hashMap.get(1); - expect(res).assertEqual(3.14); - }); - - /** - * @tc.number: TEST_SET_015 - * @tc.name : testSet015 - * @tc.desc : Add a pair of key value pairs to the HashMap. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSet015", 0, function () { - let hashMap = new HashMap(); - hashMap.set(1, -1); - let res = hashMap.get(1); - expect(res).assertEqual(-1); - }); - - /** - * @tc.number: TEST_SET_016 - * @tc.name : testSet016 - * @tc.desc : Add a pair of key value pairs to the HashMap. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSet016", 0, function () { - let hashMap = new HashMap(); - let a = {}; - hashMap.set(1, a); - let res = hashMap.get(1); - expect(res).assertEqual(a); - }); - - /** - * @tc.number: TEST_SET_017 - * @tc.name : testSet017 - * @tc.desc : Add a pair of key value pairs to the HashMap. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSet017", 0, function () { - let hashMap = new HashMap(); - for (let i = 0; i < 100; i++) { - hashMap.set(1, i); - } - let res = hashMap.get(1); - let res1 = hashMap.length; - expect(res).assertEqual(99); - expect(res1).assertEqual(1); - }); - - /** - * @tc.number: TEST_SET_018 - * @tc.name : testSet018 - * @tc.desc : Add a pair of key value pairs to the HashMap. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSet018", 0, function () { - let hashMap = new HashMap(); - for (let i = 0; i < 100; i++) { - hashMap.set(i, 1); - let res = hashMap.get(i); - expect(res).assertEqual(1); - } - let res1 = hashMap.length; - expect(res1).assertEqual(100); - }); - - /** - * @tc.number: TEST_SET_019 - * @tc.name : testSet019 - * @tc.desc : Add a pair of key value pairs to the HashMap. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSet019", 0, function () { - let hashMap = new HashMap(); - try { - hashMap.set.bind({}, 1, "A")(); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200011); - expect(err.message).assertEqual(`The set method cannot be bound`); - } - }); - - /** - * @tc.number: TEST_REMOVE_001 - * @tc.name : testRemove001 - * @tc.desc : Delete key value pairs according to key. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testRemove001", 0, function () { - let hashMap = new HashMap(); - hashMap.set(1, "A"); - hashMap.set(2, "B"); - hashMap.set(3, "C"); - hashMap.set(4, "D"); - hashMap.set(5, "E"); - let res = hashMap.remove(3); - expect(res).assertEqual("C"); - let res1 = hashMap.length; - expect(res1).assertEqual(4); - }); - - /** - * @tc.number: TEST_REMOVE_002 - * @tc.name : testRemove002 - * @tc.desc : Delete key value pairs according to key. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testRemove002", 0, function () { - let hashMap = new HashMap(); - let res = hashMap.remove(3); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_REMOVE_003 - * @tc.name : testRemove003 - * @tc.desc : Delete key value pairs according to key. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testRemove003", 0, function () { - let hashMap = new HashMap(); - try { - hashMap.remove.bind({}, "a")(); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200011); - expect(err.message).assertEqual(`The remove method cannot be bound`); - } - }); - - /** - * @tc.number: TEST_CLEAR_001 - * @tc.name : testClear001 - * @tc.desc : Clear all key value pairs in HashMap. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testClear001", 0, function () { - let hashMap = new HashMap(); - hashMap.set(1, "A"); - hashMap.set(2, "B"); - hashMap.set(3, "C"); - hashMap.set(4, "D"); - hashMap.set(5, "E"); - let res = hashMap.length; - expect(res).assertEqual(5); - hashMap.clear(); - let res1 = hashMap.length; - expect(res1).assertEqual(0); - }); - - /** - * @tc.number: TEST_CLEAR_002 - * @tc.name : testClear002 - * @tc.desc : Clear all key value pairs in HashMap. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testClear002", 0, function () { - let hashMap = new HashMap(); - hashMap.clear(); - let res = hashMap.length; - expect(res).assertEqual(0); - }); - - /** - * @tc.number: TEST_KEYS_001 - * @tc.name : testKeys001 - * @tc.desc : Get a collection of all the keys in the HashMap. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testKeys001", 0, function () { - let hashMap = new HashMap(); - hashMap.set(1, "A"); - hashMap.set(2, "B"); - hashMap.set(3, "C"); - hashMap.set(4, "D"); - hashMap.set(5, "E"); - let res = hashMap.keys(); - for (let i = 0; i < hashMap.length; i++) { - let result = hashMap.hasKey(res.next().value); - expect(result).assertEqual(true); - } - }); - - /** - * @tc.number: TEST_VALUES_001 - * @tc.name : testValues001 - * @tc.desc : Get a collection of all the values in the HashMap. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testValues001", 0, function () { - let hashMap = new HashMap(); - hashMap.set(1, "A"); - hashMap.set(2, "B"); - hashMap.set(3, "C"); - hashMap.set(4, "D"); - hashMap.set(5, "E"); - let res = hashMap.values(); - for (let i = 0; i < hashMap.length; i++) { - let has = hashMap.hasValue(res.next().value); - expect(has).assertEqual(true); - } - }); - - /** - * @tc.number: TEST_REPLACE_001 - * @tc.name : testReplace001 - * @tc.desc : Modify the corresponding value according to the specified key. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testReplace001", 0, function () { - let hashMap = new HashMap(); - hashMap.set(1, "A"); - hashMap.set(2, "B"); - hashMap.set(3, "C"); - hashMap.set(4, "D"); - hashMap.set(5, "E"); - let res = hashMap.replace(2, "G"); - expect(res).assertEqual(true); - expect(hashMap.get(2)).assertEqual("G"); - }); - - /** - * @tc.number: TEST_REPLACE_002 - * @tc.name : testReplace002 - * @tc.desc : Modify the corresponding value according to the specified key. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testReplace002", 0, function () { - let hashMap = new HashMap(); - let res = hashMap.replace(2, "G"); - expect(res).assertEqual(false); - }); - - /** - * @tc.number: TEST_FOR_EACH_001 - * @tc.name : testForEach001 - * @tc.desc : Traverse all key value pairs in the HashMap instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testForEach001", 0, function () { - let hashMap = new HashMap(); - hashMap.set(1, "A"); - hashMap.set(2, "B"); - hashMap.set(3, "C"); - hashMap.set(4, "D"); - hashMap.set(5, "E"); - let vals = []; - let keys = []; - hashMap.forEach((value, key) => { - keys.push(key); - vals.push(value); - }); - for (let i = 0; i < keys.length; i++) { - let has = hashMap.hasKey(keys[i]); - expect(has).assertEqual(true); - } - for (let i = 0; i < vals.length; i++) { - let has = hashMap.hasValue(vals[i]); - expect(has).assertEqual(true); - } - }); - - /** - * @tc.number: TEST_FOR_EACH_002 - * @tc.name : testForEach002 - * @tc.desc : Traverse all key value pairs in the HashMap instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testForEach002", 0, function () { - let hashMap = new HashMap(); - let arr = []; - hashMap.forEach((item, index) => { - arr.push(item); - }); - expect(arr.length).assertEqual(0); - }); - - /** - * @tc.number: TEST_FOR_EACH_003 - * @tc.name : testForEach003 - * @tc.desc : Traverse all key value pairs in the HashMap instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testForEach003", 0, function () { - let hashMap = new HashMap(); - try { - hashMap.forEach.bind({}, "a")(); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200011); - expect(err.message).assertEqual(`The forEach method cannot be bound`); - } - }); - - /** - * @tc.number: TEST_ENTRIES_001 - * @tc.name : testEntries001 - * @tc.desc : Get all key value pairs collection in HashMap. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEntries001", 0, function () { - let hashMap = new HashMap(); - hashMap.set(1, "A"); - hashMap.set(2, "B"); - hashMap.set(3, "C"); - hashMap.set(4, "D"); - hashMap.set(5, "E"); - let res = hashMap.entries(); - let arr = []; - for (let i = 0; i < hashMap.length; i++) { - let obj = res.next(); - arr.push([obj.value[0], obj.value[1]]); - } - arr.sort(function (a, b) { - return a[0] - b[0]; - }); - for (let i = 0; i < arr.length; i++) { - expect(arr[i][0]).assertEqual(i + 1); - expect(arr[i][1]).assertEqual(hashMap.get(i + 1)); - } - }); - - /** - * @tc.number: TEST_ENTRIES_002 - * @tc.name : testEntries002 - * @tc.desc : Get all key value pairs collection in HashMap. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEntries002", 0, function () { - let hashMap = new HashMap(); - let res = hashMap.entries(); - expect(undefined).assertEqual(res.next().value); - }); - - /** - * @tc.number: TEST_ITERATOR_001 - * @tc.name : testIterator001 - * @tc.desc : Iterate over all key value pairs in the HashMap. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIterator001", 0, function () { - let hashMap = new HashMap(); - hashMap.set(1, "A"); - hashMap.set(2, "B"); - hashMap.set(3, "C"); - hashMap.set(4, "D"); - hashMap.set(5, "E"); - let arr = []; - let iters = hashMap[Symbol.iterator](); - let flag = true; - for (let i = 0, len = hashMap.length; i < len; i++) { - let entry = iters.next().value; - let res = hashMap.get(entry[0]); - if (res != entry[1]) { - flag = false; - break; - } - } - expect(flag).assertEqual(true); - }); - }); -} diff --git a/commonlibrary/crossplatform/commonlibraryhashmapetstest/src/main/ets/test/List.test.ets b/commonlibrary/crossplatform/commonlibraryhashmapetstest/src/main/ets/test/List.test.ets deleted file mode 100644 index 88e9cef42..000000000 --- a/commonlibrary/crossplatform/commonlibraryhashmapetstest/src/main/ets/test/List.test.ets +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import HashMapTest from './HashMap.test' - -export default function testsuite() { - HashMapTest() -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryhashmapetstest/src/main/module.json b/commonlibrary/crossplatform/commonlibraryhashmapetstest/src/main/module.json deleted file mode 100644 index a4443e713..000000000 --- a/commonlibrary/crossplatform/commonlibraryhashmapetstest/src/main/module.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "module": { - "name": "entry_test", - "type": "feature", - "description": "$string:module_test_desc", - "mainElement": "TestAbility", - "deviceTypes": [ - "phone" - ], - "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", - "skills": [ - { - "actions": [ - "action.system.home" - ], - "entities": [ - "entity.system.home" - ] - } - ] - } - ] - } -} diff --git a/commonlibrary/crossplatform/commonlibraryhashmapetstest/src/main/resources/base/element/color.json b/commonlibrary/crossplatform/commonlibraryhashmapetstest/src/main/resources/base/element/color.json deleted file mode 100644 index 3c712962d..000000000 --- a/commonlibrary/crossplatform/commonlibraryhashmapetstest/src/main/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/commonlibrary/crossplatform/commonlibraryhashmapetstest/src/main/resources/base/element/string.json b/commonlibrary/crossplatform/commonlibraryhashmapetstest/src/main/resources/base/element/string.json deleted file mode 100644 index 65d8fa5a7..000000000 --- a/commonlibrary/crossplatform/commonlibraryhashmapetstest/src/main/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/commonlibrary/crossplatform/commonlibraryhashmapetstest/src/main/resources/base/media/icon.png b/commonlibrary/crossplatform/commonlibraryhashmapetstest/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!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Ib(L)f0FUfQt{EB39}mD4_W*{LB1in=B)Zk#5M zR&CulUb5lL=ag`=&z{4q92Dj9=uD=V` z)|pl|oZXgjW_tTc?U<%Sjz>7hqpN*9nn-*)b0CrzSiOE?1j+NI{dp8OUyLF?heDG! ze0!vIcZR%U$+0cff4>I5lq0+{?t?pDF^g2YwkO@|xRo>R_}SH>-ySI3vLIN|d}P7T zf_v)Q_y5rX%J-dHJGG$Xz(H2v^%F;CN*ytV#RK|8n=}*!YKU zUobACuP(>01ntZ+&oS8tFQ3bWVmz25*-Y-z0BT=I8T(Gu{`ZqM9~kraev%@9xUv7; zYItD$V&UeO%@-F?U;T;N8B%z { - 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. Data: %{public}s', - JSON.stringify(data) ?? ''); - }); - } - - 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/commonlibrary/crossplatform/commonlibraryhashsetetstest/src/main/ets/TestAbility/pages/Index.ets b/commonlibrary/crossplatform/commonlibraryhashsetetstest/src/main/ets/TestAbility/pages/Index.ets deleted file mode 100644 index e95640899..000000000 --- a/commonlibrary/crossplatform/commonlibraryhashsetetstest/src/main/ets/TestAbility/pages/Index.ets +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import hilog from '@ohos.hilog'; - -@Entry -@Component -struct Index { - aboutToAppear() { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility index aboutToAppear'); - } - @State message: string = 'Hello World' - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Button() { - Text('next page') - .fontSize(20) - .fontWeight(FontWeight.Bold) - }.type(ButtonType.Capsule) - .margin({ - top: 20 - }) - .backgroundColor('#0D9FFB') - .width('35%') - .height('5%') - .onClick(()=>{ - }) - } - .width('100%') - } - .height('100%') - } - } \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryhashsetetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/commonlibrary/crossplatform/commonlibraryhashsetetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts deleted file mode 100644 index 92a16d84e..000000000 --- a/commonlibrary/crossplatform/commonlibraryhashsetetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts +++ /dev/null @@ -1,49 +0,0 @@ -import hilog from '@ohos.hilog'; -import TestRunner from '@ohos.application.testRunner'; -import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; - -var abilityDelegator = undefined -var abilityDelegatorArguments = undefined - -async function onAbilityCreateCallback() { - hilog.info(0x0000, 'testTag', '%{public}s', 'onAbilityCreateCallback'); -} - -async function addAbilityMonitorCallback(err: any) { - 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() { - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun run'); - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var testAbilityName = abilityDelegatorArguments.bundleName + '.TestAbility' - let lMonitor = { - abilityName: testAbilityName, - onAbilityCreate: onAbilityCreateCallback, - }; - abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) - var cmd = 'aa start -d 0 -a TestAbility' + ' -b ' + abilityDelegatorArguments.bundleName - var debug = abilityDelegatorArguments.parameters['-D'] - if (debug == 'true') - { - cmd += ' -D' - } - hilog.info(0x0000, 'testTag', 'cmd : %{public}s', cmd); - abilityDelegator.executeShellCommand(cmd, - (err: any, d: any) => { - hilog.info(0x0000, 'testTag', 'executeShellCommand : err : %{public}s', JSON.stringify(err) ?? ''); - hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.stdResult ?? ''); - hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.exitCode ?? ''); - }) - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun end'); - } -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryhashsetetstest/src/main/ets/test/HashSet.test.ets b/commonlibrary/crossplatform/commonlibraryhashsetetstest/src/main/ets/test/HashSet.test.ets deleted file mode 100644 index d74f01147..000000000 --- a/commonlibrary/crossplatform/commonlibraryhashsetetstest/src/main/ets/test/HashSet.test.ets +++ /dev/null @@ -1,605 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import HashSet from "@ohos.util.HashSet"; -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; -export default function HashSetTest() { - describe("HashSetTest", function () { - /** - * @tc.number: TEST_CONSTRUCTOR_001 - * @tc.name : testConstructor001 - * @tc.desc : Create an HashSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testConstructor001", 0, function () { - let hashSet = new HashSet(); - expect(hashSet != null).assertTrue(); - }); - - /** - * @tc.number: TEST_LENGTH_001 - * @tc.name : testLength001 - * @tc.desc : Get the number of element in the HashSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 0 - */ - it("testLength001", 0, function () { - let hashSet = new HashSet(); - hashSet.add(1); - hashSet.add(2); - let res = hashSet.length; - expect(res).assertEqual(2); - }); - - /** - * @tc.number: TEST_IS_EMPTY_001 - * @tc.name : testIsEmpty001 - * @tc.desc : Determine whether the HashSet instance is empty. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsEmpty001", 0, function () { - let hashSet = new HashSet(); - hashSet.add(4); - hashSet.add(1); - let res = hashSet.isEmpty(); - expect(res).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_EMPTY_002 - * @tc.name : testIsEmpty002 - * @tc.desc : Determine whether the HashSet instance is empty. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsEmpty002", 0, function () { - let hashSet = new HashSet(); - hashSet.add(1); - hashSet.add(2); - hashSet.clear(); - let res = hashSet.isEmpty(); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_EMPTY_003 - * @tc.name : testIsEmpty003 - * @tc.desc : Determine whether the HashSet instance is empty. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsEmpty003", 0, function () { - let hashSet = new HashSet(); - try { - hashSet.isEmpty.bind({}, "a")(); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200011); - expect(err.message).assertEqual(`The isEmpty method cannot be bound`); - } - }); - - /** - * @tc.number: TEST_HAS_001 - * @tc.name : testHas001 - * @tc.desc : Determine whether the HashSet instance contains the specified element. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testHas001", 0, function () { - let hashSet = new HashSet(); - hashSet.add(4); - hashSet.add(1); - hashSet.add(3); - hashSet.add(2); - hashSet.add(5); - let res = hashSet.has(1); - expect(res).assertEqual(true); - let res1 = hashSet.has("A"); - expect(res1).assertEqual(false); - }); - - /** - * @tc.number: TEST_HAS_002 - * @tc.name : testHas002 - * @tc.desc : Determine whether the HashSet instance contains the specified element. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testHas002", 0, function () { - let hashSet = new HashSet(); - let res = hashSet.has(1); - expect(res).assertEqual(false); - }); - - /** - * @tc.number: TEST_HAS_003 - * @tc.name : testHas003 - * @tc.desc : Determine whether the HashSet instance contains the specified element. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testHas003", 0, function () { - let hashSet = new HashSet(); - try { - hashSet.has.bind({}, "a")(); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200011); - expect(err.message).assertEqual(`The has method cannot be bound`); - } - }); - - /** - * @tc.number: TEST_ADD_001 - * @tc.name : testAdd001 - * @tc.desc : Add element to HashSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd001", 0, function () { - let hashSet = new HashSet(); - hashSet.add(1); - let res = hashSet.has(1); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_ADD_002 - * @tc.name : testAdd002 - * @tc.desc : Add element to HashSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd002", 0, function () { - let hashSet = new HashSet(); - hashSet.add("b"); - hashSet.add("a"); - hashSet.add("g"); - let res = hashSet.has("a"); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_ADD_003 - * @tc.name : testAdd003 - * @tc.desc : Add element to HashSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd003", 0, function () { - let hashSet = new HashSet(); - let c = [1, 2, 3]; - hashSet.add(c); - let res = hashSet.has(c); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_ADD_004 - * @tc.name : testAdd004 - * @tc.desc : Add element to HashSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd004", 0, function () { - let hashSet = new HashSet(); - let c = { name: "lili", age: "13" }; - hashSet.add(c); - let res = hashSet.has(c); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_ADD_005 - * @tc.name : testAdd005 - * @tc.desc : Add element to HashSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd005", 0, function () { - let hashSet = new HashSet(); - hashSet.add(""); - let res = hashSet.has(""); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_ADD_006 - * @tc.name : testAdd006 - * @tc.desc : Add element to HashSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd006", 0, function () { - let hashSet = new HashSet(); - hashSet.add("$"); - let res = hashSet.has("$"); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_ADD_007 - * @tc.name : testAdd007 - * @tc.desc : Add element to HashSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd007", 0, function () { - let hashSet = new HashSet(); - hashSet.add(1.34); - let res = hashSet.has(1.34); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_ADD_008 - * @tc.name : testAdd008 - * @tc.desc : Add element to HashSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd008", 0, function () { - let hashSet = new HashSet(); - hashSet.add(-1); - let res = hashSet.has(-1); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_ADD_009 - * @tc.name : testAdd009 - * @tc.desc : Add element to HashSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd009", 0, function () { - let hashSet = new HashSet(); - let a = {}; - hashSet.add(a); - let res = hashSet.has(a); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_ADD_010 - * @tc.name : testAdd010 - * @tc.desc : Add element to HashSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd010", 0, function () { - let hashSet = new HashSet(); - for (let i = 0; i < 100; i++) { - hashSet.add(i); - let res = hashSet.has(i); - expect(res).assertEqual(true); - } - let res1 = hashSet.length; - expect(res1).assertEqual(100); - }); - - /** - * @tc.number: TEST_ADD_011 - * @tc.name : testAdd011 - * @tc.desc : Add element to HashSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd011", 0, function () { - let hashSet = new HashSet(); - hashSet.add(1); - hashSet.add(1); - let has = hashSet.has(1); - let size = hashSet.length; - expect(has).assertEqual(true); - expect(size).assertEqual(1); - }); - - /** - * @tc.number: TEST_ADD_012 - * @tc.name : testAdd012 - * @tc.desc : Add element to HashSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd012", 0, function () { - let hashSet = new HashSet(); - try { - hashSet.add.bind({}, "a")(); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200011); - expect(err.message).assertEqual(`The add method cannot be bound`); - } - }); - - /** - * @tc.number: TEST_REMOVE_001 - * @tc.name : testRemove001 - * @tc.desc : Delete the specified element. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testRemove001", 0, function () { - let hashSet = new HashSet(); - hashSet.add(4); - hashSet.add(1); - hashSet.add(3); - hashSet.add(2); - hashSet.add(5); - let res = hashSet.remove(1); - expect(res).assertEqual(true); - let arr = []; - hashSet.forEach((value, index) => { - arr.push(value); - }); - for (let i = 0; i < arr.length; i++) { - let has = hashSet.has(arr[i]); - expect(has).assertEqual(true); - } - }); - - /** - * @tc.number: TEST_REMOVE_002 - * @tc.name : testRemove002 - * @tc.desc : Delete the specified element. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testRemove002", 0, function () { - let hashSet = new HashSet(); - let res = hashSet.remove(1); - expect(res).assertEqual(false); - }); - - /** - * @tc.number: TEST_CLEAR_001 - * @tc.name : testClear001 - * @tc.desc : Clear all elements of the HashSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testClear001", 0, function () { - let hashSet = new HashSet(); - hashSet.add(4); - hashSet.add(1); - hashSet.add(3); - hashSet.add(2); - hashSet.add(5); - let res = hashSet.length; - expect(res).assertEqual(5); - hashSet.clear(); - let res1 = hashSet.length; - expect(res1).assertEqual(0); - }); - - /** - * @tc.number: TEST_CLEAR_002 - * @tc.name : testClear002 - * @tc.desc : Clear all elements of the HashSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testClear002", 0, function () { - let hashSet = new HashSet(); - let res = hashSet.clear(); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_FOR_EACH_001 - * @tc.name : testForEach001 - * @tc.desc : Traverse the collection of all elements of the HashSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testForEach001", 0, function () { - let hashSet = new HashSet(); - hashSet.add(1); - hashSet.add(2); - hashSet.add(3); - hashSet.add(4); - hashSet.add(5); - let arr = []; - hashSet.forEach((value, index) => { - arr.push(value); - }); - for (let i = 0; i < arr.length; i++) { - let has = hashSet.has(arr[i]); - expect(has).assertEqual(true); - } - }); - - /** - * @tc.number: TEST_FOR_EACH_002 - * @tc.name : testForEach002 - * @tc.desc : Traverse the collection of all elements of the HashSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testForEach002", 0, function () { - let hashSet = new HashSet(); - let arr = []; - hashSet.forEach((value, index) => { - arr.push(value); - }); - expect(arr.length).assertEqual(0); - }); - - /** - * @tc.number: TEST_FOR_EACH_003 - * @tc.name : testForEach003 - * @tc.desc : Traverse the collection of all elements of the HashSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testForEach003", 0, function () { - let hashSet = new HashSet(); - for (let i = 0; i < 100; i++) { - hashSet.add(i); - } - let arr = []; - hashSet.forEach((value, index) => { - arr.push(value); - }); - for (let i = 0; i < 100; i++) { - let a = arr[i]; - let res = hashSet.has(a); - expect(res).assertEqual(true); - } - }); - - /** - * @tc.number: TEST_FOR_EACH_004 - * @tc.name : testForEach004 - * @tc.desc : Traverse the collection of all elements of the HashSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testForEach004", 0, function () { - let hashSet = new HashSet(); - try { - hashSet.forEach.bind({}, "a")(); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200011); - expect(err.message).assertEqual(`The forEach method cannot be bound`); - } - }); - - /** - * @tc.number: TEST_VALUES_001 - * @tc.name : testValues001 - * @tc.desc : Get a collection of all elements of a HashSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testValues001", 0, function () { - let hashSet = new HashSet(); - hashSet.add("A"); - hashSet.add("B"); - hashSet.add("C"); - hashSet.add("D"); - hashSet.add("E"); - let res = hashSet.values(); - for (let i = 0; i < hashSet.length; i++) { - let has = hashSet.has(res.next().value); - expect(has).assertEqual(true); - } - }); - - /** - * @tc.number: TEST_ENTRIES_001 - * @tc.name : testEntries001 - * @tc.desc : Iterate over all elements of the HashSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEntries001", 0, function () { - let hashSet = new HashSet(); - hashSet.add(1); - hashSet.add(2); - hashSet.add(3); - hashSet.add(4); - hashSet.add(5); - let res = hashSet.entries(); - for (let i = 0; i < hashSet.length; i++) { - let has = hashSet.has(res.next().value[1]); - expect(has).assertEqual(true); - } - }); - - /** - * @tc.number: TEST_ENTRIES_002 - * @tc.name : testEntries002 - * @tc.desc : Iterate over all elements of the HashSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEntries002", 0, function () { - let hashSet = new HashSet(); - let res = hashSet.entries(); - expect(res.next().value).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_ITERATOR_001 - * @tc.name : testIterator001 - * @tc.desc : Iterate over all elements of the HashSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIterator001", 0, function () { - let hashSet = new HashSet(); - hashSet.add(1); - hashSet.add(2); - hashSet.add(3); - hashSet.add(4); - hashSet.add(5); - let res = hashSet[Symbol.iterator](); - let temp = undefined; - let arr = []; - do { - temp = res.next().value; - arr.push(temp); - } while (temp != undefined); - arr.sort(function (a, b) { - return a - b; - }); - let arr1 = [1, 2, 3, 4, 5]; - for (let i = 0; i < arr.length; i++) { - expect(arr[i]).assertEqual(arr1[i]); - } - }); - }); -} diff --git a/commonlibrary/crossplatform/commonlibraryhashsetetstest/src/main/ets/test/List.test.ets b/commonlibrary/crossplatform/commonlibraryhashsetetstest/src/main/ets/test/List.test.ets deleted file mode 100644 index aa6b91ae9..000000000 --- a/commonlibrary/crossplatform/commonlibraryhashsetetstest/src/main/ets/test/List.test.ets +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import HashSetTest from './HashSet.test' - -export default function testsuite() { - HashSetTest() -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryhashsetetstest/src/main/module.json b/commonlibrary/crossplatform/commonlibraryhashsetetstest/src/main/module.json deleted file mode 100644 index a4443e713..000000000 --- a/commonlibrary/crossplatform/commonlibraryhashsetetstest/src/main/module.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "module": { - "name": "entry_test", - "type": "feature", - "description": "$string:module_test_desc", - "mainElement": "TestAbility", - "deviceTypes": [ - "phone" - ], - "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", - "skills": [ - { - "actions": [ - "action.system.home" - ], - "entities": [ - "entity.system.home" - ] - } - ] - } - ] - } -} diff --git a/commonlibrary/crossplatform/commonlibraryhashsetetstest/src/main/resources/base/element/color.json b/commonlibrary/crossplatform/commonlibraryhashsetetstest/src/main/resources/base/element/color.json deleted file mode 100644 index 3c712962d..000000000 --- a/commonlibrary/crossplatform/commonlibraryhashsetetstest/src/main/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/commonlibrary/crossplatform/commonlibraryhashsetetstest/src/main/resources/base/element/string.json b/commonlibrary/crossplatform/commonlibraryhashsetetstest/src/main/resources/base/element/string.json deleted file mode 100644 index 65d8fa5a7..000000000 --- a/commonlibrary/crossplatform/commonlibraryhashsetetstest/src/main/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/commonlibrary/crossplatform/commonlibraryhashsetetstest/src/main/resources/base/media/icon.png b/commonlibrary/crossplatform/commonlibraryhashsetetstest/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6BLrPFWk?s;$LOP{GmJpBl$qoSA!PUg~PA65-S00{{S`XKG6NkG0RgjEntPrmV+?0|00mu7;+5 zrdpa{2QLqPJ4Y{j7=Mrl{BaxrkdY69+c~(w{Fv-v&aR%aEI&JYSeRTLWm!zbv;?)_ ziZB;fwGbbeL5Q}YLx`J$lp~A09KK8t_z}PZ=4ZzgdeKtgoc+o5EvN9A1K1_<>M?MBqb#!ASf&# zEX?<)!RH(7>1P+j=jqG(58}TVN-$psA6K}atCuI!KTJD&FMmH-78ZejBm)0qc{ESp z|LuG1{QnBUJRg_E=h1#XMWt2%fcoN@l7eAS!Es?Q+;XsRNPhiiE=@AqlLkJzF`O18 zbsbSmKN=aaq8k3NFYZfDWpKmM!coBU0(XnL8R{4=i|wi{!uWYM2je{U{B*K2PVdu&=E zTq*-XsEsJ$u5H4g6DIm2Y!DN`>^v|AqlwuCD;w45K0@eqauiqWf7l&o)+YLHm~|L~ z7$0v5mkobriU!H<@mVJHLlmQqzQ3d6Rh_-|%Yy2li*tHO>_vcnuZ7OR_xkAIuIU&x z-|8Y0wj|6|a6_I(v91y%k_kNw6pnkNdxjqG8!%Vz_d%c_!X+6-;1`GC9_FpjoHev5fEV7RhJ>r=mh-jp$fqbqRJ=obwdgLDVP5+s zy1=_DWG0Y-Jb3t^WXmkr(d9~08k-|#Ly zaNOmT(^9tIb&eb4%CzIT zAm3CUtWSr1t4?h1kk#NBi{U|pJslvME{q|_eS^3En>SOqSxyuN1x;Is@8~m?*>}** znrRFArP!K_52RpX*&JHMR<^lVdm8ypJ}0R(SD(51j;6@ni$6bQ+2XL+R^|NnSp5}(kzvMZ^(@4fD_{QVu$(&K6H|C37TG1Am9Re{<<3gd zh@`>;BqkX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A=WR)^y@=wk=FK>>z%c?ZEZt_cDY_%^{IZ?wwER654LW- zT|46Tq;bo`UHMbS;1P#$Vd)_KciRx~9LVH}lFbt*6^OXUKqd*&`Y|cDENjb~qh7d} zVrf6MzF_bAYIf+y1FI+UrU17Pu+?k<^zjXL=gf7@XRG$F+EdUrc*V&f2g^FgzPxCv zGEvjIWwdP5nIp7#g5OcVY!HHpZ%%xLp4&cQkahU>71vu{1Ey!=+J8sUi=pj}%^RDyz?Z{;d?FZ*zN?N^uJrwYUu@-|=lgju55vor0--B%0pK03Qb^816O+ZTqamL6O9 zi_qT2wgZ2*g3A4$t(#m@{&vS(?`_E2*m`a0(yVKz){kF$^Tm1lr;WRL`FQurTQd7L z7a#_R(?dD(e{k%f;x^!f5&2R8DFnfDzf>*x4RiIy-`yzQCj?9A~5*gNiGx{fKE6*rMqEyeA(p17o;y0PZ_e{l@I<}WNZJ!e+-9T xaAdBYwQ^Q~3u&GE`HZ8(w2R~Ryp_p?&0pQ{ulf2PN1EQ>Km5}f2Tpgy{s;d{U{(MC diff --git a/commonlibrary/crossplatform/commonlibraryplainarrayetstest/src/main/ets/TestAbility/TestAbility.ets b/commonlibrary/crossplatform/commonlibraryplainarrayetstest/src/main/ets/TestAbility/TestAbility.ets deleted file mode 100644 index 368aef919..000000000 --- a/commonlibrary/crossplatform/commonlibraryplainarrayetstest/src/main/ets/TestAbility/TestAbility.ets +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import UIAbility from '@ohos.app.ability.UIAbility'; -import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; -import hilog from '@ohos.hilog'; -import { Hypium } from '@ohos/hypium'; -import testsuite from '../test/List.test'; -import window from '@ohos.window'; - -export default class TestAbility extends UIAbility { - onCreate(want, 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) ?? ''); - var abilityDelegator: any - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var abilityDelegatorArguments: any - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - hilog.info(0x0000, 'testTag', '%{public}s', 'start run testcase!!!'); - Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) - } - - onDestroy() { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onDestroy'); - } - - onWindowStageCreate(windowStage: window.WindowStage) { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageCreate'); - windowStage.loadContent('TestAbility/pages/Index', (err, data) => { - 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. Data: %{public}s', - JSON.stringify(data) ?? ''); - }); - } - - 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/commonlibrary/crossplatform/commonlibraryplainarrayetstest/src/main/ets/TestAbility/pages/Index.ets b/commonlibrary/crossplatform/commonlibraryplainarrayetstest/src/main/ets/TestAbility/pages/Index.ets deleted file mode 100644 index e95640899..000000000 --- a/commonlibrary/crossplatform/commonlibraryplainarrayetstest/src/main/ets/TestAbility/pages/Index.ets +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import hilog from '@ohos.hilog'; - -@Entry -@Component -struct Index { - aboutToAppear() { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility index aboutToAppear'); - } - @State message: string = 'Hello World' - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Button() { - Text('next page') - .fontSize(20) - .fontWeight(FontWeight.Bold) - }.type(ButtonType.Capsule) - .margin({ - top: 20 - }) - .backgroundColor('#0D9FFB') - .width('35%') - .height('5%') - .onClick(()=>{ - }) - } - .width('100%') - } - .height('100%') - } - } \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryplainarrayetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/commonlibrary/crossplatform/commonlibraryplainarrayetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts deleted file mode 100644 index 92a16d84e..000000000 --- a/commonlibrary/crossplatform/commonlibraryplainarrayetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts +++ /dev/null @@ -1,49 +0,0 @@ -import hilog from '@ohos.hilog'; -import TestRunner from '@ohos.application.testRunner'; -import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; - -var abilityDelegator = undefined -var abilityDelegatorArguments = undefined - -async function onAbilityCreateCallback() { - hilog.info(0x0000, 'testTag', '%{public}s', 'onAbilityCreateCallback'); -} - -async function addAbilityMonitorCallback(err: any) { - 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() { - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun run'); - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var testAbilityName = abilityDelegatorArguments.bundleName + '.TestAbility' - let lMonitor = { - abilityName: testAbilityName, - onAbilityCreate: onAbilityCreateCallback, - }; - abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) - var cmd = 'aa start -d 0 -a TestAbility' + ' -b ' + abilityDelegatorArguments.bundleName - var debug = abilityDelegatorArguments.parameters['-D'] - if (debug == 'true') - { - cmd += ' -D' - } - hilog.info(0x0000, 'testTag', 'cmd : %{public}s', cmd); - abilityDelegator.executeShellCommand(cmd, - (err: any, d: any) => { - hilog.info(0x0000, 'testTag', 'executeShellCommand : err : %{public}s', JSON.stringify(err) ?? ''); - hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.stdResult ?? ''); - hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.exitCode ?? ''); - }) - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun end'); - } -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryplainarrayetstest/src/main/ets/test/List.test.ets b/commonlibrary/crossplatform/commonlibraryplainarrayetstest/src/main/ets/test/List.test.ets deleted file mode 100644 index 5809430e5..000000000 --- a/commonlibrary/crossplatform/commonlibraryplainarrayetstest/src/main/ets/test/List.test.ets +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import PlainArrayTest from './PlainArray.test' - -export default function testsuite() { - PlainArrayTest() -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryplainarrayetstest/src/main/ets/test/PlainArray.test.ets b/commonlibrary/crossplatform/commonlibraryplainarrayetstest/src/main/ets/test/PlainArray.test.ets deleted file mode 100644 index 9390ac04f..000000000 --- a/commonlibrary/crossplatform/commonlibraryplainarrayetstest/src/main/ets/test/PlainArray.test.ets +++ /dev/null @@ -1,790 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import PlainArray from "@ohos.util.PlainArray"; -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; -export default function PlainArrayTest() { - describe("PlainArrayTest", function () { - /** - * @tc.number: TEST_CONSTRUCTOR_001 - * @tc.name : testConstructor001 - * @tc.desc : Create an PlainArray instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testConstructor001", 0, function () { - let plainArray = new PlainArray(); - expect(plainArray != null).assertTrue(); - }); - - /** - * @tc.number: TEST_LENGTH_001 - * @tc.name : testLength001 - * @tc.desc : Get the number of key value pairs in the PlainArray instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 0 - */ - it("testLength001", 0, function () { - let plainArray = new PlainArray(); - let res = plainArray.length; - expect(res).assertEqual(0); - plainArray.add(1, "A"); - plainArray.add(2, "B"); - plainArray.add(3, "C"); - plainArray.add(4, "D"); - plainArray.add(5, "E"); - res = plainArray.length; - expect(res).assertEqual(5); - }); - - /** - * @tc.number: TEST_ADD_001 - * @tc.name : testAdd001 - * @tc.desc : Add a pair of key value pairs to the PlainArray. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd001", 0, function () { - let plainArray = new PlainArray(); - plainArray.add(1, "A"); - let res = plainArray.get(1); - expect(res).assertEqual("A"); - }); - - /** - * @tc.number: TEST_ADD_002 - * @tc.name : testAdd002 - * @tc.desc : Add a pair of key value pairs to the PlainArray. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd002", 0, function () { - let plainArray = new PlainArray(); - let a = [1, 2, 3, 4]; - plainArray.add(2, a); - let res = plainArray.get(2); - expect(res).assertEqual(a); - }); - - /** - * @tc.number: TEST_ADD_003 - * @tc.name : testAdd003 - * @tc.desc : Add a pair of key value pairs to the PlainArray. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd003", 0, function () { - let plainArray = new PlainArray(); - let c = { name: "lili", age: "13" }; - plainArray.add(1, c); - let res = plainArray.get(1); - expect(res).assertEqual(c); - }); - - /** - * @tc.number: TEST_ADD_004 - * @tc.name : testAdd004 - * @tc.desc : Add a pair of key value pairs to the PlainArray. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd004", 0, function () { - let plainArray = new PlainArray(); - let c = false; - plainArray.add(1, c); - let res = plainArray.get(1); - expect(res).assertEqual(false); - }); - - /** - * @tc.number: TEST_ADD_005 - * @tc.name : testAdd005 - * @tc.desc : Add a pair of key value pairs to the PlainArray. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd005", 0, function () { - let plainArray = new PlainArray(); - plainArray.add(1, 3); - let res = plainArray.get(1); - expect(res).assertEqual(3); - }); - - /** - * @tc.number: TEST_ADD_006 - * @tc.name : testAdd006 - * @tc.desc : Add a pair of key value pairs to the PlainArray. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd006", 0, function () { - let plainArray = new PlainArray(); - plainArray.add(1, 3.1); - let res = plainArray.get(1); - expect(res).assertEqual(3.1); - }); - - /** - * @tc.number: TEST_ADD_007 - * @tc.name : testAdd007 - * @tc.desc : Add a pair of key value pairs to the PlainArray. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd007", 0, function () { - let plainArray = new PlainArray(); - plainArray.add(1, null); - let res = plainArray.get(1); - expect(res).assertEqual(null); - }); - - /** - * @tc.number: TEST_ADD_008 - * @tc.name : testAdd008 - * @tc.desc : Add a pair of key value pairs to the PlainArray. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd008", 0, function () { - let plainArray = new PlainArray(); - for (let i = 0; i < 100; i++) { - plainArray.add(i, i + 1); - } - let res = plainArray.get(1); - let res1 = plainArray.length; - expect(res).assertEqual(2); - expect(res1).assertEqual(100); - }); - - /** - * @tc.number: TEST_ADD_009 - * @tc.name : testAdd009 - * @tc.desc : Add a pair of key value pairs to the PlainArray. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd009", 0, function () { - let plainArray = new PlainArray(); - for (let i = 0; i < 1000; i++) { - plainArray.add(i, i + 1); - } - let res = plainArray.get(99); - let res1 = plainArray.length; - expect(res).assertEqual(100); - expect(res1).assertEqual(1000); - }); - - /** - * @tc.number: TEST_ADD_010 - * @tc.name : testAdd010 - * @tc.desc : Add a pair of key value pairs to the PlainArray. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd010", 0, function () { - let plainArray = new PlainArray(); - plainArray.add(3, "a"); - plainArray.add(1, "b"); - plainArray.add(2, "c"); - plainArray.add(5, "d"); - plainArray.add(4, "e"); - let res = plainArray.get(2); - expect(res).assertEqual("c"); - }); - - /** - * @tc.number: TEST_ADD_011 - * @tc.name : testAdd011 - * @tc.desc : Add a pair of key value pairs to the PlainArray. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd011", 0, function () { - let plainArray = new PlainArray(); - plainArray.add(1, "ABCd"); - plainArray.add(2, "~!@#$^&*()_+-*/=.?<>:;|{}[]"); - plainArray.add(3, null); - plainArray.add(4, undefined); - plainArray.add(5, []); - plainArray.add(6, {}); - plainArray.add(7, true); - plainArray.add(8, 1234); - plainArray.add(9, 1.234); - plainArray.add(10, -1234); - let res = plainArray.get(2); - expect(res).assertEqual("~!@#$^&*()_+-*/=.?<>:;|{}[]"); - }); - - /** - * @tc.number: TEST_ADD_012 - * @tc.name : testAdd012 - * @tc.desc : Add a pair of key value pairs to the PlainArray. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd012", 0, function () { - let plainArray = new PlainArray(); - plainArray.add(1, 1); - plainArray.add(2, "b"); - plainArray.add(3, true); - plainArray.add(4, [1, 2, 3, 4]); - plainArray.add(5, { name: "lili", age: "13" }); - plainArray.add(6, undefined); - plainArray.add(7, null); - let res = plainArray.get(2); - expect(res).assertEqual("b"); - }); - - /** - * @tc.number: TEST_CLEAR_001 - * @tc.name : testClear001 - * @tc.desc : Clear all key value pairs in PlainArray. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testClear001", 0, function () { - let plainArray = new PlainArray(); - plainArray.add(1, "A"); - plainArray.add(2, "B"); - plainArray.add(3, "C"); - plainArray.add(4, "D"); - plainArray.add(5, "E"); - let res = plainArray.length; - expect(res).assertEqual(5); - plainArray.clear(); - let res1 = plainArray.length; - expect(res1).assertEqual(0); - plainArray.clear(); - let res2 = plainArray.length; - expect(res2).assertEqual(0); - }); - - /** - * @tc.number: TEST_CLONE_001 - * @tc.name : testClone001 - * @tc.desc : Clone an PlainArray instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testClone001", 0, function () { - let plainArray = new PlainArray(); - let clonePlainarray = plainArray.clone(); - let cloneLength = clonePlainarray.length; - expect(cloneLength).assertEqual(0); - plainArray.add(1, "A"); - plainArray.add(2, "B"); - plainArray.add(3, "C"); - plainArray.add(4, "D"); - plainArray.add(5, "E"); - let res = plainArray.clone(); - let arr = []; - res.forEach((value, index) => { - arr.push(value); - }); - let arr1 = ["A", "B", "C", "D", "E"]; - for (let i = 0; i < arr.length; i++) { - expect(arr[i]).assertEqual(arr1[i]); - } - }); - - /** - * @tc.number: TEST_HAS_001 - * @tc.name : testHas001 - * @tc.desc : Check whether the PlainArray contains a specified element. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testHas001", 0, function () { - let plainArray = new PlainArray(); - plainArray.add(1, "A"); - plainArray.add(2, "B"); - plainArray.add(3, "C"); - plainArray.add(4, "D"); - plainArray.add(5, "E"); - let res = plainArray.has(6); - expect(res).assertEqual(false); - let res1 = plainArray.has(1); - expect(res1).assertEqual(true); - }); - - /** - * @tc.number: TEST_GET_001 - * @tc.name : testGet001 - * @tc.desc : Get the corresponding value through the key. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGet001", 0, function () { - let plainArray = new PlainArray(); - plainArray.add(1, "A"); - plainArray.add(2, "B"); - plainArray.add(3, "C"); - plainArray.add(4, "D"); - plainArray.add(5, "E"); - let res = plainArray.get(4); - expect(res).assertEqual("D"); - res = plainArray.get(10); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_GET_002 - * @tc.name : testGet002 - * @tc.desc : Get the corresponding value through the key. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGet002", 0, function () { - let plainArray = new PlainArray(); - plainArray.add(1, "A"); - plainArray.add(2, "B"); - plainArray.add(3, "C"); - plainArray.add(4, "D"); - plainArray.add(5, "E"); - let res = plainArray.get(8); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_GET_INDEX_OF_KEY_001 - * @tc.name : testGetIndexOfKey001 - * @tc.desc : Find the index of the key value pair according to the corresponding key. - * If no key is specified, return -1. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetIndexOfKey001", 0, function () { - let plainArray = new PlainArray(); - plainArray.add(1, "A"); - plainArray.add(2, "B"); - plainArray.add(3, "C"); - plainArray.add(4, "D"); - plainArray.add(5, "E"); - let res = plainArray.getIndexOfKey(2); - expect(res).assertEqual(1); - res = plainArray.getIndexOfKey(12); - expect(res).assertEqual(-1); - }); - - /** - * @tc.number: TEST_GET_INDEX_OF_KEY_002 - * @tc.name : testGetIndexOfKey002 - * @tc.desc : Find the index of the key value pair according to the corresponding key. - * If no key is specified, return -1. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetIndexOfKey002", 0, function () { - let plainArray = new PlainArray(); - plainArray.add(1, "A"); - plainArray.add(2, "B"); - plainArray.add(3, "C"); - plainArray.add(4, "D"); - plainArray.add(5, "E"); - let res = plainArray.getIndexOfKey(9); - expect(res).assertEqual(-1); - }); - - /** - * @tc.number: TEST_GET_INDEX_OF_VALUE_001 - * @tc.name : testGetIndexOfValue001 - * @tc.desc : Find the index of the key value pair according to the corresponding key. - * If no key is specified, return -1. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetIndexOfValue001", 0, function () { - let plainArray = new PlainArray(); - plainArray.add(1, "A"); - plainArray.add(2, "B"); - plainArray.add(3, "C"); - plainArray.add(4, "D"); - plainArray.add(5, "E"); - let res = plainArray.getIndexOfValue("A"); - expect(res).assertEqual(0); - res = plainArray.getIndexOfValue("Z"); - expect(res).assertEqual(-1); - }); - - /** - * @tc.number: TEST_GET_INDEX_OF_VALUE_002 - * @tc.name : testGetIndexOfValue002 - * @tc.desc : Find the index of the key value pair according to the corresponding key. - * If no key is specified, return -1. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetIndexOfValue002", 0, function () { - let plainArray = new PlainArray(); - plainArray.add(1, "A"); - plainArray.add(2, "B"); - plainArray.add(3, "C"); - plainArray.add(4, "D"); - plainArray.add(5, "E"); - let res = plainArray.getIndexOfValue("Asad"); - expect(res).assertEqual(-1); - }); - - /** - * @tc.number: TEST_IS_EMPTY_001 - * @tc.name : testIsEmpty001 - * @tc.desc : Determine whether the PlainArray instance is empty. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsEmpty001", 0, function () { - let plainArray = new PlainArray(); - let result = plainArray.length; - expect(result).assertEqual(0); - plainArray.add(1, "A"); - plainArray.add(2, "B"); - plainArray.add(3, "C"); - plainArray.add(4, "D"); - plainArray.add(5, "E"); - let res = plainArray.isEmpty(); - expect(res).assertEqual(false); - }); - - /** - * @tc.number: TEST_GET_KEY_AT_001 - * @tc.name : testGetKeyAt001 - * @tc.desc : Find the key of the key value pair according to the corresponding index. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetKeyAt001", 0, function () { - let plainArray = new PlainArray(); - plainArray.add(1, "A"); - plainArray.add(2, "B"); - plainArray.add(3, "C"); - plainArray.add(4, "D"); - plainArray.add(5, "E"); - let res = plainArray.getKeyAt(2); - expect(res).assertEqual(3); - }); - - /** - * @tc.number: TEST_GET_KEY_AT_002 - * @tc.name : testGetKeyAt002 - * @tc.desc : Find the key of the key value pair according to the corresponding index. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetKeyAt002", 0, function () { - let plainArray = new PlainArray(); - plainArray.add(1, "A"); - plainArray.add(2, "B"); - plainArray.add(3, "C"); - plainArray.add(4, "D"); - plainArray.add(5, "E"); - let res = plainArray.getKeyAt(50); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_REMOVE_001 - * @tc.name : testRemove001 - * @tc.desc : Delete key value pairs according to key. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testRemove001", 0, function () { - let plainArray = new PlainArray(); - plainArray.add(1, "A"); - plainArray.add(2, "B"); - plainArray.add(3, "C"); - plainArray.add(4, "D"); - plainArray.add(5, "E"); - let res = plainArray.remove(2); - expect(res).assertEqual("B"); - let value = plainArray.get(2); - expect(value).assertEqual(undefined); - res = plainArray.remove(12); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_REMOVE_002 - * @tc.name : testRemove002 - * @tc.desc : Delete key value pairs according to key. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testRemove002", 0, function () { - let plainArray = new PlainArray(); - let res = plainArray.remove(2); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_REMOVE_AT_001 - * @tc.name : testReMoveAt001 - * @tc.desc : Delete key value pairs according to index. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testRemoveAt001", 0, function () { - let plainArray = new PlainArray(); - plainArray.add(1, "A"); - plainArray.add(2, "B"); - plainArray.add(3, "C"); - plainArray.add(4, "D"); - plainArray.add(5, "E"); - let res = plainArray.removeAt(2); - expect(res).assertEqual("C"); - let value = plainArray.get(3); - expect(value).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_REMOVE_AT_002 - * @tc.name : testReMoveAt002 - * @tc.desc : Delete key value pairs according to index. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testRemoveAt002", 0, function () { - let plainArray = new PlainArray(); - plainArray.add(1, "A"); - plainArray.add(2, "B"); - plainArray.add(3, "C"); - plainArray.add(4, "D"); - plainArray.add(5, "E"); - let res = plainArray.removeAt(12); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_REMOVE_RANGE_FROM_001 - * @tc.name : testRemoveRangeFrom001 - * @tc.desc : Deletes the specified number of elements from the specified starting index. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testRemoveRangeFrom001", 0, function () { - let plainArray = new PlainArray(); - plainArray.add(1, "A"); - plainArray.add(2, "B"); - plainArray.add(3, "C"); - plainArray.add(4, "D"); - plainArray.add(5, "E"); - plainArray.removeRangeFrom(0, 5); - let res = plainArray.length; - expect(res).assertEqual(0); - }); - - /** - * @tc.number: TEST_SET_VALUE_AT_001 - * @tc.name : testSetValueAt001 - * @tc.desc : Modify the value of the key value pair according to the corresponding index. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSetValueAt001", 0, function () { - let plainArray = new PlainArray(); - plainArray.add(1, "A"); - plainArray.add(2, "B"); - plainArray.add(3, "C"); - plainArray.add(4, "D"); - plainArray.add(5, "E"); - plainArray.setValueAt(2, "V"); - let keys = [1, 2, 3, 4, 5]; - let values = ["A", "B", "V", "D", "E"]; - for (let i = 0; i < keys.length; i++) { - expect(values[i]).assertEqual(plainArray.get(keys[i])); - } - try { - plainArray.setValueAt(-1, "X"); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200001); - expect(err.message).assertEqual(`The value of "index" is out of range. It must be >= 0 && <= 4. Received value is: -1`); - } - }); - - /** - * @tc.number: TEST_SET_VALUE_AT_002 - * @tc.name : testSetValueAt002 - * @tc.desc : Modify the value of the key value pair according to the corresponding index. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSetValueAt002", 0, function () { - let plainArray = new PlainArray(); - plainArray.add(1, "A"); - plainArray.add(2, "B"); - plainArray.add(3, "C"); - plainArray.add(4, "D"); - plainArray.add(5, "E"); - try { - plainArray.setValueAt(8, "V"); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200001); - expect(err.message).assertEqual(`The value of "index" is out of range. It must be >= 0 && <= 4. Received value is: 8`); - } - }); - - /** - * @tc.number: TEST_TO_STRING_001 - * @tc.name : testToString001 - * @tc.desc : Use "," to splice the elements in the LightWeightMap instance into a string. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testToString001", 0, function () { - let plainArray = new PlainArray(); - let res1 = plainArray.toString(); - expect(res1).assertEqual(""); - plainArray.add(1, "A"); - plainArray.add(2, "B"); - plainArray.add(3, "C"); - let res = plainArray.toString(); - expect(res).assertEqual("1:A,2:B,3:C"); - }); - - /** - * @tc.number: TEST_GET_VALUE_001 - * @tc.name : testGetValueAt001 - * @tc.desc : Get the value of the key value pair according to the corresponding index. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetValueAt001", 0, function () { - let plainArray = new PlainArray(); - plainArray.add(1, "A"); - plainArray.add(2, "B"); - plainArray.add(3, "C"); - plainArray.add(4, "D"); - plainArray.add(5, "E"); - let res = plainArray.getValueAt(2); - expect(res).assertEqual("C"); - }); - - /** - * @tc.number: TEST_GET_VALUE_002 - * @tc.name : testGetValueAt002 - * @tc.desc : Get the value of the key value pair according to the corresponding index. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetValueAt002", 0, function () { - let plainArray = new PlainArray(); - plainArray.add(1, "A"); - plainArray.add(2, "B"); - plainArray.add(3, "C"); - plainArray.add(4, "D"); - plainArray.add(5, "E"); - try { - plainArray.getValueAt(50); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200001); - expect(err.message).assertEqual(`The value of "index" is out of range. It must be >= 0 && <= 4. Received value is: 50`); - } - }); - - /** - * @tc.number: TEST_FOR_EACH_001 - * @tc.name : testForEach001 - * @tc.desc : Traverse all key value pairs in the PlainArray instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testForEach001", 0, function () { - let plainArray = new PlainArray(); - plainArray.add(1, "A"); - plainArray.add(2, "B"); - plainArray.add(3, "C"); - plainArray.add(4, "D"); - plainArray.add(5, "E"); - let arr = []; - plainArray.forEach((value, index) => { - arr.push(value); - }); - let arr1 = ["A", "B", "C", "D", "E"]; - for (let i = 0; i < arr1.length; i++) { - expect(arr[i]).assertEqual(arr1[i]); - } - }); - - /** - * @tc.number: TEST_ITERATOR_001 - * @tc.name : testIterator001 - * @tc.desc : Iterate over all key value pairs in the PlainArray. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIterator001", 0, function () { - let plainArray = new PlainArray(); - plainArray.add(1, "A"); - plainArray.add(2, "B"); - plainArray.add(3, "C"); - plainArray.add(4, "D"); - plainArray.add(5, "E"); - let iters = plainArray[Symbol.iterator](); - let flag = true; - for (let i = 0, len = plainArray.length; i < len; i++) { - let entry = iters.next().value; - let res = plainArray.get(entry[0]); - if (res != entry[1]) { - flag = false; - break; - } - } - expect(flag).assertEqual(true); - }); - }); -} diff --git a/commonlibrary/crossplatform/commonlibraryplainarrayetstest/src/main/module.json b/commonlibrary/crossplatform/commonlibraryplainarrayetstest/src/main/module.json deleted file mode 100644 index a4443e713..000000000 --- a/commonlibrary/crossplatform/commonlibraryplainarrayetstest/src/main/module.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "module": { - "name": "entry_test", - "type": "feature", - "description": "$string:module_test_desc", - "mainElement": "TestAbility", - "deviceTypes": [ - "phone" - ], - "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", - "skills": [ - { - "actions": [ - "action.system.home" - ], - "entities": [ - "entity.system.home" - ] - } - ] - } - ] - } -} diff --git a/commonlibrary/crossplatform/commonlibraryplainarrayetstest/src/main/resources/base/element/color.json b/commonlibrary/crossplatform/commonlibraryplainarrayetstest/src/main/resources/base/element/color.json deleted file mode 100644 index 3c712962d..000000000 --- a/commonlibrary/crossplatform/commonlibraryplainarrayetstest/src/main/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/commonlibrary/crossplatform/commonlibraryplainarrayetstest/src/main/resources/base/element/string.json b/commonlibrary/crossplatform/commonlibraryplainarrayetstest/src/main/resources/base/element/string.json deleted file mode 100644 index 65d8fa5a7..000000000 --- a/commonlibrary/crossplatform/commonlibraryplainarrayetstest/src/main/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/commonlibrary/crossplatform/commonlibraryplainarrayetstest/src/main/resources/base/media/icon.png b/commonlibrary/crossplatform/commonlibraryplainarrayetstest/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6BLrPFWk?s;$LOP{GmJpBl$qoSA!PUg~PA65-S00{{S`XKG6NkG0RgjEntPrmV+?0|00mu7;+5 zrdpa{2QLqPJ4Y{j7=Mrl{BaxrkdY69+c~(w{Fv-v&aR%aEI&JYSeRTLWm!zbv;?)_ ziZB;fwGbbeL5Q}YLx`J$lp~A09KK8t_z}PZ=4ZzgdeKtgoc+o5EvN9A1K1_<>M?MBqb#!ASf&# zEX?<)!RH(7>1P+j=jqG(58}TVN-$psA6K}atCuI!KTJD&FMmH-78ZejBm)0qc{ESp z|LuG1{QnBUJRg_E=h1#XMWt2%fcoN@l7eAS!Es?Q+;XsRNPhiiE=@AqlLkJzF`O18 zbsbSmKN=aaq8k3NFYZfDWpKmM!coBU0(XnL8R{4=i|wi{!uWYM2je{U{B*K2PVdu&=E zTq*-XsEsJ$u5H4g6DIm2Y!DN`>^v|AqlwuCD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q`o-M8Fp7cQ~ z+H-d1)f#s1T`=VSNiLQe0VUJF;3a~Buv-!b{$U!2_5x$KDbIPK9@NM2krr)S!l{{jWnUVs1q diff --git a/commonlibrary/crossplatform/commonlibraryprocessetstest/src/main/ets/TestAbility/TestAbility.ets b/commonlibrary/crossplatform/commonlibraryprocessetstest/src/main/ets/TestAbility/TestAbility.ets deleted file mode 100755 index a535e83f7..000000000 --- a/commonlibrary/crossplatform/commonlibraryprocessetstest/src/main/ets/TestAbility/TestAbility.ets +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import UIAbility from '@ohos.app.ability.UIAbility'; -import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; -import hilog from '@ohos.hilog'; -import { Hypium } from '@ohos/hypium'; -import testsuite from '../test/List.test'; -import window from '@ohos.window'; - -export default class TestAbility extends UIAbility { - onCreate(want, 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) ?? ''); - var abilityDelegator: any - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var abilityDelegatorArguments: any - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - hilog.info(0x0000, 'testTag', '%{public}s', 'start run testcase!!!'); - Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) - } - - onDestroy() { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onDestroy'); - } - - onWindowStageCreate(windowStage: window.WindowStage) { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageCreate'); - windowStage.loadContent('TestAbility/pages/Index', (err, data) => { - 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. Data: %{public}s', - JSON.stringify(data) ?? ''); - }); - } - - 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/commonlibrary/crossplatform/commonlibraryprocessetstest/src/main/ets/TestAbility/pages/Index.ets b/commonlibrary/crossplatform/commonlibraryprocessetstest/src/main/ets/TestAbility/pages/Index.ets deleted file mode 100755 index e95640899..000000000 --- a/commonlibrary/crossplatform/commonlibraryprocessetstest/src/main/ets/TestAbility/pages/Index.ets +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import hilog from '@ohos.hilog'; - -@Entry -@Component -struct Index { - aboutToAppear() { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility index aboutToAppear'); - } - @State message: string = 'Hello World' - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Button() { - Text('next page') - .fontSize(20) - .fontWeight(FontWeight.Bold) - }.type(ButtonType.Capsule) - .margin({ - top: 20 - }) - .backgroundColor('#0D9FFB') - .width('35%') - .height('5%') - .onClick(()=>{ - }) - } - .width('100%') - } - .height('100%') - } - } \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryprocessetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/commonlibrary/crossplatform/commonlibraryprocessetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts deleted file mode 100755 index 92a16d84e..000000000 --- a/commonlibrary/crossplatform/commonlibraryprocessetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts +++ /dev/null @@ -1,49 +0,0 @@ -import hilog from '@ohos.hilog'; -import TestRunner from '@ohos.application.testRunner'; -import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; - -var abilityDelegator = undefined -var abilityDelegatorArguments = undefined - -async function onAbilityCreateCallback() { - hilog.info(0x0000, 'testTag', '%{public}s', 'onAbilityCreateCallback'); -} - -async function addAbilityMonitorCallback(err: any) { - 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() { - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun run'); - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var testAbilityName = abilityDelegatorArguments.bundleName + '.TestAbility' - let lMonitor = { - abilityName: testAbilityName, - onAbilityCreate: onAbilityCreateCallback, - }; - abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) - var cmd = 'aa start -d 0 -a TestAbility' + ' -b ' + abilityDelegatorArguments.bundleName - var debug = abilityDelegatorArguments.parameters['-D'] - if (debug == 'true') - { - cmd += ' -D' - } - hilog.info(0x0000, 'testTag', 'cmd : %{public}s', cmd); - abilityDelegator.executeShellCommand(cmd, - (err: any, d: any) => { - hilog.info(0x0000, 'testTag', 'executeShellCommand : err : %{public}s', JSON.stringify(err) ?? ''); - hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.stdResult ?? ''); - hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.exitCode ?? ''); - }) - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun end'); - } -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryprocessetstest/src/main/ets/test/List.test.ets b/commonlibrary/crossplatform/commonlibraryprocessetstest/src/main/ets/test/List.test.ets deleted file mode 100755 index b2e5d7129..000000000 --- a/commonlibrary/crossplatform/commonlibraryprocessetstest/src/main/ets/test/List.test.ets +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import ProcessTest from './Process.test.ets' - -export default function testsuite() { - ProcessTest() -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryprocessetstest/src/main/ets/test/Process.test.ets b/commonlibrary/crossplatform/commonlibraryprocessetstest/src/main/ets/test/Process.test.ets deleted file mode 100755 index de50bdcda..000000000 --- a/commonlibrary/crossplatform/commonlibraryprocessetstest/src/main/ets/test/Process.test.ets +++ /dev/null @@ -1,1099 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from '@ohos/hypium' -import process from '@ohos.process' -export default function ProcessTest() { -describe('ProcessManager', function () { - - /** - * @tc.number:TEST_IS_APPUID_001 - * @tc.name: testProcessManagerIsAppUid001 - * @tc.desc: Returns a boolean whether the specified uid belongs to a particular application. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it('testProcessManagerIsAppUid001', 0, function () { - let pro = new process.ProcessManager(); - let isorno = pro.isAppUid(167); - expect(isorno).assertEqual(false); - }) - - - - /** - * @tc.number:TEST_PROCESSMAMAGER_IS_APPUID_002 - * @tc.name: testProcessManagerIsAppUid002 - * @tc.desc: Returns a boolean whether the specified uid belongs to a particular application. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it('testProcessManagerIsAppUid002', 0, function () { - let pro = new process.ProcessManager(); - let isorno = pro.isAppUid(80000); - expect(isorno).assertEqual(false); - }) - - /** - * @tc.number:TEST_PROCESSMAMAGER_IS_APPUID_003 - * @tc.name: testProcessManagerIsAppUid003 - * @tc.desc: Returns a boolean whether the specified uid belongs to a particular application. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it('testProcessManagerIsappuid003', 0, function () { - let pro = new process.ProcessManager(); - let isorno = pro.isAppUid(123); - expect(isorno).assertEqual(false); - }) - - /** - * @tc.number:TEST_PROCESSMAMAGER_IS_APPUID_004 - * @tc.name: testProcessManagerIsAppUid004 - * @tc.desc: Returns a boolean whether the specified uid belongs to a particular application. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it('testProcessManagerIsappuid004', 0, function () { - let pro = new process.ProcessManager(); - let isorno = pro.isAppUid(789); - expect(isorno).assertEqual(false); - }) - - /** - * @tc.number:TEST_PROCESSMAMAGER_IS_APPUID_005 - * @tc.name: testProcessManagerIsAppUid004 - * @tc.desc: Returns a boolean whether the specified uid belongs to a particular application. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it('testProcessManagerIsappuid005', 0, function () { - let pro = new process.ProcessManager(); - let isorno = pro.isAppUid(8569); - expect(isorno).assertEqual(false); - }) - - /** - * @tc.number:TEST_PROCESSMAMAGER_IS_APPUID_006 - * @tc.name: testProcessManagerIsAppUid006 - * @tc.desc: Returns a boolean whether the specified uid belongs to a particular application. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it('testProcessManagerIsappuid006', 0, function () { - try { - let pro = new process.ProcessManager(); - //@ts-ignore - let mag = pro.isAppUid("asdad"); - } catch (e) { - expect(e.toString()).assertEqual("BuisnessError: The type of v must be number."); - } - }) - - /** - * @tc.number:TEST_PROCESSMANAGER_GETUIDFORNAME_001 - * @tc.name: testProcessManagerGetUidForName001 - * @tc.desc: Returns the uid based on the specified user name. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it('testProcessManagerGetUidForName001',0, function () { - let pro = new process.ProcessManager(); - let pres = pro.getUidForName("root"); - if (pres != -1) { - let flag = new Boolean(true); - expect(Boolean(flag)).assertEqual(true); - } - }) - - /** - * @tc.number:TEST_PROCESSMANAGER_GETUIDFORNAME_002 - * @tc.name: testProcessManagerGetUidForName002 - * @tc.desc: Returns the uid based on the specified user name. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it('testProcessManagerGetUidForName002', 0, function () { - let pro = new process.ProcessManager(); - for (let i=0; i<3; i++) { - let pres = pro.getUidForName("12356"); - expect(pres).assertEqual(-1); - } - }) - - /** - * @tc.number:TEST_PROCESSMANAGER_GETUIDFORNAME_003 - * @tc.name: testProcessManagerGetUidForName003 - * @tc.desc: Returns the uid based on the specified user name. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it('testProcessManagerGetUidForName003', 0, function () { - let pro = new process.ProcessManager(); - for (let i=0; i<5; i++) { - let pres = pro.getUidForName("as123"); - expect(pres).assertEqual(-1); - } - }) - - /** - * @tc.number:TEST_PROCESSMANAGER_GETUIDFORNAME_004 - * @tc.name: testGetUidForName004 - * @tc.desc: Returns the uid based on the specified user name. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it('testProcessManagerGetUidForName004',0, function () { - try { - let pro = new process.ProcessManager(); - //@ts-ignore - let pres = pro.getUidForName(12); - } catch (e) { - expect(e.toString()).assertEqual("BuisnessError: The type of v must be string."); - } - }) - - - - /** - * @tc.number:TEST_PROCESSMANAGER_GETTHREADPRIORITY_001 - * @tc.name: testProcessManagerGetThreadPriority001 - * @tc.desc: Returns the thread priority based on the specified tid. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it('testProcessManagerGetThreadPriority001', 0, function () { - let pro = new process.ProcessManager(); - let pres = process.tid; - let pri = pro.getThreadPriority(pres); - if (pri) { - let flag = new Boolean(true); - expect(Boolean(flag)).assertEqual(true); - } - }) - - /** - * @tc.number:TEST_PROCESSMANAGER_GETTHREADPRIORITY_002 - * @tc.name: testProcessManagerGetThreadPriority002 - * @tc.desc: Returns the thread priority based on the specified tid. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it('testProcessManagerGetThreadPriority002', 0, function () { - let pro = new process.ProcessManager(); - let pres = process.tid; - for (let i=0; i<3; i++) { - let pri = pro.getThreadPriority(pres); - if (pri > 0) { - let flag = new Boolean(true); - expect(Boolean(flag)).assertEqual(true); - } - } - }) - - /** - * @tc.number:TEST_PROCESSMANAGER_GETTHREADPRIORITY_003 - * @tc.name: testProcessManagerGetThreadPriority003 - * @tc.desc: Returns the thread priority based on the specified tid. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it('testProcessManagerGetThreadPriority003', 0, function () { - let pro = new process.ProcessManager(); - let pres = process.tid; - for (let i=0; i<5; i++) { - let pri = pro.getThreadPriority(pres); - if (pri > 0) { - let flag = new Boolean(true); - expect(Boolean(flag)).assertEqual(true); - } - } - }) - - /** - * @tc.number:TEST_PROCESSMANAGER_GETTHREADPRIORITY_004 - * @tc.name: testProcessManagerGetThreadPriority004 - * @tc.desc: Returns the thread priority based on the specified tid. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it('testProcessManagerGetThreadPriority004', 0, function () { - try { - let pro = new process.ProcessManager(); - //@ts-ignore - let pri = pro.getThreadPriority("asdad"); - } catch (e) { - expect(e.toString()).assertEqual("BuisnessError: The type of v must be number."); - } - }) - - - - /** - * @tc.number:TEST_PROCESSMANAGER_GETSYSTEMCONFIG_001 - * @tc.name: testProcessManagerGetSystemConfig001 - * @tc.desc: Returns the system configuration at runtime. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it('testProcessManagerGetSystemConfig001', 0, function () { - let pro = new process.ProcessManager(); - let _SC_ARG_MAX = 0; - let pri = pro.getSystemConfig(_SC_ARG_MAX); - if (pri > 0) { - var flag = new Boolean(true); - } - expect(Boolean(flag)).assertEqual(true); - }) - - /** - * @tc.number:TEST_PROCESSMANAGER_GETSYSTEMCONFIG_002 - * @tc.name: testProcessManagerGetSystemConfig002 - * @tc.desc: Returns the system configuration at runtime. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it('testProcessManagerGetSystemConfig002', 0, function () { - let pro = new process.ProcessManager(); - let _SC_ARG_MAX = 0; - for (let i=0; i<3; i++) { - let pri = pro.getSystemConfig(_SC_ARG_MAX); - if (pri > 0) { - var flag = new Boolean(true); - } - expect(Boolean(flag)).assertEqual(true); - } - }) - - /** - * @tc.number:TEST_PROCESSMANAGER_GETSYSTEMCONFIG_003 - * @tc.name: testProcessManagerGetSystemConfig003 - * @tc.desc: Returns the system configuration at runtime. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it('testProcessManagerGetSystemConfig003', 0, function () { - let pro = new process.ProcessManager(); - let _SC_ARG_MAX = 0; - for (let i=0; i<5; i++) { - let pri = pro.getSystemConfig(_SC_ARG_MAX); - if (pri > 0) { - var flag = new Boolean(true); - } - expect(Boolean(flag)).assertEqual(true); - } - }) - - /** - * @tc.number:TEST_PROCESSMANAGER_GETSYSTEMCONFIG_004 - * @tc.name: testProcessManagerGetSystemConfig004 - * @tc.desc: Returns the system configuration at runtime. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it('testProcessManagerGetSystemConfig004', 0, function () { - let pro = new process.ProcessManager(); - let _SC_OPEN_MAX = 4 - let pri = pro.getSystemConfig(_SC_OPEN_MAX); - if (pri > 0) { - var flag = new Boolean(true); - } - expect(Boolean(flag)).assertEqual(true); - }) - - /** - * @tc.number:TEST_PROCESSMANAGER_GETSYSTEMCONFIG_005 - * @tc.name: testProcessManagerGetSystemConfig005 - * @tc.desc: Returns the system configuration at runtime. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it('testProcessManagerGetSystemConfig005', 0, function () { - let pro = new process.ProcessManager(); - let _SC_PAGESIZE = 8; - let pri = pro.getSystemConfig(_SC_PAGESIZE); - if (pri > 0) { - var flag = new Boolean(true); - } - expect(Boolean(flag)).assertEqual(true); - }) - - /** - * @tc.number:TEST_PROCESSMANAGER_GETSYSTEMCONFIG_006 - * @tc.name: testGetSystemConfig006 - * @tc.desc: Returns the system configuration at runtime. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it('testProcessManagerGetSystemConfig006', 0, function () { - try { - let pro = new process.ProcessManager(); - //@ts-ignore - let pri = pro.getSystemConfig("asdad"); - } catch (e) { - expect(e.toString()).assertEqual("BuisnessError: The type of v must be number."); - } - }) - - /** - * @tc.number:TEST_PROCESSMANAGER_GETENVIRONMENTVAR_001 - * @tc.name: testProcessManagerGetEnvironmentVar001 - * @tc.desc: Returns the system value for environment variables. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it('testProcessManagerGetEnvironmentVar001', 0, function () { - let pro = new process.ProcessManager(); - let pri = pro.getEnvironmentVar("USER"); - if (pri != null) { - var flag = new Boolean(true); - expect(Boolean(flag)).assertEqual(true); - } - }) - - /** - * @tc.number:TEST_PROCESSMANAGER_GETENVIRONMENTVAR_002 - * @tc.name: testProcessManagerGetEnvironmentVar002 - * @tc.desc: Returns the system value for environment variables. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it('testProcessManagerGetEnvironmentVar002', 0, function () { - let pro = new process.ProcessManager(); - for (let i=0; i<3; i++) { - let pri = pro.getEnvironmentVar("PATH"); - if (pri != null) { - var flag = new Boolean(true); - expect(Boolean(flag)).assertEqual(true); - } - } - }) - - /** - * @tc.number:TEST_PROCESSMANAGER_GETENVIRONMENTVAR_003 - * @tc.name: testProcessManagerGetEnvironmentVar003 - * @tc.desc: Returns the system value for environment variables. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it('testProcessManagerGetEnvironmentVar003', 0, function () { - let pro = new process.ProcessManager(); - for (let i=0; i<100; i++) { - let pri = pro.getEnvironmentVar("i123"); - if (pri == null) { - var flag = new Boolean(true); - expect(Boolean(flag)).assertEqual(true); - } - } - }) - - /** - * @tc.number:TEST_PROCESSMANAGER_GETENVIRONMENTVAR_004 - * @tc.name: testGetEnvironmentVar004 - * @tc.desc: Returns the system value for environment variables. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it('testProcessManagerGetEnvironmentVar004', 0, function () { - try { - let pro = new process.ProcessManager(); - //@ts-ignore - let pri = pro.getEnvironmentVar(123); - } catch (e) { - expect(e.toString()).assertEqual("BuisnessError: The type of v must be string."); - } - }) - - - /** - * @tc.number:TEST_PROCESSMANAGER_KILL_001 - * @tc.name: testProcessManagerKill001 - * @tc.desc: Return whether the signal was sent successfully. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it('testProcessManagerKill001', 0, function () { - let pro = new process.ProcessManager(); - let result = pro.kill(3, 123); - expect(result).assertEqual(false); - }) - - /** - * @tc.number:TEST_PROCESSMANAGER_KILL_002 - * @tc.name: testProcessManagerKill002 - * @tc.desc: Return whether the signal was sent successfully. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it('testProcessManagerKill002', 0, function () { - let pro = new process.ProcessManager(); - let pres = process.pid; - let result = pro.kill(23, pres); - expect(result).assertEqual(true); - }) - - /** - * @tc.number:TEST_PROCESSMANAGER_KILL_003 - * @tc.name: testProcessManagerKill003 - * @tc.desc: Return whether the signal was sent successfully. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it('testProcessManagerKill003', 0, function () { - let pro = new process.ProcessManager(); - let pres = process.pid; - let result = pro.kill(28, pres); - expect(result).assertEqual(true); - }) - - - /** - * @tc.number:TEST_PROCESSMANAGER_KILL_004 - * @tc.name: testProcessManagerKill004 - * @tc.desc: Return whether the signal was sent successfully. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it('testProcessManagerKill004', 0, function () { - let pro = new process.ProcessManager(); - let result = pro.kill(3, 113); - expect(result).assertEqual(false); - }) - - /** - * @tc.number:TEST_PROCESSMANAGER_KILL_005 - * @tc.name: testProcessManagerKill005 - * @tc.desc: Return whether the signal was sent successfully. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it('testProcessManagerKill005', 0, function () { - try { - let pro = new process.ProcessManager(); - //@ts-ignore - let result = pro.kill("asd", 123); - } catch (e) { - expect(e.toString()).assertEqual("BuisnessError: The type of v must be number."); - } - }) -}) - - - -describe('ProcessTest', function () { - - /** - * @tc.number:TEST_Uid_001 - * @tc.name: testUid001 - * @tc.desc: returns the digital user id of the process. - * @tc.size: MediumTest - * @tc.type: Constant - * @tc.level: level 2 - */ - it('testUid001', 0, function () { - let result = process.uid; - if (result > 0) { - var flag = true; - } - expect(flag).assertEqual(true); - }) - - /** - * @tc.number:TEST_Uid_002 - * @tc.name: testUid002 - * @tc.desc: returns the digital user id of the process. - * @tc.size: MediumTest - * @tc.type: Constant - * @tc.level: level 2 - */ - it('testUid002', 0, function () { - for (let i = 0; i < 3; i++) { - let result = process.uid; - if (result != null) { - if (result > 0) { - var flag = true; - } - expect(flag).assertEqual(true); - } - } - }) - - /** - * @tc.number:TEST_Uid_003 - * @tc.name: testUid003 - * @tc.desc: returns the digital user id of the process. - * @tc.size: MediumTest - * @tc.type: Constant - * @tc.level: level 2 - */ - it('testUid003', 0, function () { - for (let i = 0; i < 6; i++) { - let result = process.uid; - if (result != null) { - if (result > 0) { - var flag = true; - } - expect(flag).assertEqual(true); - } - } - }) - - /** - * @tc.number:TEST_Uid_004 - * @tc.name: testUid004 - * @tc.desc: returns the digital user id of the process. - * @tc.size: MediumTest - * @tc.type: Constant - * @tc.level: level 2 - */ - it('testUid004', 0, function () { - for (let i = 0; i < 8; i++) { - let result = process.uid; - if (result != null) { - if (result > 0) { - var flag = true; - } - expect(flag).assertEqual(true); - } - } - }) - - /** - * @tc.number:TEST_Uid_005 - * @tc.name: testUid005 - * @tc.desc: returns the digital user id of the process. - * @tc.size: MediumTest - * @tc.type: Constant - * @tc.level: level 2 - */ - it('testUid005', 0, function () { - for (let i = 0; i < 5; i++){ - let result = process.uid; - if (result != null) { - if (result > 0) { - var flag = true; - } - expect(flag).assertEqual(true); - } - } - }) - - - /** - * @tc.number:TEST_PID_001 - * @tc.name: testPid001 - * @tc.desc: Return pid is the pid of the current process. - * @tc.size: MediumTest - * @tc.type: Constant - * @tc.level: level 2 - */ - it('testPid001', 0, function () { - let result = process.pid; - if (result > 0) { - var flag = true; - } - expect(flag).assertEqual(true); - }) - - /** - * @tc.number:TEST_PID_002 - * @tc.name: testPid002 - * @tc.desc: Return pid is the pid of the current process. - * @tc.size: MediumTest - * @tc.type: Constant - * @tc.level: level 2 - */ - it('testPid002', 0, function () { - for (let i = 0; i < 3; i++) { - let result = process.pid; - if (result > 0) { - var flag = true; - } - expect(flag).assertEqual(true); - } - }) - - /** - * @tc.number:TEST_PID_003 - * @tc.name: testPid003 - * @tc.desc: Return pid is the pid of the current process. - * @tc.size: MediumTest - * @tc.type: Constant - * @tc.level: level 2 - */ - it('testPid003', 0, function () { - for (let i = 0; i < 5; i++) { - let result = process.pid; - if (result > 0) { - var flag = true; - } - expect(flag).assertEqual(true); - } - }) - - /** - * @tc.number:TEST_PID_004 - * @tc.name: testPid004 - * @tc.desc: Return pid is the pid of the current process. - * @tc.size: MediumTest - * @tc.type: Constant - * @tc.level: level 2 - */ - it('testPid004', 0, function () { - for (let i = 0; i < 6; i++) { - let result = process.pid; - if (result > 0) { - var flag = true; - } - expect(flag).assertEqual(true); - } - }) - - /** - * @tc.number:TEST_PID_005 - * @tc.name: testPid005 - * @tc.desc: Return pid is the pid of the current process. - * @tc.size: MediumTest - * @tc.type: Constant - * @tc.level: level 2 - */ - it('testPid005', 0, function () { - for (let i = 0; i < 8; i++) { - let result = process.pid; - if (result > 0) { - var flag = true; - } - expect(flag).assertEqual(true); - } - }) - - /** - * @tc.number:TEST_TID_001 - * @tc.name: testTid001 - * @tc.desc: Returns the tid of the current thread. - * @tc.size: MediumTest - * @tc.type: Constant - * @tc.level: level 2 - */ - it('testTid001', 0, function () { - let pres = process.tid; - if (pres > 0) { - var flag = new Boolean(true); - } - expect(Boolean(flag)).assertEqual(true); - }) - - /** - * @tc.number:TEST_TID_002 - * @tc.name: testTid002 - * @tc.desc: Returns the tid of the current thread. - * @tc.size: MediumTest - * @tc.type: Constant - * @tc.level: level 2 - */ - it('testTid002', 0, function () { - for (let i=0; i < 5; i++) { - let pres = process.tid; - if (pres > 0) { - var flag = new Boolean(true); - } - expect(Boolean(flag)).assertEqual(true); - } - }) - - /** - * @tc.number:TEST_TID_003 - * @tc.name: testTid003 - * @tc.desc: Returns the tid of the current thread. - * @tc.size: MediumTest - * @tc.type: Constant - * @tc.level: level 2 - */ - it('testTid003', 0, function () { - for (let i=0; i < 3; i++) { - let pres = process.tid; - if (pres > 0) { - var flag = new Boolean(true); - } - expect(Boolean(flag)).assertEqual(true); - } - }) - - /** - * @tc.number:TEST_IS64BIT_001 - * @tc.name: testIs64Bit001 - * @tc.desc: Returns a boolean whether the process is running in a 64-bit environment. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it('testIs64Bit001', 0, function () { - let isorno = process.is64Bit(); - if (isorno) { - expect(isorno).assertEqual(true); - } else { - expect(isorno).assertEqual(false); - } - }) - - /** - * @tc.number:TEST_IS64BIT_002 - * @tc.name: testIs64Bit002 - * @tc.desc: Returns a boolean whether the process is running in a 64-bit environment. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it('testIs64Bit002', 0, function () { - for (let i=0; i<3; i++) { - let isorno = process.is64Bit(); - if (isorno) { - expect(isorno).assertEqual(true); - } else { - expect(isorno).assertEqual(false); - } - } - }) - - /** - * @tc.number:TEST_IS64BIT_003 - * @tc.name: testIs64Bit003 - * @tc.desc: Returns a boolean whether the process is running in a 64-bit environment. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it('testIs64Bit003', 0, function () { - for (let i=0; i<5; i++) { - let isorno = process.is64Bit(); - if (isorno) { - expect(isorno).assertEqual(true); - } else { - expect(isorno).assertEqual(false); - } - } - }) - - - /** - * @tc.number:TEST_GET_START_REALTIME_001 - * @tc.name: testGetStartRealtime001 - * @tc.desc: Returns the elapsed real time (in milliseconds) taken from the start of - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it('testGetStartRealtime001', 0, function () { - for (let i=0; i<3; i++) { - let pri = process.getStartRealtime(); - if (pri !== null) { - var flag = new Boolean(true); - } - expect(Boolean(flag)).assertEqual(true); - } - }) - - /** - * @tc.number:TEST_GET_START_REALTIME_002 - * @tc.name: testGetStartRealtime002 - * @tc.desc: Returns the elapsed real time (in milliseconds) taken from the start of - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it('testGetStartRealtime002', 0, function () { - let pri = process.getStartRealtime(); - if (pri !== null) { - var flag = new Boolean(true); - } - expect(Boolean(flag)).assertEqual(true); - }) - - /** - * @tc.number:TEST_GET_START_REALTIME_003 - * @tc.name: testGetStartRealtime003 - * @tc.desc: Returns the elapsed real time (in milliseconds) taken from the start of - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it('testGetStartRealtime003', 0, function () { - for (let i=0; i<5; i++) { - let pri = process.getStartRealtime(); - if (pri !== null) { - var flag = new Boolean(true); - } - expect(Boolean(flag)).assertEqual(true); - } - }) - - /** - * @tc.number:TEST_GET_START_REALTIME_004 - * @tc.name: testGetStartRealtime004 - * @tc.desc: Returns the elapsed real time (in milliseconds) - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it('testGetStartRealtime004', 0, function () { - for (let i=0; i<8; i++) { - let pri = process.getStartRealtime(); - if (pri !== null) { - var flag = new Boolean(true); - } - expect(Boolean(flag)).assertEqual(true); - } - }) - - /** - * @tc.number:TEST_GET_START_REALTIME_005 - * @tc.name: testGetStartRealtime005 - * @tc.desc: Returns the elapsed real time (in milliseconds) taken from the start of - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it('testGetStartRealtime005', 0, function () { - for (let i=0; i<6; i++) { - let pri = process.getStartRealtime(); - if (pri !== null) { - var flag = new Boolean(true); - } - expect(Boolean(flag)).assertEqual(true); - } - }) - - - /** - * @tc.number:TEST_GET_PAST_CPU_TIME_001 - * @tc.name: testGetpastCpuTime001 - * @tc.desc: Returns the cpu time (in milliseconds) from the time when the process starts to the current time. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it('testGetpastCpuTime001', 0, function () { - for (let i=0; i<3; i++) { - let pri = process.getPastCpuTime(); - if (pri > 0) { - var flag = new Boolean(true); - } - expect(Boolean(flag)).assertEqual(true); - } - }) - - /** - * @tc.number:TEST_GET_PAST_CPU_TIME_002 - * @tc.name: testGetpastCpuTime002 - * @tc.desc: Returns the cpu time (in milliseconds) from the time when the process starts to the current time. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it('testGetpastCpuTime002', 0, function () { - let pri = process.getPastCpuTime(); - if (pri > 0) { - var flag = new Boolean(true); - } - expect(Boolean(flag)).assertEqual(true); - }) - - /** - * @tc.number:TEST_GET_PAST_CPU_TIME_003 - * @tc.name: testGetpastCpuTime003 - * @tc.desc: Returns the cpu time (in milliseconds) from the time when the process starts to the current time. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it('testGetpastCpuTime003', 0, function () { - for (let i=0; i<5; i++) { - let pri = process.getPastCpuTime(); - if (pri > 0) { - var flag = new Boolean(true); - } - expect(Boolean(flag)).assertEqual(true); - } - }) - - /** - * @tc.number:TEST_GET_PAST_CPU_TIME_004 - * @tc.name: testGetpastCpuTime004 - * @tc.desc: Returns the cpu time (in milliseconds) from the time when the process starts to the current time. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it('testGetpastCpuTime004', 0, function () { - for (let i=0; i<8; i++) { - let pri = process.getPastCpuTime(); - if (pri > 0) { - var flag = new Boolean(true); - } - expect(Boolean(flag)).assertEqual(true); - } - }) - - - /** - * @tc.number:TEST_UPTIME_001 - * @tc.name: testUptime001 - * @tc.desc: Returns the running time of the system. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it('testUptime001', 0, function () { - let result1 = process.uptime(); - function sleep(d){ - while(process.uptime() - result1 <= d); - } - sleep(6); - let result2 = process.uptime(); - var flag = false - if ((result2 - result1) >= 6) { - flag = true; - } - expect(flag).assertEqual(true); - }) - - /** - * @tc.number:TEST_UPTIME_002 - * @tc.name: testUptime002 - * @tc.desc: Returns the running time of the system. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it('testUptime002', 0, function () { - let result1 = process.uptime(); - function sleep(d){ - while (process.uptime() - result1 <= d); - } - sleep(8); - let result2 = process.uptime(); - var flag = false; - if ((result2 - result1) >= 8) { - flag = true; - } - expect(flag).assertEqual(true); - }) - - /** - * @tc.number:TEST_UPTIME_003 - * @tc.name: testUptime003 - * @tc.desc: Returns the running time of the system. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it('testUptime003', 0, function () { - let result1 = process.uptime(); - function sleep(d){ - while (process.uptime() - result1 <= d); - } - sleep(10); - let result2 = process.uptime(); - var flag = false; - if ((result2 - result1) >= 10) { - flag = true; - } - expect(flag).assertEqual(true); - }) - - /** - * @tc.number:TEST_UPTIME_004 - * @tc.name: testUptime004 - * @tc.desc: Returns the running time of the system. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it('testUptime004', 0, function () { - let result1 = process.uptime(); - function sleep(d){ - while (process.uptime() - result1 <= d); - } - sleep(7); - let result2 = process.uptime(); - var flag = false; - if ((result2 - result1) >= 7) { - flag = true; - } - expect(flag).assertEqual(true); - }) - - /** - * @tc.number:TEST_UPTIME_005 - * @tc.name: testUptime005 - * @tc.desc: Returns the running time of the system. - * @tc.size: MediumTest - * @tc.type: Method - * @tc.level: level 2 - */ - it('testUptime005', 0, function () { - let result1 = process.uptime(); - function sleep(d){ - while (process.uptime() - result1 <= d); - } - sleep(11); - let result2 = process.uptime(); - var flag = false; - if ((result2 - result1) >= 11) { - flag = true; - } - expect(flag).assertEqual(true); - }) -}) -} - - - - - - - - - - - \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryprocessetstest/src/main/module.json b/commonlibrary/crossplatform/commonlibraryprocessetstest/src/main/module.json deleted file mode 100755 index a4443e713..000000000 --- a/commonlibrary/crossplatform/commonlibraryprocessetstest/src/main/module.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "module": { - "name": "entry_test", - "type": "feature", - "description": "$string:module_test_desc", - "mainElement": "TestAbility", - "deviceTypes": [ - "phone" - ], - "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", - "skills": [ - { - "actions": [ - "action.system.home" - ], - "entities": [ - "entity.system.home" - ] - } - ] - } - ] - } -} diff --git a/commonlibrary/crossplatform/commonlibraryprocessetstest/src/main/resources/base/element/color.json b/commonlibrary/crossplatform/commonlibraryprocessetstest/src/main/resources/base/element/color.json deleted file mode 100755 index 3c712962d..000000000 --- a/commonlibrary/crossplatform/commonlibraryprocessetstest/src/main/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/commonlibrary/crossplatform/commonlibraryprocessetstest/src/main/resources/base/element/string.json b/commonlibrary/crossplatform/commonlibraryprocessetstest/src/main/resources/base/element/string.json deleted file mode 100755 index 65d8fa5a7..000000000 --- a/commonlibrary/crossplatform/commonlibraryprocessetstest/src/main/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/commonlibrary/crossplatform/commonlibraryprocessetstest/src/main/resources/base/media/icon.png b/commonlibrary/crossplatform/commonlibraryprocessetstest/src/main/resources/base/media/icon.png deleted file mode 100755 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6BLrPFWk?s;$LOP{GmJpBl$qoSA!PUg~PA65-S00{{S`XKG6NkG0RgjEntPrmV+?0|00mu7;+5 zrdpa{2QLqPJ4Y{j7=Mrl{BaxrkdY69+c~(w{Fv-v&aR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ztZ(kwnR9+l=V|q%mSmPkILo8HAs$U9jy^XM$y2P}FfoFpCF0>cN|;Ya5uZSz{LR-- zw!fVt-Mi}J?R9^>3O`fGzcS^Go9F1|iha9MzS(=DaLOk=uL|BfRJMI-(7N*E(jNr( zH+8=IdlRTR`1!_JrIqh=z5T(aDQ!D$u3VXU^K5JW%G)n4Iyfiy_O(-&*WM9XwmAVl zLYyAUk^h5Zj}^BOCk)S<1PCq&T==nU`D^rz7k_=b+*`N%Wa;KBM>0?LWL;U}&NTFC zESFX;o9yk<{_Fg;u8E&r>lw$2)rnCQv%5UB#nd%ZboU+Wp5q%fWPad(wl_OI_1?=D z^=m?XYw;^V8@ { - 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. Data: %{public}s', - JSON.stringify(data) ?? ''); - }); - } - - 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/commonlibrary/crossplatform/commonlibraryqueueetstest/src/main/ets/TestAbility/pages/Index.ets b/commonlibrary/crossplatform/commonlibraryqueueetstest/src/main/ets/TestAbility/pages/Index.ets deleted file mode 100755 index 82eb2048e..000000000 --- a/commonlibrary/crossplatform/commonlibraryqueueetstest/src/main/ets/TestAbility/pages/Index.ets +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2023 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. - */ -import hilog from '@ohos.hilog'; - -@Entry -@Component -struct Index { - aboutToAppear() { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility index aboutToAppear'); - } - @State message: string = 'Hello World' - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Button() { - Text('next page') - .fontSize(20) - .fontWeight(FontWeight.Bold) - }.type(ButtonType.Capsule) - .margin({ - top: 20 - }) - .backgroundColor('#0D9FFB') - .width('35%') - .height('5%') - .onClick(()=>{ - }) - } - .width('100%') - } - .height('100%') - } - } \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryqueueetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/commonlibrary/crossplatform/commonlibraryqueueetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts deleted file mode 100755 index 92a16d84e..000000000 --- a/commonlibrary/crossplatform/commonlibraryqueueetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts +++ /dev/null @@ -1,49 +0,0 @@ -import hilog from '@ohos.hilog'; -import TestRunner from '@ohos.application.testRunner'; -import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; - -var abilityDelegator = undefined -var abilityDelegatorArguments = undefined - -async function onAbilityCreateCallback() { - hilog.info(0x0000, 'testTag', '%{public}s', 'onAbilityCreateCallback'); -} - -async function addAbilityMonitorCallback(err: any) { - 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() { - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun run'); - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var testAbilityName = abilityDelegatorArguments.bundleName + '.TestAbility' - let lMonitor = { - abilityName: testAbilityName, - onAbilityCreate: onAbilityCreateCallback, - }; - abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) - var cmd = 'aa start -d 0 -a TestAbility' + ' -b ' + abilityDelegatorArguments.bundleName - var debug = abilityDelegatorArguments.parameters['-D'] - if (debug == 'true') - { - cmd += ' -D' - } - hilog.info(0x0000, 'testTag', 'cmd : %{public}s', cmd); - abilityDelegator.executeShellCommand(cmd, - (err: any, d: any) => { - hilog.info(0x0000, 'testTag', 'executeShellCommand : err : %{public}s', JSON.stringify(err) ?? ''); - hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.stdResult ?? ''); - hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.exitCode ?? ''); - }) - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun end'); - } -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryqueueetstest/src/main/ets/test/List.test.ets b/commonlibrary/crossplatform/commonlibraryqueueetstest/src/main/ets/test/List.test.ets deleted file mode 100755 index 61b179c9d..000000000 --- a/commonlibrary/crossplatform/commonlibraryqueueetstest/src/main/ets/test/List.test.ets +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (c) 2023 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. - */ -import QueueTest from './Queue.test' - -export default function testsuite() { - QueueTest() -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryqueueetstest/src/main/ets/test/Queue.test.ets b/commonlibrary/crossplatform/commonlibraryqueueetstest/src/main/ets/test/Queue.test.ets deleted file mode 100755 index 93caee018..000000000 --- a/commonlibrary/crossplatform/commonlibraryqueueetstest/src/main/ets/test/Queue.test.ets +++ /dev/null @@ -1,401 +0,0 @@ -/* - * Copyright (c) 2023 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. - */ -import Queue from "@ohos.util.Queue"; -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' -export default function QueueTest() { -describe("QueueTest", function () { - - /** - * @tc.number: TEST_CONSTRUCTOR_001 - * @tc.name: testConstructor001 - * @tc.desc: Create an Queue instance. For example: let queue = new Queue(). - * @tc.size: MediumTest - * @tc.type: Function - * @tc.level: Level 2 - */ - it("testConstructor001", 0, function () { - try { - let queue = new Queue(); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200012); - expect(err.message).assertEqual("The Queue's constructor cannot be directly invoked"); - } - }); - - /** - * @tc.number: TEST_ADD_001 - * @tc.name: testAdd001 - * @tc.desc: Add element to Queue instance end. For example: queue.add("四"). - * @tc.size: MediumTest - * @tc.type: Function - * @tc.level: Level 2 - */ - it("testAdd001", 0, function () { - let queue = new Queue(); - queue.add("四"); - let res = queue.getFirst(); - expect(res).assertEqual("四"); - }); - - /** - * @tc.number: TEST_ADD_002 - * @tc.name: testAdd002 - * @tc.desc: Add element to Queue instance end. For example: queue.add(8). - * @tc.size: MediumTest - * @tc.type: Function - * @tc.level: Level 2 - */ - it("testAdd002", 0, function () { - let queue = new Queue(); - queue.add(8); - let res = queue.getFirst(); - expect(res).assertEqual(8); - }); - - /** - * @tc.number: TEST_ADD_003 - * @tc.name: testAdd003 - * @tc.desc: Add element to Queue instance end. For example: queue.add(8). - * @tc.size: MediumTest - * @tc.type: Function - * @tc.level: Level 2 - */ - it("testAdd003", 0, function () { - let queue = new Queue(); - let a = ["a", "b", "c"]; - queue.add(a); - let res = queue.getFirst(); - expect(res).assertEqual(a); - }); - - /** - * @tc.number: TEST_ADD_004 - * @tc.name: testAdd004 - * @tc.desc: Add element to Queue instance end. For example: queue.add("$"). - * @tc.size: MediumTest - * @tc.type: Function - * @tc.level: Level 2 - */ - it("testAdd004", 0, function () { - let queue = new Queue(); - queue.add("$"); - let res = queue.getFirst(); - expect(res).assertEqual("$"); - }); - - /** - * @tc.number: TEST_ADD_005 - * @tc.name: testAdd005 - * @tc.desc: Add element to Queue instance end. For example: queue.add(" "). - * @tc.size: MediumTest - * @tc.type: Function - * @tc.level: Level 2 - */ - it("testAdd005", 0, function () { - let queue = new Queue(); - queue.add(" "); - let res = queue.getFirst(); - expect(res).assertEqual(" "); - }); - - /** - * @tc.number: TEST_ADD_006 - * @tc.name: testAdd006 - * @tc.desc: Add element to Queue instance end. For example: queue.add(null). - * @tc.size: MediumTest - * @tc.type: Function - * @tc.level: Level 2 - */ - it("testAdd006", 0, function () { - let queue = new Queue(); - queue.add(null); - let res = queue.getFirst(); - expect(res).assertEqual(null); - }); - - /** - * @tc.number: TEST_ADD_007 - * @tc.name: testAdd007 - * @tc.desc: Add element to Queue instance end. For example: queue.add(undefined). - * @tc.size: MediumTest - * @tc.type: Function - * @tc.level: Level 2 - */ - it("testAdd007", 0, function () { - let queue = new Queue(); - queue.add(undefined); - let res = queue.getFirst(); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_ADD_008 - * @tc.name: testAdd008 - * @tc.desc: Add element to Queue instance end. For example: for (let i = 0; i < 100; i++) { queue.add(i);}. - * @tc.size: MediumTest - * @tc.type: Function - * @tc.level: Level 2 - */ - it("testAdd008", 0, function () { - let queue = new Queue(); - for (let i = 0; i < 100; i++) { - queue.add(i); - } - let res = queue.length; - expect(res).assertEqual(100); - }); - - /** - * @tc.number: TEST_ADD_009 - * @tc.name: testAdd009 - * @tc.desc: Add element to Queue instance end. For example: queue.add.bind({}, 10)(). - * @tc.size: MediumTest - * @tc.type: Function - * @tc.level: Level 2 - */ - it("testAdd009", 0, function () { - let queue = new Queue(); - try { - queue.add.bind({}, 10)(); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200011); - expect(err.message).assertEqual(`The add method cannot be bound`); - } - }); - - /** - * @tc.number: TEST_GET_FIRST_001 - * @tc.name: testGetFirst001 - * @tc.desc: Get the header element of the queue instance. For example: queue.getFirst(). - * @tc.size: MediumTest - * @tc.type: Function - * @tc.level: Level 2 - */ - it("testGetFirst001", 0, function () { - let queue = new Queue(); - queue.add(6); - queue.add("四"); - let res = queue.getFirst(); - expect(res).assertEqual(6); - }); - - /** - * @tc.number: TEST_GET_FIRST_002 - * @tc.name: testGetFirst002 - * @tc.desc: Get the header element of the queue instance. For example: queue.getFirst(). - * @tc.size: MediumTest - * @tc.type: Function - * @tc.level: Level 2 - */ - it("testGetFirst002", 0, function () { - let queue = new Queue(); - let res = queue.getFirst(); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_POP_001 - * @tc.name: testPop001 - * @tc.desc: Delete the header element of a queue instance. For example: queue.pop(). - * @tc.size: MediumTest - * @tc.type: Function - * @tc.level: Level 2 - */ - it("testPop001", 0, function () { - let queue = new Queue(); - queue.add(6); - queue.add("四"); - let res = queue.pop(); - let res1 = queue.getFirst(); - expect(res).assertEqual(6); - expect(res1).assertEqual("四"); - }); - - /** - * @tc.number: TEST_POP_002 - * @tc.name: testPop002 - * @tc.desc: Delete the header element of a queue instance. For example: queue.pop(). - * @tc.size: MediumTest - * @tc.type: Function - * @tc.level: Level 2 - */ - it("testPop002", 0, function () { - let queue = new Queue(); - let res = queue.pop(); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_FOREACH_001 - * @tc.name: testForEach001 - * @tc.desc: Traversing elements in queue instances. For example: queue.forEach((item, index) => {arr.push(item);}). - * @tc.size: MediumTest - * @tc.type: Function - * @tc.level: Level 2 - */ - it("testForEach001", 0, function () { - let queue = new Queue(); - queue.add(8); - queue.add("一"); - queue.add("二"); - queue.add(1); - queue.add(2); - queue.add(3); - queue.add(4); - queue.add(5); - queue.add(6); - let c = ["a", "b", "c", "d"]; - queue.add(c); - let arr = []; - queue.forEach((item, index) => { - arr.push(item); - }); - let a = [8, "一", "二", 1, 2, 3, 4, 5, 6, c]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number: TEST_FOREACH_002 - * @tc.name: testForEach002 - * @tc.desc: Traversing elements in queue instances. For example: queue.forEach((item, index) => {arr.push(item);}). - * @tc.size: MediumTest - * @tc.type: Function - * @tc.level: Level 2 - */ - it("testForEach002", 0, function () { - let queue = new Queue(); - let arr = []; - queue.forEach((item, index) => { - arr.push(item); - }); - expect(arr.length).assertEqual(0); - }); - - /** - * @tc.number: TEST_ITERATOR_001 - * @tc.name: testIterator001 - * @tc.desc: Iterate over all elements in the queue instance. For example: for (let item of queue) { arr.push(item);}. - * @tc.size: MediumTest - * @tc.type: Function - * @tc.level: Level 2 - */ - it("testIterator001", 0, function () { - let queue = new Queue(); - queue.add(8); - queue.add("一"); - queue.add("二"); - queue.add(5); - queue.add(6); - queue.add("三"); - queue.add("四"); - let arr = []; - for (let item of queue) { - arr.push(item); - } - let a = [8, "一", "二", 5, 6, "三", "四"]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number: TEST_ITERATOR_002 - * @tc.name: testIterator002 - * @tc.desc: Iterate over all elements in the queue instance. For example: for (let item of queue) { arr.push(item);}. - * @tc.size: MediumTest - * @tc.type: Function - * @tc.level: Level 2 - */ - it("testIterator002", 0, function () { - let queue = new Queue(); - let arr = []; - for (let item of queue) { - arr.push(item); - } - expect(arr.length).assertEqual(0); - }); - - /** - * @tc.number: TEST_ITERATOR_003 - * @tc.name: testIterator003 - * @tc.desc: Iterate over all elements in the queue instance. For example: queue[Symbol.iterator](). - * @tc.size: MediumTest - * @tc.type: Function - * @tc.level: Level 2 - */ - it("testIterator003", 0, function () { - let queue = new Queue(); - queue.add(8); - queue.add("一"); - queue.add("二"); - queue.add(5); - queue.add(6); - queue.add("三"); - queue.add("四"); - let arr = []; - let size = queue.length; - let itr = queue[Symbol.iterator](); - for (let i = 0; i < size; i++) { - arr.push(itr.next().value); - } - let a = [8, "一", "二", 5, 6, "三", "四"]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.number: TEST_LENGTH_001 - * @tc.name: testLength001 - * @tc.desc: Get the number of elements in the queue instance. For example: queue.length. - * @tc.size: MediumTest - * @tc.type: Function - * @tc.level: Level 0 - */ - it("testLength001", 0, function () { - let queue = new Queue(); - queue.add(8); - queue.add("一"); - queue.add("二"); - queue.add(1); - queue.add(2); - queue.add(3); - queue.add(4); - queue.add(5); - queue.add(6); - let res = queue.length; - expect(9).assertEqual(res); - }); - - /** - * @tc.number: TEST_LENGTH_002 - * @tc.name: testLength002 - * @tc.desc: Get the number of elements in the queue instance. For example: queue.length. - * @tc.size: MediumTest - * @tc.type: Function - * @tc.level: Level 0 - */ - it("testLength001", 0, function () { - let queue = new Queue(); - let res = queue.length; - expect(0).assertEqual(res); - }); -}); -} diff --git a/commonlibrary/crossplatform/commonlibraryqueueetstest/src/main/module.json b/commonlibrary/crossplatform/commonlibraryqueueetstest/src/main/module.json deleted file mode 100755 index 97abf299e..000000000 --- a/commonlibrary/crossplatform/commonlibraryqueueetstest/src/main/module.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "module": { - "name": "entry_test", - "type": "feature", - "description": "$string:module_test_desc", - "mainElement": "TestAbility", - "deviceTypes": [ - "phone" - ], - "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", - "skills": [ - { - "actions": [ - "action.system.home" - ], - "entities": [ - "entity.system.home" - ] - } - ] - } - ] - } -} diff --git a/commonlibrary/crossplatform/commonlibraryqueueetstest/src/main/resources/base/element/color.json b/commonlibrary/crossplatform/commonlibraryqueueetstest/src/main/resources/base/element/color.json deleted file mode 100755 index 3c712962d..000000000 --- a/commonlibrary/crossplatform/commonlibraryqueueetstest/src/main/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/commonlibrary/crossplatform/commonlibraryqueueetstest/src/main/resources/base/element/string.json b/commonlibrary/crossplatform/commonlibraryqueueetstest/src/main/resources/base/element/string.json deleted file mode 100755 index 65d8fa5a7..000000000 --- a/commonlibrary/crossplatform/commonlibraryqueueetstest/src/main/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/commonlibrary/crossplatform/commonlibraryqueueetstest/src/main/resources/base/media/icon.png b/commonlibrary/crossplatform/commonlibraryqueueetstest/src/main/resources/base/media/icon.png deleted file mode 100755 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6BLrPFWk?s;$LOP{GmJpBl$qoSA!PUg~PA65-S00{{S`XKG6NkG0RgjEntPrmV+?0|00mu7;+5 zrdpa{2QLqPJ4Y{j7=M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Otu%0h3J<*LE{ zdCQXV{x0Lc&t2~tedhZ45xiI(eTn9FmW4N2yQa$SzhAxUleKHJjs#!r8Izd!VA&;e zYxwF);tJznTYaA@-hK5#A(RlnJjrJ9R|Zi3Ldw{Gq7J;BbOgY-$G4LV5yX%E?@l8C z6CWEHsnBr#P%H)|Pzit_H3Zdwq9>zbNGi_lnLQ~wPpeqAWXi2}LUjMY>UCF&)*KEk z{?jr=130mF4H)wHBo~VH02St?{9)Ilw#tdEnn!!ux*tjIY+K#t{@dAw4^Osy$#oyu qB&ZVR>K52G0{mEA@W{EBts@1F3suK*W=QiU94XbDI`ihjyZ;4i)?r2f diff --git a/commonlibrary/crossplatform/commonlibrarystacketstest/src/main/ets/TestAbility/TestAbility.ets b/commonlibrary/crossplatform/commonlibrarystacketstest/src/main/ets/TestAbility/TestAbility.ets deleted file mode 100755 index 34e37eb84..000000000 --- a/commonlibrary/crossplatform/commonlibrarystacketstest/src/main/ets/TestAbility/TestAbility.ets +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) 2023 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. - */ -import UIAbility from '@ohos.app.ability.UIAbility'; -import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; -import hilog from '@ohos.hilog'; -import { Hypium } from '@ohos/hypium'; -import testsuite from '../test/List.test'; -import window from '@ohos.window'; - -export default class TestAbility extends UIAbility { - onCreate(want, 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) ?? ''); - var abilityDelegator: any - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var abilityDelegatorArguments: any - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - hilog.info(0x0000, 'testTag', '%{public}s', 'start run testcase!!!'); - Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) - } - - onDestroy() { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onDestroy'); - } - - onWindowStageCreate(windowStage: window.WindowStage) { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageCreate'); - windowStage.loadContent('TestAbility/pages/Index', (err, data) => { - 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. Data: %{public}s', - JSON.stringify(data) ?? ''); - }); - } - - 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/commonlibrary/crossplatform/commonlibrarystacketstest/src/main/ets/TestAbility/pages/Index.ets b/commonlibrary/crossplatform/commonlibrarystacketstest/src/main/ets/TestAbility/pages/Index.ets deleted file mode 100755 index 82eb2048e..000000000 --- a/commonlibrary/crossplatform/commonlibrarystacketstest/src/main/ets/TestAbility/pages/Index.ets +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2023 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. - */ -import hilog from '@ohos.hilog'; - -@Entry -@Component -struct Index { - aboutToAppear() { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility index aboutToAppear'); - } - @State message: string = 'Hello World' - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Button() { - Text('next page') - .fontSize(20) - .fontWeight(FontWeight.Bold) - }.type(ButtonType.Capsule) - .margin({ - top: 20 - }) - .backgroundColor('#0D9FFB') - .width('35%') - .height('5%') - .onClick(()=>{ - }) - } - .width('100%') - } - .height('100%') - } - } \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibrarystacketstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/commonlibrary/crossplatform/commonlibrarystacketstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts deleted file mode 100755 index 92a16d84e..000000000 --- a/commonlibrary/crossplatform/commonlibrarystacketstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts +++ /dev/null @@ -1,49 +0,0 @@ -import hilog from '@ohos.hilog'; -import TestRunner from '@ohos.application.testRunner'; -import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; - -var abilityDelegator = undefined -var abilityDelegatorArguments = undefined - -async function onAbilityCreateCallback() { - hilog.info(0x0000, 'testTag', '%{public}s', 'onAbilityCreateCallback'); -} - -async function addAbilityMonitorCallback(err: any) { - 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() { - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun run'); - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var testAbilityName = abilityDelegatorArguments.bundleName + '.TestAbility' - let lMonitor = { - abilityName: testAbilityName, - onAbilityCreate: onAbilityCreateCallback, - }; - abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) - var cmd = 'aa start -d 0 -a TestAbility' + ' -b ' + abilityDelegatorArguments.bundleName - var debug = abilityDelegatorArguments.parameters['-D'] - if (debug == 'true') - { - cmd += ' -D' - } - hilog.info(0x0000, 'testTag', 'cmd : %{public}s', cmd); - abilityDelegator.executeShellCommand(cmd, - (err: any, d: any) => { - hilog.info(0x0000, 'testTag', 'executeShellCommand : err : %{public}s', JSON.stringify(err) ?? ''); - hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.stdResult ?? ''); - hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.exitCode ?? ''); - }) - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun end'); - } -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibrarystacketstest/src/main/ets/test/List.test.ets b/commonlibrary/crossplatform/commonlibrarystacketstest/src/main/ets/test/List.test.ets deleted file mode 100755 index 797d4a8f7..000000000 --- a/commonlibrary/crossplatform/commonlibrarystacketstest/src/main/ets/test/List.test.ets +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (c) 2023 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. - */ -import StackTest from './Stack.test' - -export default function testsuite() { - StackTest() -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibrarystacketstest/src/main/ets/test/Stack.test.ets b/commonlibrary/crossplatform/commonlibrarystacketstest/src/main/ets/test/Stack.test.ets deleted file mode 100755 index 1a344537e..000000000 --- a/commonlibrary/crossplatform/commonlibrarystacketstest/src/main/ets/test/Stack.test.ets +++ /dev/null @@ -1,532 +0,0 @@ -/* - * Copyright (c) 2023 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. - */ -import Stack from "@ohos.util.Stack"; -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' -export default function StackTest() { -describe("StackTest", function () { - - /** - * @tc.name: testConstructor001 - * @tc.desc: Create an Stack instance. For example: let stack = new Stack(). - */ - it("testConstructor001", 0, function () { - try { - let stack = new Stack(); - expect(stack != undefined).assertEqual(true); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200012); - expect(err.message).assertEqual("The Stack's constructor cannot be directly invoked"); - } - }); - - /** - * @tc.name: testPush002 - * @tc.desc: Insert element at top of stack.For example: stack.push("四"). - */ - it("testPush002", 0, function () { - let stack = new Stack(); - stack.push("四"); - let res = stack.peek(); - expect(res).assertEqual("四"); - }); - - /** - * @tc.name: testPush003 - * @tc.desc: Insert element at top of stack.For example: stack.push(8). - */ - it("testPush003", 0, function () { - let stack = new Stack(); - stack.push(8); - let res = stack.peek(); - expect(res).assertEqual(8); - }); - - /** - * @tc.name: testPush004 - * @tc.desc: Insert element at top of stack.For example: let a = {name: "lala", age: "13岁"}; stack.push(a). - */ - it("testPush004", 0, function () { - let stack = new Stack(); - let a = {name: "lala", age: "13岁"}; - stack.push(a); - let res = stack.peek(); - expect(res).assertEqual(a); - }); - - /** - * @tc.name: testPush005 - * @tc.desc: Insert element at top of stack.For example: let a = [1, 2, 3, 4]; stack.push(a). - */ - it("testPush005", 0, function () { - let stack = new Stack(); - let a = [1, 2, 3, 4]; - stack.push(a); - let res = stack.peek(); - expect(res).assertEqual(a); - }); - - /** - * @tc.name: testPeek006 - * @tc.desc: Get stack top element. For example: stack.peek(). - */ - it("testPeek006", 0, function () { - let stack = new Stack(); - let a = [1, 2, 3, 4]; - stack.push(a); - stack.push("A"); - stack.push("B"); - stack.push(1); - let res = stack.peek(); - expect(res).assertEqual(1); - }); - - /** - * @tc.name: testLocate007 - * @tc.desc: Get the index corresponding to the element in the stack. For example: stack.locate("A"). - */ - it("testLocate007", 0, function () { - let stack = new Stack(); - let a = [1, 2, 3, 4]; - stack.push(8); - stack.push(a); - stack.push("A"); - stack.push("B"); - stack.push(1); - let res = stack.locate("A"); - let res1 = stack.locate("C"); - expect(res).assertEqual(2); - expect(res1).assertEqual(-1); - }); - - /** - * @tc.name: testPop008 - * @tc.desc: Delete top of stack element. For example: stack.pop(). - */ - it("testPop008", 0, function () { - let stack = new Stack(); - stack.push("B"); - stack.push(1); - let res = stack.pop(); - let res1 = stack.peek(); - expect(res).assertEqual(1); - expect(res1).assertEqual("B"); - }); - - /** - * @tc.name: testForEach009 - * @tc.desc: Traversing elements in stack instances. For example: stack.forEach((item, index) => {arr.push(item);}). - */ - it("testForEach009", 0, function () { - let stack = new Stack(); - stack.push(8); - stack.push("三"); - stack.push(5); - let c = {name: "lili", age: "13"}; - stack.push(c); - stack.push(6); - stack.push("四"); - let arr = []; - stack.forEach((item, index) => { - arr.push(item); - }); - let a = [8, "三", 5, c, 6, "四"]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.name: testIterator010 - * @tc.desc: Iterate over all elements in the stack instance. For example: for (let item of stack) {arr.push(item);}. - */ - it("testIterator010", 0, function () { - let stack = new Stack(); - stack.push(8); - stack.push("一"); - stack.push("二"); - stack.push(5); - let c = [1, 2, 3, 4]; - stack.push(c); - stack.push(6); - stack.push("三"); - stack.push("四"); - let arr = []; - for (let item of stack) { - arr.push(item); - } - let a = [8, "一", "二", 5, c, 6, "三", "四"]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.name: testLength011 - * @tc.desc: Get the number of elements in the stack instance. For example: stack.length. - */ - it("testLength011", 0, function () { - let stack = new Stack(); - stack.push(8); - stack.push("一"); - stack.push("二"); - stack.push(5); - let res = stack.length; - expect(4).assertEqual(res); - }); - - /** - * @tc.name: testLength012 - * @tc.desc: Get the number of elements in the stack instance. For example: stack.length. - */ - it("testLength012", 0, function () { - let stack = new Stack(); - let res = stack.length; - expect(0).assertEqual(res); - }); - - /** - * @tc.name: testIsEmpty013 - * @tc.desc: Determine whether the Stack instance is empty. For example: stack.isEmpty(). - */ - it("testIsEmpty013", 0, function () { - let stack = new Stack(); - stack.push(8); - stack.push("一"); - stack.push("二"); - stack.push(5); - let res = stack.isEmpty(); - expect(res).assertEqual(false); - }); - - /** - * @tc.name: testIsEmpty014 - * @tc.desc: Determine whether the Stack instance is empty. For example: stack.isEmpty(). - */ - it("testIsEmpty014", 0, function () { - let stack = new Stack(); - let res = stack.isEmpty(); - expect(res).assertEqual(true); - }); - - /** - * @tc.name: testPush015 - * @tc.desc: Insert element at top of stack.For example: stack.push("你好世界"). - */ - it("testPush015", 0, function () { - let stack = new Stack(); - stack.push("你好世界"); - let res = stack.peek(); - expect(res).assertEqual("你好世界"); - }); - - /** - * @tc.name: testPush016 - * @tc.desc: Insert element at top of stack.For example: stack.push(1234). - */ - it("testPush016", 0, function () { - let stack = new Stack(); - stack.push(1234); - let res = stack.peek(); - expect(res).assertEqual(1234); - }); - - /** - * @tc.name: testPush017 - * @tc.desc: Insert element at top of stack.For example: stack.push(1.234). - */ - it("testPush017", 0, function () { - let stack = new Stack(); - stack.push(1.234); - let res = stack.peek(); - expect(res).assertEqual(1.234); - }); - - /** - * @tc.name: testPush018 - * @tc.desc: Insert element at top of stack.For example: stack.push(-1234). - */ - it("testPush018", 0, function () { - let stack = new Stack(); - stack.push(-1234); - let res = stack.peek(); - expect(res).assertEqual(-1234); - }); - - /** - * @tc.name: testPush019 - * @tc.desc: Insert element at top of stack.For example: stack.push(0). - */ - it("testPush019", 0, function () { - let stack = new Stack(); - stack.push(0); - let res = stack.peek(); - expect(res).assertEqual(0); - }); - - /** - * @tc.name: testPush020 - * @tc.desc: Insert element at top of stack.For example: stack.push("*"). - */ - it("testPush020", 0, function () { - let stack = new Stack(); - stack.push(10); - stack.push(3.14); - stack.push(-2); - stack.push("AB"); - stack.push("*"); - let res = stack.peek(); - expect(res).assertEqual("*"); - }); - - /** - * @tc.name: testPush021 - * @tc.desc: Insert element at top of stack.For example: let arr = {}; stack.push(arr). - */ - it("testPush021", 0, function () { - let stack = new Stack(); - let arr = {}; - stack.push(arr); - let res = stack.peek(); - expect(res).assertEqual(arr); - }); - - /** - * @tc.name: testPush022 - * @tc.desc: Insert element at top of stack.For example: let arr = []; stack.push(arr). - */ - it("testPush022", 0, function () { - let stack = new Stack(); - let arr = []; - stack.push(arr); - let res = stack.peek(); - expect(res).assertEqual(arr); - }); - - /** - * @tc.name: testPush023 - * @tc.desc: Insert element at top of stack.For example: stack.push("hello world"). - */ - it("testPush023", 0, function () { - let stack = new Stack(); - stack.push("hello world"); - let res = stack.peek(); - expect(res).assertEqual("hello world"); - }); - - /** - * @tc.name: testPush024 - * @tc.desc: Insert element at top of stack. - */ - it("testPush024", 0, function () { - let stack = new Stack(); - stack.push("~!@#$^&*()_+-*/=.?<>:;|{}[]"); - let res = stack.peek(); - expect(res).assertEqual("~!@#$^&*()_+-*/=.?<>:;|{}[]"); - }); - - /** - * @tc.name: testPush025 - * @tc.desc: Insert element at top of stack. For example: stack.push(""). - */ - it("testPush025", 0, function () { - let stack = new Stack(); - stack.push(""); - let res = stack.peek(); - expect(res).assertEqual(""); - }); - - /** - * @tc.name: testPush026 - * @tc.desc: Insert element at top of stack. For example: stack.push(true). - */ - it("testPush026", 0, function () { - let stack = new Stack(); - stack.push(true); - let res = stack.peek(); - expect(res).assertEqual(true); - }); - - /** - * @tc.name: testPush027 - * @tc.desc: Insert element at top of stack. For example: stack.push(false). - */ - it("testPush027", 0, function () { - let stack = new Stack(); - stack.push(false); - let res = stack.peek(); - expect(res).assertEqual(false); - }); - - /** - * @tc.name: testPush028 - * @tc.desc: Insert element at top of stack. For example: stack.push(null). - */ - it("testPush028", 0, function () { - let stack = new Stack(); - stack.push(null); - let res = stack.peek(); - expect(res).assertEqual(null); - }); - - /** - * @tc.name: testPush029 - * @tc.desc: Insert element at top of stack. For example: stack.push(undefined). - */ - it("testPush029", 0, function () { - let stack = new Stack(); - stack.push(undefined); - let res = stack.peek(); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.name: testPeek030 - * @tc.desc: Get stack top element. For example: stack.peek(). - */ - it("testPeek030", 0, function () { - let stack = new Stack(); - let res = stack.peek(); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.name: testPop031 - * @tc.desc: Delete top of stack element. For example: stack.pop(). - */ - it("testPop031", 0, function () { - let stack = new Stack(); - let res = stack.pop(); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.name: testForEach032 - * @tc.desc: Traversing elements in stack instances. For example: stack.forEach((item, index) => {arr.push(item);}). - */ - it("testForEach032", 0, function () { - let stack = new Stack(); - let arr = []; - stack.forEach((item, index) => { - arr.push(item); - }); - expect(arr.length).assertEqual(0); - }); - - /** - * @tc.name: testIterator033 - * @tc.desc: Iterate over all elements in the stack instance. For example: for (let item of stack) {arr.push(item);}. - */ - it("testIterator033", 0, function () { - let stack = new Stack(); - let arr = []; - for (let item of stack) { - arr.push(item); - } - expect(arr.length).assertEqual(0); - }); - - /** - * @tc.name: testPush034 - * @tc.desc: Insert element at top of stack. For example: for (let i = 0; i < 1000; i++) {stack.push(i);}. - */ - it("testPush034", 0, function () { - let stack = new Stack(); - for (let i = 0; i < 1000; i++) { - stack.push(i); - } - let res = stack.length; - expect(res).assertEqual(1000); - let res1 = stack.peek(); - expect(res1).assertEqual(999); - }); - - /** - * @tc.name: testIterator035 - * @tc.desc: Iterate over all elements in the stack instance. For example: stack[Symbol.iterator](). - */ - it("testIterator035", 0, function () { - let stack = new Stack(); - stack.push(8); - stack.push("一"); - stack.push("二"); - stack.push(5); - let c = [1, 2, 3, 4]; - stack.push(c); - stack.push(6); - stack.push("三"); - stack.push("四"); - let arr = []; - let itr = stack[Symbol.iterator](); - let tmp = undefined; - do { - tmp = itr.next().value; - arr.push(tmp); - } while (tmp != undefined); - let a = [8, "一", "二", 5, c, 6, "三", "四"]; - for (let i = 0; i < a.length; i++) { - expect(arr[i]).assertEqual(a[i]); - } - }); - - /** - * @tc.name: testPush036 - * @tc.desc: Insert element at top of stack. For example: stack.push.bind({}, 10)(). - */ - it("testPush036 ", 0, function () { - let stack = new Stack(); - try { - stack.push.bind({}, 10)(); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200011); - expect(err.message).assertEqual(`The push method cannot be bound`); - } - }); - - /** - * @tc.name: testIsEmpty037 - * @tc.desc: Determine whether the Stack instance is empty. For example: stack.isEmpty.bind({}, "a")(). - */ - it('testIsEmpty037', 0, function () { - let stack = new Stack(); - try { - stack.isEmpty.bind({}, "a")(); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200011); - expect(err.message).assertEqual(`The isEmpty method cannot be bound`); - } - }); - - /** - * @tc.name: testPop038 - * @tc.desc: Delete top of stack element. For example: stack.pop.bind({}, "a")(). - */ - it('testPop038', 0, function () { - let stack = new Stack(); - try { - stack.pop.bind({}, "a")(); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200011); - expect(err.message).assertEqual(`The pop method cannot be bound`); - } - }); -}); -} diff --git a/commonlibrary/crossplatform/commonlibrarystacketstest/src/main/module.json b/commonlibrary/crossplatform/commonlibrarystacketstest/src/main/module.json deleted file mode 100755 index 97abf299e..000000000 --- a/commonlibrary/crossplatform/commonlibrarystacketstest/src/main/module.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "module": { - "name": "entry_test", - "type": "feature", - "description": "$string:module_test_desc", - "mainElement": "TestAbility", - "deviceTypes": [ - "phone" - ], - "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", - "skills": [ - { - "actions": [ - "action.system.home" - ], - "entities": [ - "entity.system.home" - ] - } - ] - } - ] - } -} diff --git a/commonlibrary/crossplatform/commonlibrarystacketstest/src/main/resources/base/element/color.json b/commonlibrary/crossplatform/commonlibrarystacketstest/src/main/resources/base/element/color.json deleted file mode 100755 index 3c712962d..000000000 --- a/commonlibrary/crossplatform/commonlibrarystacketstest/src/main/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/commonlibrary/crossplatform/commonlibrarystacketstest/src/main/resources/base/element/string.json b/commonlibrary/crossplatform/commonlibrarystacketstest/src/main/resources/base/element/string.json deleted file mode 100755 index 65d8fa5a7..000000000 --- a/commonlibrary/crossplatform/commonlibrarystacketstest/src/main/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/commonlibrary/crossplatform/commonlibrarystacketstest/src/main/resources/base/media/icon.png b/commonlibrary/crossplatform/commonlibrarystacketstest/src/main/resources/base/media/icon.png deleted file mode 100755 index ce307a8827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?!J{b_S19kh<|p2KqwB|R*mk?QIqUYBmPyU`-du2C=EQr~j$dANUt-(h z0{9?tdL~Ey4~{)k+yw6`>nw`grHeETAb?jXBl|`N` zQ;*Jesd>p5U#I?`XRmdR{OsDf;hb1?4WZbbC80J;=TymqgH;`$tX-RRH1KNosQ9>t zZ(TI54E3zSuh4d8rT2vFy;slYLvbF=k!&`1YXEgGq>TM1>c9(1s~?Phd_hSQK-}2> zt~ER`?y-@U3}teMVj(Ev4n(N1SXNXG3Z9G#A+a#GjW>Pk*8y~)T6t;6Hniyqv!&r1@6XkenvA3`ckf$scly%SoC;u{ vb7nRF*q`~i=w3r{Mn`(~t { - 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. Data: %{public}s', - JSON.stringify(data) ?? ''); - }); - } - - 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/commonlibrary/crossplatform/commonlibrarytaskpooletstest/src/main/ets/TestAbility/pages/Index.ets b/commonlibrary/crossplatform/commonlibrarytaskpooletstest/src/main/ets/TestAbility/pages/Index.ets deleted file mode 100755 index 82eb2048e..000000000 --- a/commonlibrary/crossplatform/commonlibrarytaskpooletstest/src/main/ets/TestAbility/pages/Index.ets +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2023 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. - */ -import hilog from '@ohos.hilog'; - -@Entry -@Component -struct Index { - aboutToAppear() { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility index aboutToAppear'); - } - @State message: string = 'Hello World' - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Button() { - Text('next page') - .fontSize(20) - .fontWeight(FontWeight.Bold) - }.type(ButtonType.Capsule) - .margin({ - top: 20 - }) - .backgroundColor('#0D9FFB') - .width('35%') - .height('5%') - .onClick(()=>{ - }) - } - .width('100%') - } - .height('100%') - } - } \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibrarytaskpooletstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/commonlibrary/crossplatform/commonlibrarytaskpooletstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts deleted file mode 100755 index 92a16d84e..000000000 --- a/commonlibrary/crossplatform/commonlibrarytaskpooletstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts +++ /dev/null @@ -1,49 +0,0 @@ -import hilog from '@ohos.hilog'; -import TestRunner from '@ohos.application.testRunner'; -import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; - -var abilityDelegator = undefined -var abilityDelegatorArguments = undefined - -async function onAbilityCreateCallback() { - hilog.info(0x0000, 'testTag', '%{public}s', 'onAbilityCreateCallback'); -} - -async function addAbilityMonitorCallback(err: any) { - 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() { - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun run'); - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var testAbilityName = abilityDelegatorArguments.bundleName + '.TestAbility' - let lMonitor = { - abilityName: testAbilityName, - onAbilityCreate: onAbilityCreateCallback, - }; - abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) - var cmd = 'aa start -d 0 -a TestAbility' + ' -b ' + abilityDelegatorArguments.bundleName - var debug = abilityDelegatorArguments.parameters['-D'] - if (debug == 'true') - { - cmd += ' -D' - } - hilog.info(0x0000, 'testTag', 'cmd : %{public}s', cmd); - abilityDelegator.executeShellCommand(cmd, - (err: any, d: any) => { - hilog.info(0x0000, 'testTag', 'executeShellCommand : err : %{public}s', JSON.stringify(err) ?? ''); - hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.stdResult ?? ''); - hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.exitCode ?? ''); - }) - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun end'); - } -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibrarytaskpooletstest/src/main/ets/test/List.test.ets b/commonlibrary/crossplatform/commonlibrarytaskpooletstest/src/main/ets/test/List.test.ets deleted file mode 100755 index 84952315b..000000000 --- a/commonlibrary/crossplatform/commonlibrarytaskpooletstest/src/main/ets/test/List.test.ets +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (c) 2023 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. - */ -import TaskPoolTest from './Taskpool.test' - -export default function testsuite() { - TaskPoolTest() -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibrarytaskpooletstest/src/main/ets/test/Taskpool.test.ets b/commonlibrary/crossplatform/commonlibrarytaskpooletstest/src/main/ets/test/Taskpool.test.ets deleted file mode 100755 index c5146b141..000000000 --- a/commonlibrary/crossplatform/commonlibrarytaskpooletstest/src/main/ets/test/Taskpool.test.ets +++ /dev/null @@ -1,1772 +0,0 @@ -/* - * Copyright (c) 2023 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. - */ -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from '@ohos/hypium' -import taskpool from '@ohos.taskpool' -import List from '@ohos.util.List' -export default function TaskPoolTest() { - describe('TaskPoolTest', function () { - // Defines a test suite. Two parameters are supported: test suite name and test suite function. - - function promiseCase() { - let p = new Promise(function (resolve, reject) { - setTimeout(function () { - resolve() - }, 100) - }).then(undefined, (error) => { - }) - return p - } - - /** - * @tc.number : TEST_TASK_CONSTRUCTOR_001 - * @tc.name : testTaskConstructor001 - * @tc.desc : Create a Task instance. For example: let task = new taskpool.Task(function, args). - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskConstructor001', 0, async function (done) { - function Sum(value1, value2) { - "use concurrent" - return value1 + value2; - } - var task = new taskpool.Task(Sum, 10,20); - var result = await taskpool.execute(task); - expect(result).assertEqual(30); - done(); - }) - - /** - * @tc.number : TEST_TASK_CONSTRUCTOR_002 - * @tc.name : testTaskConstructor001 - * @tc.desc : Create a Task instance. For example: let task = new taskpool.Task(function, args). - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskConstructor002', 0, async function (done) { - function Sum(value1, value2) { - "use concurrent" - return value1 + value2; - } - var task = new taskpool.Task(Sum, 10); - var result = await taskpool.execute(task); - expect(result.toString()).assertEqual("NaN"); - done(); - }) - - /** - * @tc.number : TEST_TASK_CONSTRUCTOR_003 - * @tc.name : testTaskConstructor003 - * @tc.desc : Create a Task instance. For example: let task = new taskpool.Task(function, args). - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskConstructor003', 0, async function (done) { - function Sum(value1, value2) { - "use concurrent" - return value1 + value2; - } - var task = new taskpool.Task(Sum, 10,20,30); - var result = await taskpool.execute(task); - expect(result).assertEqual(30); - done(); - }) - - /** - * @tc.number : TEST_TASK_SET_TRANSFER_LIST_001 - * @tc.name : testTaskSetTransferList001 - * @tc.desc : To test Task SetTransferLis - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskSetTransferList001', 0, async function (done) { - let buffer = new ArrayBuffer(8); - let view = new Uint8Array(buffer); - let buffer1 = new ArrayBuffer(16); - let view1 = new Uint8Array(buffer1); - - function testTransfer(arg1, arg2) { - "use concurrent" - return arg1.byteLength + arg2.byteLength; - } - let task = new taskpool.Task(testTransfer, view, view1); - task.setTransferList([view.buffer, view1.buffer]); - taskpool.execute(task).then((res)=>{ - expect(res).assertEqual(24); - }); - done(); - }) - - /** - * @tc.number : TEST_TASK_GROUP_CONSTRUCTOR_001 - * @tc.name : testTaskGroupConstructor001 - * @tc.desc : Create a TaskGroup instance - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskGroupConstructor001', 0, async function (done) { - try { - let taskgroup = new taskpool.TaskGroup(); - expect(taskgroup != undefined).assertEqual(true); - done(); - } catch (err) { - expect(err.name).assertEqual("TypeError"); - expect(err.code).assertEqual(undefined); - expect(err.message).assertEqual("Constructor is false"); - } - }) - - /** - * @tc.number : TEST_TASK_GROUP_ADD_TASK_001 - * @tc.name : testTaskGroupAddTask001 - * @tc.desc : To test TaskGroup function addTask - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskGroupAddTask001', 0, async function (done) { - function Sum(value1, value2) { - "use concurrent" - return value1 + value2; - } - let task1 = new taskpool.Task(Sum,10,20); - let task2 = new taskpool.Task(Sum,10,20); - let task3 = new taskpool.Task(Sum,10,20); - let taskgroup = new taskpool.TaskGroup(); - taskgroup.addTask(task1); - taskgroup.addTask(task2); - taskgroup.addTask(task3); - done(); - }) - - /** - * @tc.number : TEST_TASK_GROUP_ADD_TASK_002 - * @tc.name : testTaskGroupAddTask002 - * @tc.desc : To test TaskGroup function addTask - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskGroupAddTask002', 0, async function (done) { - function Sum(value1, value2) { - "use concurrent" - return value1 + value2; - } - let taskgroup = new taskpool.TaskGroup(); - taskgroup.addTask(Sum,10,20); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_001 - * @tc.name : testTaskPoolExecute001 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute001', 0, async function (done) { - function Sum(value1, value2) { - "use concurrent" - return value1 + value2; - } - var result = await taskpool.execute(Sum, 10, 20); - expect(result).assertEqual(30); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_002 - * @tc.name : testTaskPoolExecute002 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute002', 0, async function (done) { - function Add(value1, value2) { - "use concurrent" - if (value1 & value2) - return true; - else - return false; - } - var result = await taskpool.execute(Add, true, true); - expect(result).assertEqual(true); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_003 - * @tc.name : testTaskPoolExecute003 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute003', 0, async function (done) { - function StrCat(value1, value2) { - "use concurrent" - return value1 + value2; - } - var result = await taskpool.execute(StrCat, "abc", "def"); - expect(result).assertEqual("abcdef"); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_004 - * @tc.name : testTaskPoolExecute004 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute004', 0, async function (done) { - function StrCat(value1, value2) { - "use concurrent" - return value1 + value2; - } - var result = await taskpool.execute(StrCat, "abc", "def"); - result = await taskpool.execute(StrCat, "abc", "def"); - expect(result).assertEqual("abcdef"); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_005 - * @tc.name : testTaskPoolExecute002 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute005', 0, async function (done) { - function Sum(value1, value2) { - "use concurrent" - function StrCat(value1, value2) { - return value1 + value2; - } - return value1+StrCat(value2,"hello"); - } - var result = await taskpool.execute(Sum, "abc", "def"); - expect(result).assertEqual("abcdefhello"); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_006 - * @tc.name : testTaskPoolExecute006 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute006', 0, async function (done) { - function Sum(arg1, arg2) { - "use concurrent" - let value = []; - value[0] = arg1[0] + arg2[0]; - value[1] = arg1[1] + arg2[1]; - return value; - } - var result = await taskpool.execute(Sum, [1,2], [3,4]); - expect(result[0]).assertEqual(4); - expect(result[1]).assertEqual(6); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_007 - * @tc.name : testTaskPoolExecute007 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute007', 0, async function (done) { - function Sum(arg1, arg2) { - "use concurrent" - let value = arg1; - value.a = arg1.a + arg2.a; - value.b = arg1.b + arg2.b; - return value; - } - var result = await taskpool.execute(Sum, {"a": 1, "b" : 2}, {"a": 3, "b" : 4}); - expect(JSON.stringify(result)).assertEqual("{\"a\":4,\"b\":6}"); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_008 - * @tc.name : testTaskPoolExecute008 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute008', 0, async function (done) { - function Sum(value1, value2) { - "use concurrent" - return value1 + value2; - } - var result = await taskpool.execute(Sum, 10); - expect(result.toString()).assertEqual("NaN"); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_009 - * @tc.name : testTaskPoolExecute009 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute009', 0, async function (done) { - function Sum(value1, value2) { - "use concurrent" - return value1 + value2; - } - var result = await taskpool.execute(Sum, 10, 20, 30); - expect(result).assertEqual(30); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_010 - * @tc.name : testTaskPoolExecute010 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute010', 0, async function (done) { - function Sum(value1, value2) { - "use concurrent" - return value1 + value2; - } - var result1 = await taskpool.execute(Sum, 10, 20); - var result2 = await taskpool.execute(Sum, 30, 40); - expect(result1).assertEqual(30); - expect(result2).assertEqual(70); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_011 - * @tc.name : testTaskPoolExecute011 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute011', 0, async function (done) { - function Sum(value1, value2) { - "use concurrent" - return value1 + value2; - } - var result1 = await taskpool.execute(Sum, 10, 20); - var result2 = await taskpool.execute(Sum, 10, 20); - expect(result1).assertEqual(30); - expect(result2).assertEqual(30); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_012 - * @tc.name : testTaskPoolExecute012 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute012', 0, async function (done) { - function Sum(value1, value2) { - "use concurrent" - return value1 + value2; - } - function Multi(value1, value2) { - "use concurrent" - return value1 * value2; - } - var result1 = await taskpool.execute(Sum, 10, 20); - var result2 = await taskpool.execute(Multi, 10, 20); - var result3 = await taskpool.execute(Sum, 10, 30); - var result4 = await taskpool.execute(Multi, 20, 20); - expect(result1).assertEqual(30); - expect(result2).assertEqual(200); - expect(result3).assertEqual(40); - expect(result4).assertEqual(400); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_013 - * @tc.name : testTaskPoolExecute013 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute013', 0, async function (done) { - function Sum(value1, value2) { - "use concurrent" - return value1 + value2; - } - var task = new taskpool.Task(Sum, 10, 20); - var result = await taskpool.execute(task); - expect(result).assertEqual(30); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_014 - * @tc.name : testTaskPoolExecute014 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute014', 0, async function (done) { - function Add(value1, value2) { - "use concurrent" - if (value1 & value2) - return true; - else - return false; - } - var task = new taskpool.Task(Add, true, true); - var result = await taskpool.execute(task); - expect(result).assertEqual(true); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_015 - * @tc.name : testTaskPoolExecute015 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute015', 0, async function (done) { - function StrCat(value1, value2) { - "use concurrent" - return value1 + value2; - } - var task = new taskpool.Task(StrCat, "abc", "def"); - var result = await taskpool.execute(task); - expect(result).assertEqual("abcdef"); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_016 - * @tc.name : testTaskPoolExecute016 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute016', 0, async function (done) { - function Sum(value1, value2) { - "use concurrent" - function StrCat(value1, value2) { - return value1 + value2; - } - return value1+StrCat(value2,"hello"); - } - var task = new taskpool.Task(Sum, "abc", "def"); - var result = await taskpool.execute(task); - expect(result).assertEqual("abcdefhello"); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_017 - * @tc.name : testTaskPoolExecute017 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute017', 0, async function (done) { - function Sum(arg1, arg2) { - "use concurrent" - let value = []; - value[0] = arg1[0] + arg2[0]; - value[1] = arg1[1] + arg2[1]; - return value; - } - var task = new taskpool.Task(Sum, [1,2], [3,4]); - var result = await taskpool.execute(task); - expect(result[0]).assertEqual(4); - expect(result[1]).assertEqual(6); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_018 - * @tc.name : testTaskPoolExecute018 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute018', 0, async function (done) { - function Sum(arg1, arg2) { - "use concurrent" - let value = arg1; - value.a = arg1.a + arg2.a; - value.b = arg1.b + arg2.b; - return value; - } - var task = new taskpool.Task(Sum, {"a": 1, "b" : 2}, {"a": 3, "b" : 4}); - var result = await taskpool.execute(task); - expect(JSON.stringify(result)).assertEqual("{\"a\":4,\"b\":6}"); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_019 - * @tc.name : testTaskPoolExecute019 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute019', 0, async function (done) { - function Sum(value1, value2) { - "use concurrent" - return value1 + value2; - } - var task = new taskpool.Task(Sum, 10); - var result = await taskpool.execute(task); - expect(result.toString()).assertEqual("NaN"); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_020 - * @tc.name : testTaskPoolExecute020 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute020', 0, async function (done) { - function Sum(value1, value2) { - "use concurrent" - return value1 + value2; - } - var task = new taskpool.Task(Sum, 10, 20, 30); - var result = await taskpool.execute(task); - expect(result).assertEqual(30); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_021 - * @tc.name : testTaskPoolExecute021 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute021', 0, async function (done) { - function Sum(value1, value2) { - "use concurrent" - return value1 + value2; - } - var task = new taskpool.Task(Sum, 10, 20); - var result1 = await taskpool.execute(task); - var result2 = await taskpool.execute(task); - expect(result1).assertEqual(30); - expect(result2).assertEqual(30); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_022 - * @tc.name : testTaskPoolExecute022 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute022', 0, async function (done) { - function Sum(value1, value2) { - "use concurrent" - return value1 + value2; - } - var task1 = new taskpool.Task(Sum, 10, 20); - var task2 = new taskpool.Task(Sum, 30, 40); - var result1 = await taskpool.execute(task1); - var result2 = await taskpool.execute(task2); - expect(result1).assertEqual(30); - expect(result2).assertEqual(70); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_023 - * @tc.name : testTaskPoolExecute023 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute023', 0, async function (done) { - function Sum(value1, value2) { - "use concurrent" - return value1 + value2; - } - var task1 = new taskpool.Task(Sum, 10, 20); - var task2 = new taskpool.Task(Sum, 10, 20); - var result1 = await taskpool.execute(task1); - var result2 = await taskpool.execute(task2); - expect(result1).assertEqual(30); - expect(result2).assertEqual(30); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_024 - * @tc.name : testTaskPoolExecute024 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute024', 0, async function (done) { - function Sum(value1, value2) { - "use concurrent" - return value1 + value2; - } - function Multi(value1, value2) { - "use concurrent" - return value1 * value2; - } - var task1 = new taskpool.Task(Sum, 10, 20); - var result1 = await taskpool.execute(task1); - var task2 = new taskpool.Task(Multi, 10, 20); - var result2 = await taskpool.execute(task2); - var task3 = new taskpool.Task(Sum, 10, 30); - var result3 = await taskpool.execute(task3); - var task4 = new taskpool.Task(Multi, 20, 20); - var result4 = await taskpool.execute(task4); - expect(result1).assertEqual(30); - expect(result2).assertEqual(200); - expect(result3).assertEqual(40); - expect(result4).assertEqual(400); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_025 - * @tc.name : testTaskPoolExecute025 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute025', 0, async function (done) { - function Sum(value1, value2) { - "use concurrent" - return value1 + value2; - } - var result; - var isTerminate = false; - var task = new taskpool.Task(Sum, 10, 20) - taskpool.execute(task).then((ret) => { - result = ret; - isTerminate = true; - }) - while (!isTerminate) { - await promiseCase() - } - expect(result).assertEqual(30); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_026 - * @tc.name : testTaskPoolExecute026 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute026', 0, async function (done) { - function Add(value1, value2) { - "use concurrent" - if (value1 & value2) - return true; - else - return false; - } - var task = new taskpool.Task(Add, true, true) - var isTerminate = false; - var result; - taskpool.execute(task).then((ret) => { - isTerminate = true; - result = ret; - }); - - while (!isTerminate) { - await promiseCase(); - } - - expect(result).assertEqual(true); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_027 - * @tc.name : testTaskPoolExecute027 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute027', 0, async function (done) { - function StrCat(value1, value2) { - "use concurrent" - return value1 + value2; - } - var task = new taskpool.Task(StrCat, "abc", "def") - var result; - var isTerminate = false; - taskpool.execute(task).then((ret) => { - result = ret; - isTerminate = true; - }) - while (!isTerminate) { - await promiseCase() - } - expect(result).assertEqual("abcdef"); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_028 - * @tc.name : testTaskPoolExecute028 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute028', 0, async function (done) { - function Sum(value1, value2) { - "use concurrent" - function StrCat(value1, value2) { - return value1 + value2; - } - return value1+StrCat(value2,"hello"); - } - var task = new taskpool.Task(Sum, "abc", "def"); - var result; - var isTerminate = false; - taskpool.execute(task).then((ret) => { - result = ret; - isTerminate = true; - }) - while (!isTerminate) { - await promiseCase() - } - expect(result).assertEqual("abcdefhello"); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_029 - * @tc.name : testTaskPoolExecute029 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute029', 0, async function (done) { - function Sum(arg1, arg2) { - "use concurrent" - let value = []; - value[0] = arg1[0] + arg2[0]; - value[1] = arg1[1] + arg2[1]; - return value; - } - var task = new taskpool.Task(Sum, [1,2], [3,4]); - var result; - var isTerminate = false; - taskpool.execute(task).then((ret) => { - result = ret; - isTerminate = true; - }) - while (!isTerminate) { - await promiseCase() - } - expect(result[0]).assertEqual(4); - expect(result[1]).assertEqual(6); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_030 - * @tc.name : testTaskPoolExecute030 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute030', 0, async function (done) { - function Sum(arg1, arg2) { - "use concurrent" - let value = arg1; - value.a = arg1.a + arg2.a; - value.b = arg1.b + arg2.b; - return value; - } - var task = new taskpool.Task(Sum, {"a": 1, "b" : 2}, {"a": 3, "b" : 4}); - var result; - var isTerminate = false; - taskpool.execute(task).then((ret) => { - result = ret; - isTerminate = true; - }) - while (!isTerminate) { - await promiseCase() - } - expect(JSON.stringify(result)).assertEqual("{\"a\":4,\"b\":6}"); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_031 - * @tc.name : testTaskPoolExecute031 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('TaskPoolTestClass031', 0, async function (done) { - function Sum(value1, value2) { - "use concurrent" - return value1 + value2; - } - var task = new taskpool.Task(Sum, 10); - var result; - var isTerminate = false; - taskpool.execute(task).then((ret) => { - result = ret; - isTerminate = true; - }) - while (!isTerminate) { - await promiseCase() - } - expect(result.toString()).assertEqual("NaN"); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_032 - * @tc.name : testTaskPoolExecute032 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute032', 0, async function (done) { - function Sum(value1, value2) { - "use concurrent" - return value1 + value2; - } - var task = new taskpool.Task(Sum, 10, 20, 30); - var result; - var isTerminate = false; - taskpool.execute(task).then((ret) => { - result = ret; - isTerminate = true; - }) - while (!isTerminate) { - await promiseCase() - } - expect(result).assertEqual(30); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_033 - * @tc.name : testTaskPoolExecute033 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute033', 0, async function (done) { - function Sum(value1, value2) { - "use concurrent" - return value1 + value2; - } - var result1; - var result2; - var isTerminate1 = false; - var isTerminate2 = false; - - var task1 = new taskpool.Task(Sum, 10, 20); - taskpool.execute(task1).then((ret1) => { - result1 = ret1; - isTerminate1 = true; - }) - - var task2 = new taskpool.Task(Sum, 30, 40); - taskpool.execute(task2).then((ret2) => { - result2 = ret2; - isTerminate2 = true; - }) - while (!isTerminate1 || !isTerminate2) { - await promiseCase() - } - expect(result1).assertEqual(30); - expect(result2).assertEqual(70); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_034 - * @tc.name : testTaskPoolExecute034 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute034', 0, async function (done) { - function Sum(value1, value2) { - "use concurrent" - return value1 + value2; - } - var result1; - var result2; - var isTerminate1 = false; - var isTerminate2 = false; - - var task1 = new taskpool.Task(Sum, 10, 20) - taskpool.execute(task1).then((ret1) => { - result1 = ret1; - isTerminate1 = true; - }) - var task2 = new taskpool.Task(Sum, 10, 20) - taskpool.execute(task2).then((ret2) => { - result2 = ret2; - isTerminate2 = true; - }) - while (!isTerminate1 || !isTerminate2) { - await promiseCase() - } - expect(result1).assertEqual(30); - expect(result2).assertEqual(30); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_035 - * @tc.name : testTaskPoolExecute035 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute035', 0, async function (done) { - function Sum(value1, value2) { - "use concurrent" - return value1 + value2; - } - var result1; - var result2; - var isTerminate1 = false; - var isTerminate2 = false; - - var task = new taskpool.Task(Sum, 10, 20) - taskpool.execute(task).then((ret1) => { - result1 = ret1; - isTerminate1 = true; - }) - taskpool.execute(task).then((ret2) => { - result2 = ret2; - isTerminate2 = true; - }) - while (!isTerminate1 || !isTerminate2) { - await promiseCase() - } - expect(result1).assertEqual(30); - expect(result2).assertEqual(30); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_036 - * @tc.name : testTaskPoolExecute036 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute036', 0, async function (done) { - function Sum(value1, value2) { - "use concurrent" - return value1 + value2; - } - function Multi(value1, value2) { - "use concurrent" - return value1 * value2; - } - - var result1; - var result2; - var result3; - var result4; - var isTerminate1 = false; - var isTerminate2 = false; - var isTerminate3 = false; - var isTerminate4 = false; - - var task1 = new taskpool.Task(Sum, 10, 20) - taskpool.execute(task1).then((ret1) => { - result1 = ret1; - isTerminate1 = true; - }) - var task2 = new taskpool.Task(Multi, 10, 20) - taskpool.execute(task2).then((ret2) => { - result2 = ret2; - isTerminate2 = true; - }) - var task3 = new taskpool.Task(Sum, 10, 30) - taskpool.execute(task3).then((ret3) => { - result3 = ret3; - isTerminate3 = true; - }) - var task4 = new taskpool.Task(Multi, 20, 20) - taskpool.execute(task4).then((ret4) => { - result4 = ret4; - isTerminate4 = true; - }) - - while (!isTerminate1 || !isTerminate2 || !isTerminate3 || !isTerminate4) { - await promiseCase() - } - expect(result1).assertEqual(30); - expect(result2).assertEqual(200); - expect(result3).assertEqual(40); - expect(result4).assertEqual(400); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_037 - * @tc.name : testTaskPoolExecute037 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute037', 0, async function (done) { - function Sum(value1, value2) { - "use concurrent" - return value1 + value2; - } - var result; - var isTerminate = false; - taskpool.execute(Sum, 10, 20).then((ret) => { - result = ret; - isTerminate = true; - }) - while (!isTerminate) { - await promiseCase() - } - expect(result).assertEqual(30); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_038 - * @tc.name : testTaskPoolExecute038 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute038', 0, async function (done) { - function Add(value1, value2) { - "use concurrent" - if (value1 & value2) - return true; - else - return false; - } - var result; - var isTerminate = false; - taskpool.execute(Add, true, false).then((ret) => { - result = ret; - isTerminate = true; - }) - while (!isTerminate) { - await promiseCase() - } - expect(result).assertEqual(false); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_039 - * @tc.name : testTaskPoolExecute039 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute039', 0, async function (done) { - function StrCat(value1, value2) { - "use concurrent" - return value1 + value2; - } - var result; - var isTerminate = false; - taskpool.execute(StrCat, "abc", "def").then((ret) => { - result = ret; - isTerminate = true; - }) - while (!isTerminate) { - await promiseCase() - } - expect(result).assertEqual("abcdef"); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_040 - * @tc.name : testTaskPoolExecute040 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute040', 0, async function (done) { - function Sum(value1, value2) { - "use concurrent" - function StrCat(value1, value2) { - return value1 + value2; - } - return value1+StrCat(value2,"hello"); - } - var result; - var isTerminate = false; - taskpool.execute(Sum, "abc", "def").then((ret) => { - result = ret; - isTerminate = true; - }) - while (!isTerminate) { - await promiseCase() - } - expect(result).assertEqual("abcdefhello"); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_041 - * @tc.name : testTaskPoolExecute041 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute041', 0, async function (done) { - function Sum(arg1, arg2) { - "use concurrent" - let value = []; - value[0] = arg1[0] + arg2[0]; - value[1] = arg1[1] + arg2[1]; - return value; - } - var result; - var isTerminate = false; - taskpool.execute(Sum, [1,2], [3,4]).then((ret) => { - result = ret; - isTerminate = true; - }) - while (!isTerminate) { - await promiseCase() - } - expect(result[0]).assertEqual(4); - expect(result[1]).assertEqual(6); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_042 - * @tc.name : testTaskPoolExecute042 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute042', 0, async function (done) { - function Sum(arg1, arg2) { - "use concurrent" - let value = arg1; - value.a = arg1.a + arg2.a; - value.b = arg1.b + arg2.b; - return value; - } - var result; - var isTerminate = false; - taskpool.execute(Sum, {"a": 1, "b" : 2}, {"a": 3, "b" : 4}).then((ret) => { - result = ret; - isTerminate = true; - }) - while (!isTerminate) { - await promiseCase() - } - expect(JSON.stringify(result)).assertEqual("{\"a\":4,\"b\":6}"); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_043 - * @tc.name : testTaskPoolExecute043 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute043', 0, async function (done) { - function Sum(value1, value2) { - "use concurrent" - return value1 + value2; - } - var result; - var isTerminate = false; - taskpool.execute(Sum, 10).then((ret) => { - result = ret; - isTerminate = true; - }) - while (!isTerminate) { - await promiseCase() - } - expect(result.toString()).assertEqual("NaN"); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_044 - * @tc.name : testTaskPoolExecute044 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute044', 0, async function (done) { - function Sum(value1, value2) { - "use concurrent" - return value1 + value2; - } - var result; - var isTerminate = false; - taskpool.execute(Sum, 10, 20, 30).then((ret) => { - result = ret; - isTerminate = true; - }) - while (!isTerminate) { - await promiseCase() - } - expect(result).assertEqual(30); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_045 - * @tc.name : testTaskPoolExecute045 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute045', 0, async function (done) { - function Sum(value1, value2) { - "use concurrent" - return value1 + value2; - } - var result1; - var result2; - var isTerminate1 = false; - var isTerminate2 = false; - - taskpool.execute(Sum, 10, 20).then((ret1) => { - result1 = ret1; - isTerminate1 = true; - }) - taskpool.execute(Sum, 30, 40).then((ret2) => { - result2 = ret2; - isTerminate2 = true; - }) - while (!isTerminate1 || !isTerminate2) { - await promiseCase() - } - expect(result1).assertEqual(30); - expect(result2).assertEqual(70); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_046 - * @tc.name : testTaskPoolExecute046 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute046', 0, async function (done) { - function Sum(value1, value2) { - "use concurrent" - return value1 + value2; - } - var result1; - var result2; - var isTerminate1 = false; - var isTerminate2 = false; - - taskpool.execute(Sum, 10, 20).then((ret1) => { - result1 = ret1; - isTerminate1 = true; - }) - taskpool.execute(Sum, 10, 20).then((ret2) => { - result2 = ret2; - isTerminate2 = true; - }) - while (!isTerminate1 || !isTerminate2) { - await promiseCase() - } - expect(result1).assertEqual(30); - expect(result2).assertEqual(30); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_047 - * @tc.name : testTaskPoolExecute047 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute047', 0, async function (done) { - function Sum(value1, value2) { - "use concurrent" - return value1 + value2; - } - function Multi(value1, value2) { - "use concurrent" - return value1 * value2; - } - - var result1; - var result2; - var result3; - var result4; - var isTerminate1 = false; - var isTerminate2 = false; - var isTerminate3 = false; - var isTerminate4 = false; - - taskpool.execute(Sum, 10, 20).then((ret1) => { - result1 = ret1; - isTerminate1 = true; - }) - taskpool.execute(Multi, 10, 20).then((ret2) => { - result2 = ret2; - isTerminate2 = true; - }) - taskpool.execute(Sum, 10, 30).then((ret3) => { - result3 = ret3; - isTerminate3 = true; - }) - taskpool.execute(Multi, 20, 20).then((ret4) => { - result4 = ret4; - isTerminate4 = true; - }) - while (!isTerminate1 || !isTerminate2 || !isTerminate3 || !isTerminate4) { - await promiseCase() - } - expect(result1).assertEqual(30); - expect(result2).assertEqual(200); - expect(result3).assertEqual(40); - expect(result4).assertEqual(400); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_048 - * @tc.name : testTaskPoolExecute048 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute048', 0, async function (done) { - function Sum(value1, value2) { - "use concurrent" - return value1 + value2; - } - try { - var result = await taskpool.execute(Sum); - } catch(e) { - expect(e.toString()).assertEqual("BusinessError: taskpool:: first param must be object when argc is one"); - } - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_049 - * @tc.name : testTaskPoolExecute049 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute049', 0, async function (done) { - function Sum(value1, value2) { - "use concurrent" - return value1 + value2; - } - var task1 = new taskpool.Task(Sum, 10, 20); - var task2 = new taskpool.Task(Sum, 30, 40); - var task3 = new taskpool.Task(Sum, 50, 60); - var result1 = await taskpool.execute(task1,taskpool.Priority.LOW); - var result2 = await taskpool.execute(task2,taskpool.Priority.HIGH); - var result3 = await taskpool.execute(task3,taskpool.Priority.MEDIUM); - expect(result1).assertEqual(30); - expect(result2).assertEqual(70); - expect(result3).assertEqual(110); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_050 - * @tc.name : testTaskPoolExecute050 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute050', 0, async function (done) { - async function func(value1, value2) { - "use concurrent" - let result = await new Promise((resolve, reject) => { - let value = value1 + value2; - resolve(value); - }) - return result; - } - var result = await taskpool.execute(func, 10, 20); - expect(result).assertEqual(30); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_EXECUTE_051 - * @tc.name : testTaskPoolExecute051 - * @tc.desc : Place the pending function into the taskpool internal task queue and wait for the thread to execute. - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolExecute051', 0, async function (done) { - async function func(value1, value2) { - "use concurrent" - let result = await new Promise((resolve, reject) => { - let value = value1 + value2; - resolve(value); - }) - return result; - } - var task = new taskpool.Task(func, 10, 20); - var result = await taskpool.execute(task); - expect(result).assertEqual(30); - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_Cancel_001 - * @tc.name : testTaskPoolCancel001 - * @tc.desc : Cancel tasks that have not been executed - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolCancel001', 0, async function (done) { - function addition(arg) { - "use concurrent" - return arg + 1; - } - function additionDelay(arg) { - "use concurrent" - var start = new Date().getTime(); - while (new Date().getTime() - start < 200) { - continue; - } - return arg + 1; - } - try { - var task1 = new taskpool.Task(additionDelay, 100); - var task2 = new taskpool.Task(additionDelay, 200); - var task3 = new taskpool.Task(additionDelay, 200); - var task4 = new taskpool.Task(additionDelay, 200); - var task5 = new taskpool.Task(additionDelay, 200); - var task6 = new taskpool.Task(additionDelay, 200); - var task7 = new taskpool.Task(additionDelay, 200); - var task8 = new taskpool.Task(additionDelay, 200); - var task9 = new taskpool.Task(additionDelay, 200); - var task10 = new taskpool.Task(additionDelay, 200); - var task11 = new taskpool.Task(addition, 300); - - var result1 = taskpool.execute(task1); - var result2 = taskpool.execute(task2); - var result3 = taskpool.execute(task3); - var result4 = taskpool.execute(task4); - var result5 = taskpool.execute(task5); - var result6 = taskpool.execute(task6); - var result7 = taskpool.execute(task7); - var result8 = taskpool.execute(task8); - var result9 = taskpool.execute(task9); - var result10 = taskpool.execute(task10); - var result11 = taskpool.execute(task11); - - var start = new Date().getTime(); - while (new Date().getTime() - start < 20) { - continue; - } - - taskpool.cancel(task11); - } - catch (e) { - expect(e.toString()).assertEqual(""); - } - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_Cancel_002 - * @tc.name : testTaskPoolCancel002 - * @tc.desc : Cancel the task in progress - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolCancel002', 0, async function (done) { - function addition(arg) { - "use concurrent" - return arg + 1; - } - function additionDelay(arg) { - "use concurrent" - var start = new Date().getTime(); - while (new Date().getTime() - start < 3000) { - continue; - } - return arg + 1; - } - try { - var task1 = new taskpool.Task(additionDelay, 100); - var task2 = new taskpool.Task(additionDelay, 200); - var task3 = new taskpool.Task(addition, 300); - - var result1 = taskpool.execute(task1); - var result2 = taskpool.execute(task2); - var result3 = taskpool.execute(task3); - - var start = new Date().getTime(); - while (new Date().getTime() - start < 1000) { - continue; - } - - taskpool.cancel(task1); - } - catch (e) { - expect(e.toString()).assertEqual( - "BusinessError: The task is executing when it is canceled, taskpool:: can not cancel the running task"); - } - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_Cancel_003 - * @tc.name : testTaskPoolCancel003 - * @tc.desc : Cancel the executed task - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolCancel003', 0, async function (done) { - function addition(arg) { - "use concurrent" - return arg + 1; - } - try { - var task1 = new taskpool.Task(addition, 100); - var task2 = new taskpool.Task(addition, 200); - var task3 = new taskpool.Task(addition, 300); - - var result1 = taskpool.execute(task1); - var result2 = taskpool.execute(task2); - var result3 = taskpool.execute(task3); - - var start = new Date().getTime(); - while (new Date().getTime() - start < 1000) { - continue; - } - - taskpool.cancel(task1); - } - catch (e) { - expect(e.toString()).assertEqual( - "BusinessError: The task does not exist when it is canceled, taskpool:: can not find the task"); - } - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_Cancel_004 - * @tc.name : testTaskPoolCancel004 - * @tc.desc : Cancel nonexistent task - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolCancel004', 0, async function (done) { - function addition(arg) { - "use concurrent" - return arg + 1; - } - try { - var task1 = new taskpool.Task(addition, 100); - var task2 = new taskpool.Task(addition, 200); - var task3 = new taskpool.Task(addition, 300); - - var result1 = taskpool.execute(task1); - var result2 = taskpool.execute(task2); - - taskpool.cancel(task3); - } - catch (e) { - expect(e.toString()).assertEqual( - "BusinessError: The task does not exist when it is canceled, taskpool:: can not find the task"); - } - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_Cancel_005 - * @tc.name : testTaskPoolCancel005 - * @tc.desc : Canceling unexecuted tasks multiple times - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolCancel005', 0, async function (done) { - function addition(arg) { - "use concurrent" - return arg + 1; - } - function additionDelay(arg) { - "use concurrent" - var start = new Date().getTime(); - while (new Date().getTime() - start < 3000) { - continue; - } - return arg + 1; - } - try { - var task1 = new taskpool.Task(additionDelay, 100); - var task2 = new taskpool.Task(additionDelay, 200); - var task3 = new taskpool.Task(addition, 300); - - var result1 = taskpool.execute(task1); - var result2 = taskpool.execute(task2); - var result3 = taskpool.execute(task3); - - var start = new Date().getTime(); - while (new Date().getTime() - start < 1000) { - continue; - } - - taskpool.cancel(task3); - taskpool.cancel(task3); - } - catch (e) { - expect(e.toString()).assertEqual( - "BusinessError: The task does not exist when it is canceled, taskpool:: can not find the task"); - } - done(); - }) - - /** - * @tc.number : TEST_TASK_POOL_Cancel_006 - * @tc.name : testTaskPoolCancel006 - * @tc.desc : Cancel all tasks in sequence - * @tc.size : MEDIUM - * @tc.type : Function - * @tc.level : Level 2 - */ - it('testTaskPoolCancel006', 0, async function (done) { - function addition(arg) { - "use concurrent" - return arg + 1; - } - try { - var task1 = new taskpool.Task(addition, 100); - var task2 = new taskpool.Task(addition, 200); - var task3 = new taskpool.Task(addition, 300); - var task4 = new taskpool.Task(addition, 400); - var task5 = new taskpool.Task(addition, 500); - var task6 = new taskpool.Task(addition, 600); - - var result1 = taskpool.execute(task1); - var result2 = taskpool.execute(task2); - var result3 = taskpool.execute(task3); - var result4 = taskpool.execute(task4); - var result5 = taskpool.execute(task5); - var result6 = taskpool.execute(task6); - - var start = new Date().getTime(); - while (new Date().getTime() - start < 100) { - continue; - } - - taskpool.cancel(task6); - taskpool.cancel(task5); - taskpool.cancel(task4); - taskpool.cancel(task3); - taskpool.cancel(task2); - } - catch (e) { - expect(e.toString()).assertEqual( - "BusinessError: The task does not exist when it is canceled, taskpool:: can not find the task"); - } - done(); - }) - }) -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibrarytaskpooletstest/src/main/module.json b/commonlibrary/crossplatform/commonlibrarytaskpooletstest/src/main/module.json deleted file mode 100755 index 97abf299e..000000000 --- a/commonlibrary/crossplatform/commonlibrarytaskpooletstest/src/main/module.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "module": { - "name": "entry_test", - "type": "feature", - "description": "$string:module_test_desc", - "mainElement": "TestAbility", - "deviceTypes": [ - "phone" - ], - "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", - "skills": [ - { - "actions": [ - "action.system.home" - ], - "entities": [ - "entity.system.home" - ] - } - ] - } - ] - } -} diff --git a/commonlibrary/crossplatform/commonlibrarytaskpooletstest/src/main/resources/base/element/color.json b/commonlibrary/crossplatform/commonlibrarytaskpooletstest/src/main/resources/base/element/color.json deleted file mode 100755 index 3c712962d..000000000 --- a/commonlibrary/crossplatform/commonlibrarytaskpooletstest/src/main/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/commonlibrary/crossplatform/commonlibrarytaskpooletstest/src/main/resources/base/element/string.json b/commonlibrary/crossplatform/commonlibrarytaskpooletstest/src/main/resources/base/element/string.json deleted file mode 100755 index 65d8fa5a7..000000000 --- a/commonlibrary/crossplatform/commonlibrarytaskpooletstest/src/main/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/commonlibrary/crossplatform/commonlibrarytaskpooletstest/src/main/resources/base/media/icon.png b/commonlibrary/crossplatform/commonlibrarytaskpooletstest/src/main/resources/base/media/icon.png deleted file mode 100755 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6BLrPFWk?s;$LOP{GmJpBl$qoSA!PUg~PA65-S00{{S`XKG6NkG0RgjEntPrmV+?0|00mu7;+5 zrdpa{2QLqPJ4Y{j7=Mrl{BaxrkdY69+c~(w{Fv-v&aR%aEI&JYSeRTLWm!zbv;?)_ ziZB;fwGbbeL5Q}YLx`J$lp~A09KK8t_z}PZ=4ZzgdeKtgoc+o5EvN9A1K1_<>M?MBqb#!ASf&# zEX?<)!RH(7>1P+j=jqG(58}TVN-$psA6K}atCuI!KTJD&FMmH-78ZejBm)0qc{ESp z|LuG1{QnBUJRg_E=h1#XMWt2%fcoN@l7eAS!Es?Q+;XsRNPhiiE=@AqlLkJzF`O18 zbsbSmKN=aaq8k3NFYZfDWpKmM!coBU0(X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(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? ''); - return; - } - hilog.info(0x0000, 'testTag', 'Succeeded in loading the content. Data: %{public}s', - JSON.stringify(data) ?? ''); - }); - } - - 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/commonlibrary/crossplatform/commonlibrarytreesetetstest/src/main/ets/TestAbility/pages/Index.ets b/commonlibrary/crossplatform/commonlibrarytreesetetstest/src/main/ets/TestAbility/pages/Index.ets deleted file mode 100644 index e95640899..000000000 --- a/commonlibrary/crossplatform/commonlibrarytreesetetstest/src/main/ets/TestAbility/pages/Index.ets +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import hilog from '@ohos.hilog'; - -@Entry -@Component -struct Index { - aboutToAppear() { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility index aboutToAppear'); - } - @State message: string = 'Hello World' - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Button() { - Text('next page') - .fontSize(20) - .fontWeight(FontWeight.Bold) - }.type(ButtonType.Capsule) - .margin({ - top: 20 - }) - .backgroundColor('#0D9FFB') - .width('35%') - .height('5%') - .onClick(()=>{ - }) - } - .width('100%') - } - .height('100%') - } - } \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibrarytreesetetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/commonlibrary/crossplatform/commonlibrarytreesetetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts deleted file mode 100644 index 92a16d84e..000000000 --- a/commonlibrary/crossplatform/commonlibrarytreesetetstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts +++ /dev/null @@ -1,49 +0,0 @@ -import hilog from '@ohos.hilog'; -import TestRunner from '@ohos.application.testRunner'; -import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; - -var abilityDelegator = undefined -var abilityDelegatorArguments = undefined - -async function onAbilityCreateCallback() { - hilog.info(0x0000, 'testTag', '%{public}s', 'onAbilityCreateCallback'); -} - -async function addAbilityMonitorCallback(err: any) { - 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() { - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun run'); - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var testAbilityName = abilityDelegatorArguments.bundleName + '.TestAbility' - let lMonitor = { - abilityName: testAbilityName, - onAbilityCreate: onAbilityCreateCallback, - }; - abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) - var cmd = 'aa start -d 0 -a TestAbility' + ' -b ' + abilityDelegatorArguments.bundleName - var debug = abilityDelegatorArguments.parameters['-D'] - if (debug == 'true') - { - cmd += ' -D' - } - hilog.info(0x0000, 'testTag', 'cmd : %{public}s', cmd); - abilityDelegator.executeShellCommand(cmd, - (err: any, d: any) => { - hilog.info(0x0000, 'testTag', 'executeShellCommand : err : %{public}s', JSON.stringify(err) ?? ''); - hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.stdResult ?? ''); - hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.exitCode ?? ''); - }) - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun end'); - } -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibrarytreesetetstest/src/main/ets/test/List.test.ets b/commonlibrary/crossplatform/commonlibrarytreesetetstest/src/main/ets/test/List.test.ets deleted file mode 100644 index 842f36f8e..000000000 --- a/commonlibrary/crossplatform/commonlibrarytreesetetstest/src/main/ets/test/List.test.ets +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import TreeSetTest from './TreeSet.test' - -export default function testsuite() { - TreeSetTest() -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibrarytreesetetstest/src/main/ets/test/TreeSet.test.ets b/commonlibrary/crossplatform/commonlibrarytreesetetstest/src/main/ets/test/TreeSet.test.ets deleted file mode 100644 index cfd41b0e5..000000000 --- a/commonlibrary/crossplatform/commonlibrarytreesetetstest/src/main/ets/test/TreeSet.test.ets +++ /dev/null @@ -1,780 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import TreeSet from "@ohos.util.TreeSet"; -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' -export default function TreeSetTest() { -describe("TreeSetTest", function () { - /** - * @tc.number: TEST_CONSTRUCTOR_001 - * @tc.name : testConstructor001 - * @tc.desc : Create an TreeSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testConstructor001", 0, function () { - let treeSet = new TreeSet(); - expect(treeSet != undefined).assertTrue(); - }); - - /** - * @tc.number: TEST_LENGTH_001 - * @tc.name : testLength001 - * @tc.desc : Get the number of element in the TreeSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 0 - */ - it("testLength001", 0, function () { - let treeSet = new TreeSet(); - treeSet.add(0); - treeSet.add(1); - treeSet.add(2); - let res = treeSet.length; - expect(res).assertEqual(3); - }); - - /** - * @tc.number: TEST_IS_EMPTY_001 - * @tc.name : testIsEmpty001 - * @tc.desc : Determine whether the TreeSet instance is empty. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsEmpty001", 0, function () { - let treeSet = new TreeSet(); - treeSet.add("a"); - let res1 = treeSet.isEmpty(); - expect(res1).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_EMPTY_002 - * @tc.name : testIsEmpty002 - * @tc.desc : Determine whether the TreeSet instance is empty. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsEmpty002", 0, function () { - let treeSet = new TreeSet(); - let res2 = treeSet.isEmpty(); - expect(res2).assertEqual(true); - }); - - /** - * @tc.number: TEST_HAS_001 - * @tc.name : testHas001 - * @tc.desc : Determine whether the TreeSet instance contains the specified element. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testHas001", 0, function () { - let treeSet = new TreeSet(); - treeSet.add(0); - treeSet.add(1); - treeSet.add(2); - let res = treeSet.has(2); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_HAS_002 - * @tc.name : testHas002 - * @tc.desc : Determine whether the TreeSet instance contains the specified element. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testHas002", 0, function () { - let treeSet = new TreeSet(); - treeSet.add(0); - treeSet.add(1); - treeSet.add(2); - let res1 = treeSet.has(3); - expect(res1).assertEqual(false); - }); - - /** - * @tc.number: TEST_ADD_001 - * @tc.name : testAdd001 - * @tc.desc : Add element to TreeSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd001", 0, function () { - let treeSet = new TreeSet(); - treeSet.add("四"); - let res = treeSet.has("四"); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_ADD_002 - * @tc.name : testAdd002 - * @tc.desc : Add element to TreeSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd002", 0, function () { - let treeSet = new TreeSet(); - treeSet.add(8); - let res = treeSet.has(8); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_ADD_003 - * @tc.name : testAdd003 - * @tc.desc : Add element to TreeSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd003", 0, function () { - let treeSet = new TreeSet(); - let a = [1, 2, 3, 4]; - treeSet.add(a); - let res = treeSet.has(a); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_ADD_004 - * @tc.name : testAdd004 - * @tc.desc : Add element to TreeSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd004", 0, function () { - let treeSet = new TreeSet(); - treeSet.add("*"); - let res = treeSet.has("*"); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_ADD_005 - * @tc.name : testAdd005 - * @tc.desc : Add element to TreeSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd005", 0, function () { - let treeSet = new TreeSet(); - let a = {name: "lala", age: "13岁"}; - treeSet.add(a); - let res = treeSet.has(a); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_ADD_006 - * @tc.name : testAdd006 - * @tc.desc : Add element to TreeSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd006", 0, function () { - let treeSet = new TreeSet(); - treeSet.add(1.234); - let res = treeSet.has(1.234); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_ADD_007 - * @tc.name : testAdd007 - * @tc.desc : Add element to TreeSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd007", 0, function () { - let treeSet = new TreeSet(); - treeSet.add(true); - let res = treeSet.has(true); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_ADD_008 - * @tc.name : testAdd008 - * @tc.desc : Add element to TreeSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd008", 0, function () { - let treeSet = new TreeSet(); - treeSet.add(""); - let res = treeSet.has(""); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_ADD_009 - * @tc.name : testAdd009 - * @tc.desc : Add element to TreeSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd009", 0, function () { - let treeSet = new TreeSet(); - for (let i = 0; i < 10000; i++) { - treeSet.add(i); - } - let res = treeSet.has(8888); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_ADD_010 - * @tc.name : testAdd010 - * @tc.desc : Add element to TreeSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAdd010", 0, function () { - let treeSet = new TreeSet(); - try { - treeSet.add.bind({}, "a")(); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200011); - expect(err.message).assertEqual(`The add method cannot be bound`); - } - }); - - /** - * @tc.number: TEST_REMOVE_001 - * @tc.name : testRemove001 - * @tc.desc : Delete the specified value. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testRemove001", 0, function () { - let treeSet = new TreeSet(); - treeSet.add("a"); - treeSet.add("b"); - treeSet.add("c"); - treeSet.add("c"); - treeSet.add("d"); - treeSet.add("g"); - let res1 = treeSet.remove("c"); - expect(res1).assertEqual(true); - let res2 = treeSet.has("c"); - expect(res2).assertEqual(false); - }); - - /** - * @tc.number: TEST_REMOVE_002 - * @tc.name : testRemove002 - * @tc.desc : Delete the specified value. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testRemove002", 0, function () { - let treeSet = new TreeSet(); - let res = treeSet.remove("c"); - expect(res).assertEqual(false); - }); - - /** - * @tc.number: TEST_CLEAR_001 - * @tc.name : testClear001 - * @tc.desc : Clear all elements of the TreeSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testClear001", 0, function () { - let treeSet = new TreeSet(); - treeSet.add(0); - treeSet.add(1); - treeSet.add(2); - treeSet.clear(); - let res = treeSet.length; - expect(res).assertEqual(0); - }); - - /** - * @tc.number: TEST_CLEAR_002 - * @tc.name : testClear002 - * @tc.desc : Clear all elements of the TreeSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testClear002", 0, function () { - let treeSet = new TreeSet(); - treeSet.add(0); - treeSet.add(1); - treeSet.add(2); - treeSet.clear(); - let res = treeSet.length; - expect(res).assertEqual(0); - let res1 = treeSet.popFirst(); - expect(res1).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_CLEAR_003 - * @tc.name : testClear003 - * @tc.desc : Clear all elements of the TreeSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it('testClear003', 0, function () { - let treeSet = new TreeSet(); - try { - treeSet.clear.bind({}, "a")(); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200011); - expect(err.message).assertEqual(`The clear method cannot be bound`); - } - }); - - /** - * @tc.number: TEST_GET_FIRST_VALUE_001 - * @tc.name : testGetFirstValue001 - * @tc.desc : Get the value that ranks first in the TreeSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetFirstValue001", 0, function () { - let treeSet = new TreeSet(); - treeSet.add(0); - treeSet.add(1); - treeSet.add(2); - treeSet.add(3); - treeSet.add(4); - let res = treeSet.getFirstValue(); - expect(res).assertEqual(0); - }); - - /** - * @tc.number: TEST_GET_FIRST_VALUE_002 - * @tc.name : testGetFirstValue002 - * @tc.desc : Get the value that ranks first in the TreeSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetFirstValue002", 0, function () { - let treeSet = new TreeSet(); - let res = treeSet.getFirstValue(); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_GET_LAST_VALUE_001 - * @tc.name : testGetLastValue001 - * @tc.desc : Get the last sorted key in the TreeSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetLastValue001", 0, function () { - let treeSet = new TreeSet(); - treeSet.add(0); - treeSet.add(1); - treeSet.add(2); - let res = treeSet.getLastValue(); - expect(res).assertEqual(2); - }); - - /** - * @tc.number: TEST_GET_LAST_VALUE_002 - * @tc.name : testGetLastValue002 - * @tc.desc : Get the last sorted key in the TreeSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetLastValue002", 0, function () { - let treeSet = new TreeSet(); - let res = treeSet.getLastValue(); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_GET_LOWER_VALUE_001 - * @tc.name : testGetLowerValue001 - * @tc.desc : Get a value that is a little lower than the specified value sort. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetLowerValue001", 0, function () { - let treeSet = new TreeSet(); - treeSet.add(0); - treeSet.add(1); - treeSet.add(2); - treeSet.add(3); - treeSet.add(4); - let res = treeSet.getLowerValue(2); - expect(res).assertEqual(1); - }); - - /** - * @tc.number: TEST_GET_LOWER_VALUE_002 - * @tc.name : testGetLowerValue002 - * @tc.desc : Get a value that is a little lower than the specified value sort. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetLowerValue002", 0, function () { - let treeSet = new TreeSet(); - let res = treeSet.getLowerValue(2); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_GET_LOWER_VALUE_003 - * @tc.name : testGetLowerValue003 - * @tc.desc : Get a value that is a little lower than the specified value sort. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it('testGetLowerValue003', 0, function () { - let treeSet = new TreeSet(); - try { - treeSet.getLowerValue.bind({}, "a")(); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200011); - expect(err.message).assertEqual(`The getLowerValue method cannot be bound`); - } - }); - - /** - * @tc.number: TEST_GET_LOWER_VALUE_004 - * @tc.name : testGetLowerValue004 - * @tc.desc : Get a value that is a little lower than the specified value sort. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it('testGetLowerValue004', 0, function () { - let treeSet = new TreeSet(); - try { - treeSet.getLowerValue(null); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(401); - expect(err.message).assertEqual(`The type of "key" must be not null. Received value is: null`); - } - }); - - /** - * @tc.number: TEST_GET_HIGHER_VALUE_001 - * @tc.name : testGetHigherValue001 - * @tc.desc : Get a value that is a little higher than the specified value sort. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetHigherValue001", 0, function () { - let treeSet = new TreeSet(); - treeSet.add(0); - treeSet.add(1); - treeSet.add(2); - treeSet.add(3); - treeSet.add(4); - let res = treeSet.getHigherValue(3); - expect(res).assertEqual(4); - }); - - /** - * @tc.number: TEST_GET_HIGHER_VALUE_002 - * @tc.name : testGetHigherValue002 - * @tc.desc : Get a value that is a little higher than the specified value sort. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetHigherValue002", 0, function () { - let treeSet = new TreeSet(); - let res = treeSet.getHigherValue(3); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_GET_HIGHER_VALUE_003 - * @tc.name : testGetHigherValue003 - * @tc.desc : Get a value that is a little higher than the specified value sort. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it('testGetHigherValue003', 0, function () { - let treeSet = new TreeSet(); - try { - treeSet.getHigherValue(null); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(401); - expect(err.message).assertEqual(`The type of "key" must be not null. Received value is: null`); - } - }); - - /** - * @tc.number: TEST_GET_HIGHER_VALUE_004 - * @tc.name : testGetHigherValue004 - * @tc.desc : Get a value that is a little higher than the specified value sort. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it('testGetHigherValue004', 0, function () { - let treeSet = new TreeSet(); - try { - treeSet.getHigherValue.bind({}, "a")(); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200011); - expect(err.message).assertEqual(`The getHigherValue method cannot be bound`); - } - }); - - /** - * @tc.number: TEST_POP_FIRST_001 - * @tc.name : testPopFirst001 - * @tc.desc : Delete first value of sort. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testPopFirst001", 0, function () { - let treeSet = new TreeSet(); - treeSet.add("a"); - treeSet.add("b"); - treeSet.add("c"); - treeSet.add("d"); - treeSet.add("e"); - let res = treeSet.popFirst(); - expect(res).assertEqual("a"); - }); - - /** - * @tc.number: TEST_POP_FIRST_002 - * @tc.name : testPopFirst002 - * @tc.desc : Delete first value of sort. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testPopFirst002", 0, function () { - let treeSet = new TreeSet(); - let res = treeSet.popFirst(); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_POP_LAST_001 - * @tc.name : testPopLast001 - * @tc.desc : Delete last value of sort. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testPopLast001", 0, function () { - let treeSet = new TreeSet(); - treeSet.add("a"); - treeSet.add("b"); - treeSet.add("c"); - treeSet.add("d"); - treeSet.add("e"); - let res = treeSet.popLast(); - expect(res).assertEqual("e"); - }); - - /** - * @tc.number: TEST_POP_LAST_002 - * @tc.name : testPopLast002 - * @tc.desc : Delete last value of sort. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testPopLast002", 0, function () { - let treeSet = new TreeSet(); - let res = treeSet.popLast(); - expect(res).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_FOR_EACH_001 - * @tc.name : testForEach001 - * @tc.desc : Traverse the collection of all elements of the TreeSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testForEach001", 0, function () { - let treeSet = new TreeSet(); - treeSet.add(0); - treeSet.add(1); - treeSet.add(2); - treeSet.add(3); - treeSet.add(4); - let arr1 = []; - treeSet.forEach((value, key) => { - arr1.push(value); - }); - let arr = [0, 1, 2, 3, 4]; - for (let i = 0; i < arr1.length; i++) { - expect(arr[i]).assertEqual(arr1[i]); - } - }); - - /** - * @tc.number: TEST_FOR_EACH_002 - * @tc.name : testForEach002 - * @tc.desc : Traverse the collection of all elements of the TreeSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it('testForEach002', 0, function () { - let treeSet = new TreeSet(); - try { - treeSet.forEach.bind({}, "a")(); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200011); - expect(err.message).assertEqual(`The forEach method cannot be bound`); - } - }); - - /** - * @tc.number: TEST_VALUES_001 - * @tc.name : testValues001 - * @tc.desc : Get a collection of all the values in the TreeSet. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testValues001", 0, function () { - let treeSet = new TreeSet(); - treeSet.add("a"); - treeSet.add("b"); - treeSet.add("c"); - treeSet.add("d"); - treeSet.add("g"); - let res = treeSet.values(); - expect(res.next().value).assertEqual("a"); - expect(res.next().value).assertEqual("b"); - expect(res.next().value).assertEqual("c"); - expect(res.next().value).assertEqual("d"); - expect(res.next().value).assertEqual("g"); - }); - - /** - * @tc.number: TEST_VALUES_002 - * @tc.name : testValues002 - * @tc.desc : Get a collection of all the values in the TreeSet. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it('testValues002', 0, function () { - let treeSet = new TreeSet(); - try { - treeSet.values.bind({}, "a")(); - expect(true).assertEqual(false); - } catch (err) { - expect(err.name).assertEqual("BusinessError"); - expect(err.code).assertEqual(10200011); - expect(err.message).assertEqual(`The Symbol.iterator method cannot be bound`); - } - }); - - /** - * @tc.number: TEST_ENTRIES_001 - * @tc.name : testEntries001 - * @tc.desc : Get all key value pairs collection in TreeMap. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEntries001", 0, function () { - let treeSet = new TreeSet(); - treeSet.add("a"); - treeSet.add("b"); - treeSet.add("c"); - treeSet.add("d"); - treeSet.add("g"); - let res = treeSet.entries(); - expect(JSON.stringify(res.next().value)).assertEqual('["a","a"]'); - expect(JSON.stringify(res.next().value)).assertEqual('["b","b"]'); - expect(JSON.stringify(res.next().value)).assertEqual('["c","c"]'); - expect(JSON.stringify(res.next().value)).assertEqual('["d","d"]'); - expect(JSON.stringify(res.next().value)).assertEqual('["g","g"]'); - }); - - /** - * @tc.number: TEST_ITERATOR_001 - * @tc.name : testIterator001 - * @tc.desc : Iterate over all elements of the TreeSet instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIterator001", 0, function () { - let treeSet = new TreeSet(); - treeSet.add(0); - treeSet.add(1); - treeSet.add(2); - treeSet.add(3); - treeSet.add(4); - let arr = []; - let res = treeSet[Symbol.iterator](); - let temp = undefined; - do { - temp = res.next().value; - arr.push(temp); - } while (temp != undefined); - let arr1 = [0, 1, 2, 3, 4]; - for (let i = 0; i < arr1.length; i++) { - expect(arr[i]).assertEqual(arr1[i]); - } - }); -}) -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibrarytreesetetstest/src/main/module.json b/commonlibrary/crossplatform/commonlibrarytreesetetstest/src/main/module.json deleted file mode 100644 index a4443e713..000000000 --- a/commonlibrary/crossplatform/commonlibrarytreesetetstest/src/main/module.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "module": { - "name": "entry_test", - "type": "feature", - "description": "$string:module_test_desc", - "mainElement": "TestAbility", - "deviceTypes": [ - "phone" - ], - "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", - "skills": [ - { - "actions": [ - "action.system.home" - ], - "entities": [ - "entity.system.home" - ] - } - ] - } - ] - } -} diff --git a/commonlibrary/crossplatform/commonlibrarytreesetetstest/src/main/resources/base/element/color.json b/commonlibrary/crossplatform/commonlibrarytreesetetstest/src/main/resources/base/element/color.json deleted file mode 100644 index 3c712962d..000000000 --- a/commonlibrary/crossplatform/commonlibrarytreesetetstest/src/main/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/commonlibrary/crossplatform/commonlibrarytreesetetstest/src/main/resources/base/element/string.json b/commonlibrary/crossplatform/commonlibrarytreesetetstest/src/main/resources/base/element/string.json deleted file mode 100644 index 65d8fa5a7..000000000 --- a/commonlibrary/crossplatform/commonlibrarytreesetetstest/src/main/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/commonlibrary/crossplatform/commonlibrarytreesetetstest/src/main/resources/base/media/icon.png b/commonlibrary/crossplatform/commonlibrarytreesetetstest/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6BLrPFWk?s;$LOP{GmJpBl$qoSA!PUg~PA65-S00{{S`XKG6NkG0RgjEntPrmV+?0|00mu7;+5 zrdpa{2QLqPJ4Y{j7=Mrl{BaxrkdY69+c~(w{Fv-v&aR%aEI&JYSeRTLWm!zbv;?)_ ziZB;fwGbbeL5Q}YLx`J$lp~A09KK8t_z}PZ=4ZzgdeKtgoc+o5EvN9A1K1_<>M?MBqb#!ASf&# zEX?<)!RH(7>1P+j=jqG(58}TVN-$psA6K}atCuI!KTJD&FMmH-78ZejBm)0qc{ESp z|LuG1{QnBUJRg_E=h1#XMWt2%fcoN@l7eAS!Es?Q+;XsRNPhiiE=@AqlLkJzF`O18 zbsbSmKN=aaq8k3NFYZfDWpKmM!coBU0(XnL8R{4=i|wi{!uWYM2je{U{B*K2PVdu&=E zTq*-XsEsJ$u5H4g6DIm2Y!DN`>^v|AqlwuCD;w45K0@eqauiqWf7l&o)+YLHm~|L~ z7$0v5mkobriU!H<@mVJHLlmQqzQ3d6Rh_-|%Yy2li*tHO>_vcnuZ7OR_xkAIuIU&x z-|8Y0wj|6|a6_I(v91y%k_kNw6pnkNdxjqG8!%Vz_d%c_!X+6-;1`GC9_FpjoHev5fEV7RhJ>r=mh-jp$fqbqRJ=obwdgLDVP5+s zy1=_DWG0Y-Jb3t^WXmkr(d9~08k-|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0u#GSH|9m9v(hyC42d8Gr0PYY zF7qWKX#`nM$&)(eO>v4;m>`;-2REz zxo*q!#DfnmIK=wJn0^hj3faE9^=?P)LtEQ`ft~KRm;G5kcnWDq=ho!! zUsJ;k{G@O7M7|W@5dyA;%ZEO>$L)M=^@dB;2bb;5Z|lG0?0`e19itb{pR9~Kw{IRP z+j#LfEglzerLAKM$zlcw#E(X?}F70mgP;C zcH~~1(so8atT~nE5yA85dJm6AlOIj%i{vF%ua_7>$|8Ah9wp6}qlhn{(AbS%o!qc5 zSGi}=>20-tzX4Ck7hfB(>COdqfoAW{v~Ty^&L8pdrInJyhf221W2#$D&ifIwzp?Fu zKUzW6!OvDtDlUJ&ec!QlBi3)f)6$Z4=iHjHE%)D;eQ?T{`!`QrUHU*~-|7ZLA8~pv zNB$3vJy+cNoG>DP3Lu3bbor;M1;1i%zwzt)rT*GoCyO^;JDPR!QuejE-Ym;?gZ=ZC z`NRF~#{XQr**^6A%}axMu{zO@=602aH(T2$${xO7z5Dp8RawV^uXg4nMm~D`ig`)+ z`cmQ=<6xKgPAfLO`dI;#5WqairtudBQ2$cO*mI)xzMHfLz_2HGlME5Wk9~im5rC0T zjEq!h5Pv8ZfnrDvisT9fr~!pfN5zm-oX0+xx$Km7Zp#Qfo^xT?-Y-sSk8kVOxZ-^0 z*@l}PvSSj^|H(-%6zc&h%*$#}PoGsW;mF}X9lkUA&|AxXBOkK!-S0N-rcO`(+ve3P qJ{68lx!1o;eQM<$`=+aFb(1m|jvKlitJ7^`_8qu594mK1v;POx{$A|> diff --git a/commonlibrary/crossplatform/commonlibraryurietstest/src/main/ets/TestAbility/TestAbility.ets b/commonlibrary/crossplatform/commonlibraryurietstest/src/main/ets/TestAbility/TestAbility.ets deleted file mode 100644 index 368aef919..000000000 --- a/commonlibrary/crossplatform/commonlibraryurietstest/src/main/ets/TestAbility/TestAbility.ets +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import UIAbility from '@ohos.app.ability.UIAbility'; -import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; -import hilog from '@ohos.hilog'; -import { Hypium } from '@ohos/hypium'; -import testsuite from '../test/List.test'; -import window from '@ohos.window'; - -export default class TestAbility extends UIAbility { - onCreate(want, 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) ?? ''); - var abilityDelegator: any - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var abilityDelegatorArguments: any - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - hilog.info(0x0000, 'testTag', '%{public}s', 'start run testcase!!!'); - Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) - } - - onDestroy() { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onDestroy'); - } - - onWindowStageCreate(windowStage: window.WindowStage) { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageCreate'); - windowStage.loadContent('TestAbility/pages/Index', (err, data) => { - 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. Data: %{public}s', - JSON.stringify(data) ?? ''); - }); - } - - 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/commonlibrary/crossplatform/commonlibraryurietstest/src/main/ets/TestAbility/pages/Index.ets b/commonlibrary/crossplatform/commonlibraryurietstest/src/main/ets/TestAbility/pages/Index.ets deleted file mode 100644 index e95640899..000000000 --- a/commonlibrary/crossplatform/commonlibraryurietstest/src/main/ets/TestAbility/pages/Index.ets +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import hilog from '@ohos.hilog'; - -@Entry -@Component -struct Index { - aboutToAppear() { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility index aboutToAppear'); - } - @State message: string = 'Hello World' - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Button() { - Text('next page') - .fontSize(20) - .fontWeight(FontWeight.Bold) - }.type(ButtonType.Capsule) - .margin({ - top: 20 - }) - .backgroundColor('#0D9FFB') - .width('35%') - .height('5%') - .onClick(()=>{ - }) - } - .width('100%') - } - .height('100%') - } - } \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryurietstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/commonlibrary/crossplatform/commonlibraryurietstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts deleted file mode 100644 index 92a16d84e..000000000 --- a/commonlibrary/crossplatform/commonlibraryurietstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts +++ /dev/null @@ -1,49 +0,0 @@ -import hilog from '@ohos.hilog'; -import TestRunner from '@ohos.application.testRunner'; -import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; - -var abilityDelegator = undefined -var abilityDelegatorArguments = undefined - -async function onAbilityCreateCallback() { - hilog.info(0x0000, 'testTag', '%{public}s', 'onAbilityCreateCallback'); -} - -async function addAbilityMonitorCallback(err: any) { - 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() { - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun run'); - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var testAbilityName = abilityDelegatorArguments.bundleName + '.TestAbility' - let lMonitor = { - abilityName: testAbilityName, - onAbilityCreate: onAbilityCreateCallback, - }; - abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) - var cmd = 'aa start -d 0 -a TestAbility' + ' -b ' + abilityDelegatorArguments.bundleName - var debug = abilityDelegatorArguments.parameters['-D'] - if (debug == 'true') - { - cmd += ' -D' - } - hilog.info(0x0000, 'testTag', 'cmd : %{public}s', cmd); - abilityDelegator.executeShellCommand(cmd, - (err: any, d: any) => { - hilog.info(0x0000, 'testTag', 'executeShellCommand : err : %{public}s', JSON.stringify(err) ?? ''); - hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.stdResult ?? ''); - hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.exitCode ?? ''); - }) - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun end'); - } -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryurietstest/src/main/ets/test/List.test.ets b/commonlibrary/crossplatform/commonlibraryurietstest/src/main/ets/test/List.test.ets deleted file mode 100644 index ba3f09189..000000000 --- a/commonlibrary/crossplatform/commonlibraryurietstest/src/main/ets/test/List.test.ets +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import {UriTest} from './uri.test' - -export default function testsuite() { - UriTest() -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryurietstest/src/main/ets/test/uri.test.ets b/commonlibrary/crossplatform/commonlibraryurietstest/src/main/ets/test/uri.test.ets deleted file mode 100644 index 8b8e23a78..000000000 --- a/commonlibrary/crossplatform/commonlibraryurietstest/src/main/ets/test/uri.test.ets +++ /dev/null @@ -1,521 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ - -import uri from "@ohos.uri"; -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; -export function UriTest() { - describe("UriTest", function () { - /** - * @tc.number: TEST_URI_CONSTRUCTION_001 - * @tc.name : testUriConstruction001 - * @tc.desc : Constructs a URI by parsing the given string. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUriConstruction001", 0, function () { - try { - let that = new uri.URI("#http://username:password@host:8080/directory/file?foo=1&bar=2"); - expect(false).assertEqual(true); - } catch (err) { - expect(err.toString()).assertEqual("BusinessError: Syntax Error. Invalid Uri string"); - expect(err.code).assertEqual(10200002); - expect(err.message).assertEqual("Syntax Error. Invalid Uri string"); - } - }); - - /** - * @tc.number: TEST_URI_CONSTRUCTION_002 - * @tc.name : testUriConstruction002 - * @tc.desc : Constructs a URI by parsing the given string. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUriConstruction002", 0, function () { - try { - let that = new uri.URI("ht/tp://username:pas sword@host:8080/directory/file?foo=1&bar=2"); - expect(false).assertEqual(true); - } catch (err) { - expect(err.toString()).assertEqual("BusinessError: Syntax Error. Invalid Uri string"); - expect(err.code).assertEqual(10200002); - expect(err.message).assertEqual("Syntax Error. Invalid Uri string"); - } - }); - - /** - * @tc.number: TEST_URI_CONSTRUCTION_003 - * @tc.name : testUriConstruction003 - * @tc.desc : Constructs a URI by parsing the given string. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUriConstruction003", 0, function () { - try { - let that = new uri.URI("http://username:password@[::]:8080/directory/file?Query#gaogao faofao"); - expect(false).assertEqual(true); - } catch (err) { - expect(err.toString()).assertEqual("BusinessError: Syntax Error. Invalid Uri string"); - expect(err.code).assertEqual(10200002); - expect(err.message).assertEqual("Syntax Error. Invalid Uri string"); - } - }); - - /** - * @tc.number: TEST_URI_CONSTRUCTION_004 - * @tc.name : testUriConstruction004 - * @tc.desc : Constructs a URI by parsing the given string. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUriConstruction004", 0, function () { - try { - let that = new uri.URI("http://username:password@host:8080/directory/file?foo^=1&bar=2#gaogaofaofao"); - expect(false).assertEqual(true); - } catch (err) { - expect(err.toString()).assertEqual("BusinessError: Syntax Error. Invalid Uri string"); - expect(err.code).assertEqual(10200002); - expect(err.message).assertEqual("Syntax Error. Invalid Uri string"); - } - }); - - /** - * @tc.number: TEST_URI_CONSTRUCTION_005 - * @tc.name : testUriConstruction005 - * @tc.desc : Constructs a URI by parsing the given string. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUriConstruction005", 0, function () { - try { - let that = new uri.URI("1http://username:password@host:8080/directory/file?foo=1&bar=2#gaogaofaofao"); - expect(false).assertEqual(true); - } catch (err) { - expect(err.toString()).assertEqual("BusinessError: Syntax Error. Invalid Uri string"); - expect(err.code).assertEqual(10200002); - expect(err.message).assertEqual("Syntax Error. Invalid Uri string"); - } - }); - - /** - * @tc.number: TEST_URI_CONSTRUCTION_006 - * @tc.name : testUriConstruction006 - * @tc.desc : Constructs a URI by parsing the given string. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUriConstruction006", 0, function () { - try { - let that = new uri.URI("ht@tp://username:password@host:8080/directory/file?foo=1&bar=2#gaogaofaofao"); - expect(false).assertEqual(true); - } catch (err) { - expect(err.toString()).assertEqual("BusinessError: Syntax Error. Invalid Uri string"); - expect(err.code).assertEqual(10200002); - expect(err.message).assertEqual("Syntax Error. Invalid Uri string"); - } - }); - - /** - * @tc.number: TEST_URI_CONSTRUCTION_007 - * @tc.name : testUriConstruction007 - * @tc.desc : Constructs a URI by parsing the given string. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUriConstruction007", 0, function () { - try { - let that = new uri.URI("http://username:password@[::]:80r80/directory/file?foo=1&bar=2#gaogaofaofao"); - expect(false).assertEqual(true); - } catch (err) { - expect(err.toString()).assertEqual("BusinessError: Syntax Error. Invalid Uri string"); - expect(err.code).assertEqual(10200002); - expect(err.message).assertEqual("Syntax Error. Invalid Uri string"); - } - }); - - /** - * @tc.number: TEST_URI_CONSTRUCTION_008 - * @tc.name : testUriConstruction008 - * @tc.desc : Constructs a URI by parsing the given string. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUriConstruction008", 0, function () { - try { - let that = new uri.URI("http://username:password@[::12:55:8080/directory/file?foo=1&bar=2#gaogaofaofao"); - expect(false).assertEqual(true); - } catch (err) { - expect(err.toString()).assertEqual("BusinessError: Syntax Error. Invalid Uri string"); - expect(err.code).assertEqual(10200002); - expect(err.message).assertEqual("Syntax Error. Invalid Uri string"); - } - }); - - /** - * @tc.number: TEST_URI_CONSTRUCTION_009 - * @tc.name : testUriConstruction009 - * @tc.desc : Constructs a URI by parsing the given string. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUriConstruction009", 0, function () { - try { - let that = new uri.URI("http://username:pa^ssword@[::12:55]:8080/directory/file?foo=1&bar=2#gaogaofaofao"); - expect(false).assertEqual(true); - } catch (err) { - expect(err.toString()).assertEqual("BusinessError: Syntax Error. Invalid Uri string"); - expect(err.code).assertEqual(10200002); - expect(err.message).assertEqual("Syntax Error. Invalid Uri string"); - } - }); - - /** - * @tc.number: TEST_URI_CONSTRUCTION_010 - * @tc.name : testUriConstruction010 - * @tc.desc : Constructs a URI by parsing the given string. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUriConstruction010", 0, function () { - try { - let that = new uri.URI("http://username:password@[::1你2:55]:8080/directory/file?foo=1&bar=2#gaogaofaofao"); - expect(false).assertEqual(true); - } catch (err) { - expect(err.toString()).assertEqual("BusinessError: Syntax Error. Invalid Uri string"); - expect(err.code).assertEqual(10200002); - expect(err.message).assertEqual("Syntax Error. Invalid Uri string"); - } - }); - - /** - * @tc.number: TEST_URI_CONSTRUCTION_011 - * @tc.name : testUriConstruction011 - * @tc.desc : Constructs a URI by parsing the given string. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUriConstruction011", 0, function () { - let gaogao = new uri.URI("http://gg:gaogao@www.baidu.com:99/path/path?query#fagment"); - expect(gaogao.scheme).assertEqual("http"); - expect(gaogao.authority).assertEqual("gg:gaogao@www.baidu.com:99"); - expect(gaogao.ssp).assertEqual("//gg:gaogao@www.baidu.com:99/path/path?query"); - expect(gaogao.userInfo).assertEqual("gg:gaogao"); - expect(gaogao.host).assertEqual("www.baidu.com"); - expect(gaogao.port).assertEqual("99"); - expect(gaogao.path).assertEqual("/path/path"); - expect(gaogao.query).assertEqual("query"); - expect(gaogao.fragment).assertEqual("fagment"); - }); - - /** - * @tc.number: TEST_EQUALS_TO_001 - * @tc.name : testEqualsTo001 - * @tc.desc : Tests this URI for equality with another object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEqualsTo001", 0, function () { - let gaogao = new uri.URI("http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/path1?query#fagment"); - let gaogao1 = gaogao; - let res = gaogao.equalsTo(gaogao1); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_EQUALS_TO_002 - * @tc.name : testEqualsTo002 - * @tc.desc : Tests this URI for equality with another object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEqualsTo002", 0, function () { - let gaogao = new uri.URI("http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/path1?query#fagment"); - let gaogao1 = new uri.URI("http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/path1?query#fagment"); - let res = gaogao.equalsTo(gaogao1); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_EQUALS_TO_003 - * @tc.name : testEqualsTo003 - * @tc.desc : Tests this URI for equality with another object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEqualsTo003", 0, function () { - let gaogao = new uri.URI("http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/path1?query#fagment"); - let gaogao1 = new uri.URI("http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/path1?query#fagment123"); - let res = gaogao.equalsTo(gaogao1); - expect(res).assertEqual(false); - }); - - /** - * @tc.number: TEST_EQUALS_TO_004 - * @tc.name : testEqualsTo004 - * @tc.desc : Tests this URI for equality with another object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEqualsTo004", 0, function () { - let gaogao = new uri.URI("http://gg:gaogao@wwwaaa:99/path1?query#fagment"); - let gaogao1 = new uri.URI("http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/path1?query#fagment123"); - let res = gaogao.equalsTo(gaogao1); - expect(res).assertEqual(false); - }); - - /** - * @tc.number: TEST_EQUALS_TO_005 - * @tc.name : testEqualsTo005 - * @tc.desc : Tests this URI for equality with another object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEqualsTo005", 0, function () { - let gaogao = new uri.URI("http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/path1?query#fagment"); - let gaogao1 = new uri.URI("http://[1:0:0:1:2:1:2:1]/path1?query#fagment123"); - let res = gaogao.equalsTo(gaogao1); - expect(res).assertEqual(false); - }); - - /** - * @tc.number: TEST_NORMALIZE_001 - * @tc.name : testNormalize001 - * @tc.desc : Normalizes this URI's path. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testNormalize001", 0, function () { - let gaogao = new uri.URI("http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/path/66./../././mm/.././path1?query#fagment"); - let res = gaogao.normalize(); - expect(res.path).assertEqual("/path/path1"); - expect(res.toString()).assertEqual("http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/path/path1?query#fagment"); - }); - - /** - * @tc.number: TEST_NORMALIZE_002 - * @tc.name : testNormalize002 - * @tc.desc : Normalizes this URI's path. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testNormalize002", 0, function () { - let gaogao = new uri.URI("http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/../../path?query#fagment"); - let res = gaogao.normalize(); - expect(res.path).assertEqual("/../../path"); - expect(res.toString()).assertEqual("http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/../../path?query#fagment"); - }); - - /** - * @tc.number: TEST_NORMALIZE_003 - * @tc.name : testNormalize003 - * @tc.desc : Normalizes this URI's path. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testNormalize003", 0, function () { - let gaogao = new uri.URI("http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/../../path/.././../aa/bb/cc?query#fagment"); - let res = gaogao.normalize(); - expect(res.path).assertEqual("/../../../aa/bb/cc"); - expect(res.toString()).assertEqual("http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/../../../aa/bb/cc?query#fagment"); - }); - - /** - * @tc.number: TEST_NORMALIZE_004 - * @tc.name : testNormalize004 - * @tc.desc : Normalizes this URI's path. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testNormalize004", 0, function () { - let gaogao = new uri.URI("http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/../path/.././../aa/bb/cc?query"); - let res = gaogao.normalize(); - expect(res.path).assertEqual("/../../aa/bb/cc"); - expect(res.toString()).assertEqual("http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/../../aa/bb/cc?query"); - }); - - /** - * @tc.number: TEST_NORMALIZE_005 - * @tc.name : testNormalize005 - * @tc.desc : Normalizes this URI's path. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testNormalize005", 0, function () { - let gaogao = new uri.URI("http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/./path/./aa/bb/cc?query#fagment"); - let res = gaogao.normalize(); - expect(res.path).assertEqual("/path/aa/bb/cc"); - expect(res.toString()).assertEqual("http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/path/aa/bb/cc?query#fagment"); - }); - - /** - * @tc.number: TEST_TO_STRING_001 - * @tc.name : testToString001 - * @tc.desc : Returns the content of this URI as a US-ASCII string. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testToString001", 0, function () { - let gaogao = new uri.URI("http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/../../path/.././../aa/bb/cc?query#fagment"); - let res = gaogao.toString(); - expect(res).assertEqual("http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/../../path/.././../aa/bb/cc?query#fagment"); - }); - - /** - * @tc.number: TEST_TO_STRING_002 - * @tc.name : testToString002 - * @tc.desc : Returns the content of this URI as a US-ASCII string. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testToString002", 0, function () { - let gaogao = new uri.URI("htt1p://gg:gaogao@[::192.9.5.5]:99/path/66path1?query#fagment"); - let res = gaogao.toString(); - expect(res).assertEqual("htt1p://gg:gaogao@[::192.9.5.5]:99/path/66path1?query#fagment"); - }); - - /** - * @tc.number: TEST_TO_STRING_003 - * @tc.name : testToString003 - * @tc.desc : Returns the content of this URI as a US-ASCII string. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testToString003", 0, function () { - let gaogao = new uri.URI("ftp://username:password@www.baidu.com:88/path?query#fagment"); - let res = gaogao.toString(); - expect(res).assertEqual("ftp://username:password@www.baidu.com:88/path?query#fagment"); - }); - - /** - * @tc.number: TEST_TO_STRING_004 - * @tc.name : testToString004 - * @tc.desc : Returns the content of this URI as a US-ASCII string. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testToString004", 0, function () { - let gaogao = new uri.URI("http://gg:gao你好gao@199.98.55.44:99/path/p你好ath?qu你好ery#fag你好ment"); - let res = gaogao.toString(); - expect(res).assertEqual("http://gg:gao%E4%BD%A0%E5%A5%BDgao@199.98.55.44:99/path/" + "p%E4%BD%A0%E5%A5%BDath?qu%E4%BD%A0%E5%A5%BDery#fag%E4%BD%A0%E5%A5%BDment"); - }); - - /** - * @tc.number: TEST_TO_STRING_005 - * @tc.name : testToString005 - * @tc.desc : Returns the content of this URI as a US-ASCII string. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testToString005", 0, function () { - let gaogao = new uri.URI("http://gg:gaogao@199.98.55.44:99/path/path?query#fagment"); - let res = gaogao.toString(); - expect(res).assertEqual("http://gg:gaogao@199.98.55.44:99/path/path?query#fagment"); - }); - - /** - * @tc.number: TEST_CHECK_IS_ABSOLUTE_001 - * @tc.name : testCheckIsAbsolute001 - * @tc.desc : Tells whether or not this URI is absolute. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testCheckIsAbsolute001", 0, function () { - let gaogao = new uri.URI("f/tp://username:password@www.baidu.com:88/path?query#fagment"); - let res = gaogao.checkIsAbsolute(); - expect(res).assertEqual(false); - }); - - /** - * @tc.number: TEST_CHECK_IS_ABSOLUTE_002 - * @tc.name : testCheckIsAbsolute002 - * @tc.desc : Tells whether or not this URI is absolute. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testCheckIsAbsolute002", 0, function () { - let gaogao = new uri.URI("ftp://username:password@www.baidu.com:88/path?query#fagment"); - let res = gaogao.checkIsAbsolute(); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_CHECK_IS_ABSOLUTE_003 - * @tc.name : testCheckIsAbsolute003 - * @tc.desc : Tells whether or not this URI is absolute. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testCheckIsAbsolute003", 0, function () { - let gaogao = new uri.URI("htt/p://username:password@www.baidu.com:88/path?query#fagment"); - let res = gaogao.checkIsAbsolute(); - expect(res).assertEqual(false); - }); - - /** - * @tc.number: TEST_CHECK_IS_ABSOLUTE_004 - * @tc.name : testCheckIsAbsolute004 - * @tc.desc : Tells whether or not this URI is absolute. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testCheckIsAbsolute004", 0, function () { - let gaogao = new uri.URI("https://username:password@www.baidu.com:88/path?query#fagment"); - let res = gaogao.checkIsAbsolute(); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_CHECK_IS_ABSOLUTE_005 - * @tc.name : testCheckIsAbsolute005 - * @tc.desc : Tells whether or not this URI is absolute. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testCheckIsAbsolute005", 0, function () { - let gaogao = new uri.URI("http1://username:password@www.baidu.com:88/path?query#fagment"); - let res = gaogao.checkIsAbsolute(); - expect(res).assertEqual(true); - }); - }); -} diff --git a/commonlibrary/crossplatform/commonlibraryurietstest/src/main/module.json b/commonlibrary/crossplatform/commonlibraryurietstest/src/main/module.json deleted file mode 100644 index a4443e713..000000000 --- a/commonlibrary/crossplatform/commonlibraryurietstest/src/main/module.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "module": { - "name": "entry_test", - "type": "feature", - "description": "$string:module_test_desc", - "mainElement": "TestAbility", - "deviceTypes": [ - "phone" - ], - "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", - "skills": [ - { - "actions": [ - "action.system.home" - ], - "entities": [ - "entity.system.home" - ] - } - ] - } - ] - } -} diff --git a/commonlibrary/crossplatform/commonlibraryurietstest/src/main/resources/base/element/color.json b/commonlibrary/crossplatform/commonlibraryurietstest/src/main/resources/base/element/color.json deleted file mode 100644 index 3c712962d..000000000 --- a/commonlibrary/crossplatform/commonlibraryurietstest/src/main/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/commonlibrary/crossplatform/commonlibraryurietstest/src/main/resources/base/element/string.json b/commonlibrary/crossplatform/commonlibraryurietstest/src/main/resources/base/element/string.json deleted file mode 100644 index 65d8fa5a7..000000000 --- a/commonlibrary/crossplatform/commonlibraryurietstest/src/main/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/commonlibrary/crossplatform/commonlibraryurietstest/src/main/resources/base/media/icon.png b/commonlibrary/crossplatform/commonlibraryurietstest/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6BLrPFWk?s;$LOP{GmJpBl$qoSA!PUg~PA65-S00{{S`XKG6NkG0RgjEntPrmV+?0|00mu7;+5 zrdpa{2QLqPJ4Y{j7=Mrl{BaxrkdY69+c~(w{Fv-v&aR%aEI&JYSeRTLWm!zbv;?)_ ziZB;fwGbbeL5Q}YLx`J$lp~A09KK8t_z}PZ=4ZzgdeKtgoc+o5EvN9A1K1_<>M?MBqb#!ASf&# zEX?<)!RH(7>1P+j=jqG(58}TVN-$psA6K}atCuI!KTJD&FMmH-78ZejBm)0qc{ESp z|LuG1{QnBUJRg_E=h1#XMWt2%fcoN@l7eAS!Es?Q+;XsRNPhiiE=@AqlLkJzF`O18 zbsbSmKN=aaq8k3NFYZfDWpKmM!coBU0(XnL8R{4=i|wi{!uWYM2je{U{B*K2PVdu&=E zTq*-XsEsJ$u5H4g6DIm2Y!DN`>^v|AqlwuCD;w45K0@eqauiqWf7l&o)+YLHm~|L~ z7$0v5mkobriU!H<@mVJHLlmQqzQ3d6Rh_-|%Yy2li*tHO>_vcnuZ7OR_xkAIuIU&x z-|8Y0wj|6|a6_I(v91y%k_kNw6pnkNdxjqG8!%Vz_d%c_!X+6-;1`GC9_FpjoHev5fEV7RhJ>r=mh-jp$fqbqRJ=obwdgLDVP5+s zy1=_DWG0Y-Jb3t^WXmkr(d9~08k-|#Ly zaNOmT(^9tIb&eb4%CzIT zAm3CUtWSr1t4?h1kk#NBi{U|pJslvME{q|_eS^3En>SOqSxyuN1x;Is@8~m?*>}** znrRFArP!K_52RpX*&JHMR<^lVdm8ypJ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iG z@7p>N&pNzjfX- z+r8Uw^|q#!F6{fwMs7-bOMU!e-^gyT&1cJ@Vg93K8`dH}N|*Pz(pf2rd5A=i3{ngs zQNQ^Fku-tq2joee^|CNUEO4a=vC^LAH4UO=8*YdUNBU+^U%BDX+(q4z%neQNU3EB4 z&s)Fc#l-gqziwy%yQFtNm7Y-CbMf$WcA+S6BZC5e)gBu*+2aF5|k;-w8?Qf_(n=C>#O>~e}}*Xg#x zy=}GZs1w7hC-9{J4o%UP*}r;EVdsd}QzH+RcTag`=}dXtxoz_# z$)+=(P{M+MqmWt82h-l3_6utMu7Y&yn60h1+Ft{PInC<-MA6Ii)~1acZh>`;rZvrH zx96Uj)p=4oz9p685zg`G@*t0<5Fb209LW=`-ViZ@0)5$G6t~;|lytq43hgw{CvHEK}{-k@oHG8-)`;JNvrmw};BME}?6dA6@bjdT&$b z!9Q3*_5O3~W|W!_biMQ8`iUF1-CVvr`{wDksmt%Yv~d5dygOHq^{)C}V()MRe3&>r zk|X~I#~vwe!%i51KLrqc5IVm=vFr`z#!K(sDfidyJX*Tx(&6l*XLBws_GX(d>+Bbo zFP-4;(*OI+)vmFhUp+gT6RRUnQS8q0@Mde*bjjTVHM>4pyEgm7;IlpB5|i$|dcoKl zzPt**L_3&P-*MSn&z>uS5_3G7g@oL+>W-0Wkjl-6TT*abrK+Xn0`K zeIp|k%Hj^i5+E-DphPBzWVN99!Ke@t3-i-w_xf}PKAt}Rxz3L!l?LxzhmZfUI{UXuAB32 p`bB~g=b$ybG5xD)+{{cxiT&e&7 diff --git a/commonlibrary/crossplatform/commonlibraryurletstest/src/main/ets/TestAbility/TestAbility.ets b/commonlibrary/crossplatform/commonlibraryurletstest/src/main/ets/TestAbility/TestAbility.ets deleted file mode 100644 index 368aef919..000000000 --- a/commonlibrary/crossplatform/commonlibraryurletstest/src/main/ets/TestAbility/TestAbility.ets +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import UIAbility from '@ohos.app.ability.UIAbility'; -import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; -import hilog from '@ohos.hilog'; -import { Hypium } from '@ohos/hypium'; -import testsuite from '../test/List.test'; -import window from '@ohos.window'; - -export default class TestAbility extends UIAbility { - onCreate(want, 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) ?? ''); - var abilityDelegator: any - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var abilityDelegatorArguments: any - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - hilog.info(0x0000, 'testTag', '%{public}s', 'start run testcase!!!'); - Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) - } - - onDestroy() { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onDestroy'); - } - - onWindowStageCreate(windowStage: window.WindowStage) { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageCreate'); - windowStage.loadContent('TestAbility/pages/Index', (err, data) => { - 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. Data: %{public}s', - JSON.stringify(data) ?? ''); - }); - } - - 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/commonlibrary/crossplatform/commonlibraryurletstest/src/main/ets/TestAbility/pages/Index.ets b/commonlibrary/crossplatform/commonlibraryurletstest/src/main/ets/TestAbility/pages/Index.ets deleted file mode 100644 index e95640899..000000000 --- a/commonlibrary/crossplatform/commonlibraryurletstest/src/main/ets/TestAbility/pages/Index.ets +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import hilog from '@ohos.hilog'; - -@Entry -@Component -struct Index { - aboutToAppear() { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility index aboutToAppear'); - } - @State message: string = 'Hello World' - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Button() { - Text('next page') - .fontSize(20) - .fontWeight(FontWeight.Bold) - }.type(ButtonType.Capsule) - .margin({ - top: 20 - }) - .backgroundColor('#0D9FFB') - .width('35%') - .height('5%') - .onClick(()=>{ - }) - } - .width('100%') - } - .height('100%') - } - } \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryurletstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/commonlibrary/crossplatform/commonlibraryurletstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts deleted file mode 100644 index 92a16d84e..000000000 --- a/commonlibrary/crossplatform/commonlibraryurletstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts +++ /dev/null @@ -1,49 +0,0 @@ -import hilog from '@ohos.hilog'; -import TestRunner from '@ohos.application.testRunner'; -import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; - -var abilityDelegator = undefined -var abilityDelegatorArguments = undefined - -async function onAbilityCreateCallback() { - hilog.info(0x0000, 'testTag', '%{public}s', 'onAbilityCreateCallback'); -} - -async function addAbilityMonitorCallback(err: any) { - 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() { - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun run'); - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var testAbilityName = abilityDelegatorArguments.bundleName + '.TestAbility' - let lMonitor = { - abilityName: testAbilityName, - onAbilityCreate: onAbilityCreateCallback, - }; - abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) - var cmd = 'aa start -d 0 -a TestAbility' + ' -b ' + abilityDelegatorArguments.bundleName - var debug = abilityDelegatorArguments.parameters['-D'] - if (debug == 'true') - { - cmd += ' -D' - } - hilog.info(0x0000, 'testTag', 'cmd : %{public}s', cmd); - abilityDelegator.executeShellCommand(cmd, - (err: any, d: any) => { - hilog.info(0x0000, 'testTag', 'executeShellCommand : err : %{public}s', JSON.stringify(err) ?? ''); - hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.stdResult ?? ''); - hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.exitCode ?? ''); - }) - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun end'); - } -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryurletstest/src/main/ets/test/List.test.ets b/commonlibrary/crossplatform/commonlibraryurletstest/src/main/ets/test/List.test.ets deleted file mode 100644 index 16cb8dd2d..000000000 --- a/commonlibrary/crossplatform/commonlibraryurletstest/src/main/ets/test/List.test.ets +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import UrlFunTest from './url.test' - -export default function testsuite() { - UrlFunTest() -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryurletstest/src/main/ets/test/url.test.ets b/commonlibrary/crossplatform/commonlibraryurletstest/src/main/ets/test/url.test.ets deleted file mode 100644 index 34671e7a3..000000000 --- a/commonlibrary/crossplatform/commonlibraryurletstest/src/main/ets/test/url.test.ets +++ /dev/null @@ -1,1737 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; -import Url from "@ohos.url"; -export default function UrlFunTest() { - describe("UrlFunTest", function () { - /** - * @tc.number: TEST_PARAMS_APPEND_001 - * @tc.name : testParamsAppend001 - * @tc.desc : Appends a specified key/value pair as a new search parameter. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsAppend001", 0, function () { - let that = Url.URL.parseURL("http://username:password@host:8080/directory/file?foo=1&bar=2"); - let params = new Url.URLParams(that.search); - params.append("ma", "jk"); - let result = params.toString(); - expect(result).assertEqual("foo=1&bar=2&ma=jk"); - }); - - /** - * @tc.number: TEST_PARAMS_APPEND_002 - * @tc.name : testParamsAppend001 - * @tc.desc : Appends a specified key/value pair as a new search parameter. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsAppend002", 0, function () { - let that = Url.URL.parseURL("http://username:password@host:8080/directory/file?foo=1&bar=2"); - let params = new Url.URLParams(that.search); - params.append("ma 大", "jk¥"); - let result = params.toString(); - expect(result).assertEqual("foo=1&bar=2&ma+%E5%A4%A7=jk%EF%BF%A5"); - }); - - /** - * @tc.number: TEST_PARAMS_APPEND_003 - * @tc.name : testParamsAppend001 - * @tc.desc : Appends a specified key/value pair as a new search parameter. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsAppend003", 0, function () { - let that = Url.URL.parseURL("http://username:password@host:8080/directory/file?foo=1&bar=2"); - let params = new Url.URLParams(that.search); - params.append("foo~!@#$%^&*()_+-=", "jk"); - let result = params.toString(); - expect(result).assertEqual("foo=1&bar=2&foo%7E%21%40%23%24%25%5E%26*%28%29_%2B-%3D=jk"); - }); - - /** - * @tc.number: TEST_PARAMS_APPEND_004 - * @tc.name : testParamsAppend001 - * @tc.desc : Appends a specified key/value pair as a new search parameter. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsAppend004", 0, function () { - let that = Url.URL.parseURL("https://example.com?foo=1&bar=2"); - let params = new Url.URLParams(that.search); - params.append("app", "par"); - let result = params.toString(); - expect(result).assertEqual("foo=1&bar=2&app=par"); - }); - - /** - * @tc.number: TEST_PARAMS_APPEND_005 - * @tc.name : testParamsAppend001 - * @tc.desc : Appends a specified key/value pair as a new search parameter. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsAppend005", 0, function () { - let that = Url.URL.parseURL("https://example.com?foo=1&bar=2"); - let params = new Url.URLParams(that.search); - params.append("123", "456"); - let result = params.toString(); - expect(result).assertEqual("foo=1&bar=2&123=456"); - }); - - /** - * @tc.number: TEST_PARAMS_APPEND_006 - * @tc.name : testParamsAppend001 - * @tc.desc : Appends throw BusinessError: Parameter error. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsAppend006", 0, function () { - let a = "123"; - let b = undefined; - try { - let that = Url.URL.parseURL("https://example.com?foo=1&bar=2"); - let params = new Url.URLParams(that.search); - params.append(a, b); - expect(0).assertEqual(1); - } catch (err) { - expect(err.toString()).assertEqual(`BusinessError: Parameter error.The type of ${b} must be string`); - expect(err.code).assertEqual(401); - expect(err.message).assertEqual(`Parameter error.The type of ${b} must be string`); - } - }); - - /** - * @tc.number: TEST_PARAMS_DELETE_001 - * @tc.name : testParamsDelete001 - * @tc.desc : Deletes the given search parameter and its associated value,from the list of all search parameters. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsDelete001", 0, function () { - let that = Url.URL.parseURL("https://example.com?foo=1&bar=2"); - let params = new Url.URLParams(that.search); - params.delete("foo"); - let result = params.toString(); - expect(result).assertEqual("bar=2"); - }); - - /** - * @tc.number: TEST_PARAMS_DELETE_002 - * @tc.name : testParamsDelete002 - * @tc.desc : Deletes the given search parameter and its associated value,from the list of all search parameters. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsDelete002", 0, function () { - let that = Url.URL.parseURL("https://example.com?foo大=1&bar=2"); - let params = new Url.URLParams(that.search); - params.delete("foo"); - let result = params.toString(); - expect(result).assertEqual("foo%E5%A4%A7=1&bar=2"); - }); - - /** - * @tc.number: TEST_PARAMS_DELETE_003 - * @tc.name : testParamsDelete003 - * @tc.desc : Deletes the given search parameter and its associated value,from the list of all search parameters. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsDelete003", 0, function () { - let that = Url.URL.parseURL("https://example.com?foo大=1&bar=2"); - let params = new Url.URLParams(that.search); - params.delete("foo大"); - let result = params.toString(); - expect(result).assertEqual("bar=2"); - }); - - /** - * @tc.number: TEST_PARAMS_DELETE_004 - * @tc.name : testParamsDelete004 - * @tc.desc : Deletes the given search parameter and its associated value,from the list of all search parameters. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsDelete004", 0, function () { - let that = Url.URL.parseURL("https://example.com?foo=1&bar=2"); - let params = new Url.URLParams(that.search); - params.delete("bar"); - let result = params.toString(); - expect(result).assertEqual("foo=1"); - }); - - /** - * @tc.number: TEST_PARAMS_DELETE_005 - * @tc.name : testParamsDelete005 - * @tc.desc : Deletes the given search parameter and its associated value,from the list of all search parameters. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsDelete005", 0, function () { - let that = Url.URL.parseURL("https://example.com?foo=1&bar=2"); - let params = new Url.URLParams(that.search); - params.delete("faa"); - let result = params.toString(); - expect(result).assertEqual("foo=1&bar=2"); - }); - - /** - * @tc.number: TEST_PARAMS_GET_ALL_001 - * @tc.name : testParamsGetAll001 - * @tc.desc : Returns all key-value pairs associated with a given search parameter as an array. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsGetAll001", 0, function () { - let params = new Url.URLParams("key1=value1&key2=value2"); - params.append("key1", "AAA"); - let result = params.getAll("key1"); - expect(result.toString()).assertEqual("value1,AAA"); - }); - - /** - * @tc.number: TEST_PARAMS_GET_ALL_002 - * @tc.name : testParamsGetAll002 - * @tc.desc : Returns all key-value pairs associated with a given search parameter as an array. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsGetAll002", 0, function () { - let params = new Url.URLParams("key1=value1&8=DEF"); - params.append("8", "A8A"); - let result = params.getAll("8"); - expect(result.toString()).assertEqual("DEF,A8A"); - }); - - /** - * @tc.number: TEST_PARAMS_GET_ALL_003 - * @tc.name : testParamsGetAll003 - * @tc.desc : Returns all key-value pairs associated with a given search parameter as an array. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsGetAll003", 0, function () { - let params = new Url.URLParams("key1=value1&key2=value2&key3=da"); - params.append("key3", "A3A"); - let result = params.getAll("key3"); - expect(result.toString()).assertEqual("da,A3A"); - }); - - /** - * @tc.number: TEST_PARAMS_GET_ALL_004 - * @tc.name : testParamsGetAll004 - * @tc.desc : Returns all key-value pairs associated with a given search parameter as an array. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsGetAll004", 0, function () { - let params = new Url.URLParams("key1=value1&key2=value2&key3=大"); - params.append("key3", "A3A"); - let result = params.getAll("key4"); - expect(result.toString()).assertEqual(""); - }); - - /** - * @tc.number: TEST_PARAMS_GET_ALL_005 - * @tc.name : testParamsGetAll005 - * @tc.desc : Returns all key-value pairs associated with a given search parameter as an array. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsGetAll005", 0, function () { - let params = new Url.URLParams("key1=value1&key2=value2&key3=大"); - params.append("key3", "A3A"); - let result = params.getAll("key2"); - expect(result.toString()).assertEqual("value2"); - }); - - /** - * @tc.number: TEST_PARAMS_ENTRIES_001 - * @tc.name : testParamsEntries001 - * @tc.desc : Returns an ES6 iterator. Each item of the iterator is a JavaScript Array. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsEntries001", 0, function () { - let params = new Url.URLParams("key1=value1&key2=value2"); - - let i = 0; - let arr = {}; - for (let pair of params.entries()) { - arr[i] = pair[0]; - i++; - arr[i] = pair[1]; - i++; - } - expect(arr[1]).assertEqual("value1"); - }); - - /** - * @tc.number: TEST_PARAMS_ENTRIES_002 - * @tc.name : testParamsEntries002 - * @tc.desc : Returns an ES6 iterator. Each item of the iterator is a JavaScript Array. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsEntries002", 0, function () { - let params = new Url.URLParams("key1=value1&key2=value2"); - let i = 0; - let arr = {}; - for (let pair of params.entries()) { - arr[i] = pair[0]; - i++; - arr[i] = pair[1]; - i++; - } - expect(arr[2]).assertEqual("key2"); - }); - - /** - * @tc.number: TEST_PARAMS_ENTRIES_003 - * @tc.name : testParamsEntries003 - * @tc.desc : Returns an ES6 iterator. Each item of the iterator is a JavaScript Array. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsEntries003", 0, function () { - let params = new Url.URLParams("key1=value1&key2=value2"); - params.append("foo", "jk"); - let i = 0; - let arr = {}; - for (let pair of params.entries()) { - arr[i] = pair[0]; - i++; - arr[i] = pair[1]; - i++; - } - expect(arr[5]).assertEqual("jk"); - }); - - /** - * @tc.number: TEST_PARAMS_ENTRIES_004 - * @tc.name : testParamsEntries004 - * @tc.desc : Returns an ES6 iterator. Each item of the iterator is a JavaScript Array. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsEntries004", 0, function () { - let params = new Url.URLParams("key1=value1&key2=value2"); - let i = 0; - let arr = {}; - for (let pair of params.entries()) { - arr[i] = pair[0]; - i++; - arr[i] = pair[1]; - i++; - } - expect(arr[3]).assertEqual("value2"); - }); - - /** - * @tc.number: TEST_PARAMS_ENTRIES_005 - * @tc.name : testParamsEntries005 - * @tc.desc : Returns an ES6 iterator. Each item of the iterator is a JavaScript Array. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsEntries005", 0, function () { - let params = new Url.URLParams("key1=value1&key2=value2"); - params.append("jss", "txt"); - let i = 0; - let arr = {}; - for (let pair of params.entries()) { - arr[i] = pair[0]; - i++; - arr[i] = pair[1]; - i++; - } - expect(arr[4]).assertEqual("jss"); - }); - - /** - * @tc.number: TEST_PARAMS_FOREACH_001 - * @tc.name : testParamsForEach001 - * @tc.desc : Callback functions are used to traverse key-value pairs on the URLParams instance object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsForEach001", 0, function () { - let params = new Url.URLParams("key1=value1&key2=value2"); - let arr = {}; - let i = 0; - function func(value, key, SearchParams) { - arr[i] = value + " " + key + " " + (params === SearchParams); - i++; - } - params.forEach(func); - expect(arr[0]).assertEqual("value1 key1 true"); - }); - - /** - * @tc.number: TEST_PARAMS_FOREACH_002 - * @tc.name : testParamsForEach002 - * @tc.desc : Callback functions are used to traverse key-value pairs on the URLParams instance object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsForEach002", 0, function () { - let params = new Url.URLParams("key1=value1&key2=value2"); - let arr = {}; - let i = 0; - function func(value, key, SearchParams) { - arr[i] = value + " " + key + " " + (params === SearchParams); - i++; - } - params.forEach(func); - expect(arr[1]).assertEqual("value2 key2 true"); - }); - - /** - * @tc.number: TEST_PARAMS_FOREACH_003 - * @tc.name : testParamsForEach003 - * @tc.desc : Callback functions are used to traverse key-value pairs on the URLParams instance object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsForEach003", 0, function () { - let params = new Url.URLParams("key1=value1&key2=value2"); - params.append("foo", "jk"); - let arr = {}; - let i = 0; - function func(value, key, SearchParams) { - arr[i] = value + " " + key + " " + (params === SearchParams); - i++; - } - params.forEach(func); - expect(arr[2]).assertEqual("jk foo true"); - }); - - /** - * @tc.number: TEST_PARAMS_FOREACH_004 - * @tc.name : testParamsForEach004 - * @tc.desc : Callback functions are used to traverse key-value pairs on the URLParams instance object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsForEach004", 0, function () { - let params = new Url.URLParams("foo=bar&jss=txt"); - let arr = {}; - let i = 0; - function func(value, key, SearchParams) { - arr[i] = value + " " + key + " " + (params === SearchParams); - i++; - } - params.forEach(func); - expect(arr[1]).assertEqual("txt jss true"); - }); - - /** - * @tc.number: TEST_PARAMS_FOREACH_005 - * @tc.name : testParamsForEach005 - * @tc.desc : Callback functions are used to traverse key-value pairs on the URLParams instance object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsForEach005", 0, function () { - let params = new Url.URLParams("foo=bar&jss=txt"); - params.append("foo", "jk"); - let arr = {}; - let i = 0; - function func(value, key, SearchParams) { - arr[i] = value + " " + key + " " + (params === SearchParams); - i++; - } - params.forEach(func); - expect(arr[0]).assertEqual("bar foo true"); - }); - - /** - * @tc.number: TEST_PARAMS_GET_001 - * @tc.name : testParamsGet001 - * @tc.desc : Returns the first value associated to the given search parameter. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsGet001", 0, function () { - let params = new Url.URLParams("key1=value1&key2=value2"); - let result = params.get("1"); - expect(result).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_PARAMS_GET_002 - * @tc.name : testParamsGet002 - * @tc.desc : Returns the first value associated to the given search parameter. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsGet002", 0, function () { - let params = new Url.URLParams("key1=value1&key2=value2"); - let result = params.get("key2"); - expect(result).assertEqual("value2"); - }); - - /** - * @tc.number: TEST_PARAMS_GET_003 - * @tc.name : testParamsGet003 - * @tc.desc : Returns the first value associated to the given search parameter. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsGet003", 0, function () { - let params = new Url.URLParams("key1=value1&key2=value2"); - params.append("5", "JKL"); - let result = params.get("5"); - expect(result).assertEqual("JKL"); - }); - - /** - * @tc.number: TEST_PARAMS_GET_004 - * @tc.name : testParamsGet004 - * @tc.desc : Returns the first value associated to the given search parameter. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsGet004", 0, function () { - let params = new Url.URLParams("key1=value1&key2=value2"); - let result = params.get("key1"); - expect(result).assertEqual("value1"); - }); - - /** - * @tc.number: TEST_PARAMS_GET_005 - * @tc.name : testParamsGet005 - * @tc.desc : Returns the first value associated to the given search parameter. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsGet005", 0, function () { - let params = new Url.URLParams("key1=value1&key2=value2"); - params.append("jss", "JL"); - let result = params.get("jss"); - expect(result).assertEqual("JL"); - }); - - /** - * @tc.number: TEST_PARAMS_HAS_001 - * @tc.name : testParamsHas001 - * @tc.desc : Returns a Boolean that indicates whether a parameter with the specified name exists. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsHas001", 0, function () { - let params = new Url.URLParams("key1=value1&key2=value2&key3=大"); - let result = params.has("2"); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_PARAMS_HAS_002 - * @tc.name : testParamsHas002 - * @tc.desc : Returns a Boolean that indicates whether a parameter with the specified name exists. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsHas002", 0, function () { - let params = new Url.URLParams("小=value1&key2=value2&key3=大"); - let result = params.has("小"); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_PARAMS_HAS_003 - * @tc.name : testParamsHas003 - * @tc.desc : Returns a Boolean that indicates whether a parameter with the specified name exists. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsHas003", 0, function () { - let params = new Url.URLParams("小=value1&¥=value2&key3=大"); - params.append("¥", "ACA"); - let result = params.has("¥"); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_PARAMS_HAS_004 - * @tc.name : testParamsHas004 - * @tc.desc : Returns a Boolean that indicates whether a parameter with the specified name exists. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsHas004", 0, function () { - let params = new Url.URLParams("小=value1&key2=value2&key3=大"); - let result = params.has("无"); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_PARAMS_HAS_005 - * @tc.name : testParamsHas005 - * @tc.desc : Returns a Boolean that indicates whether a parameter with the specified name exists. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsHas005", 0, function () { - let params = new Url.URLParams("小=value1&¥=value2&key3=大"); - params.append("¥", "ACA"); - let result = params.has("¥11"); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_PARAMS_SET_001 - * @tc.name : testParamsSet001 - * @tc.desc : Sets the value associated with a given search parameter to the given value. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - * If there were several matching values, this method deletes the others. - * If the search parameter doesn't exist, this method creates it. - */ - it("testParamsSet001", 0, function () { - let params = new Url.URLParams("1=value1&2=value2&key3=3"); - params.set("11", "CCC"); - let res = params.toString(); - expect(res).assertEqual("1=value1&2=value2&key3=3&11=CCC"); - }); - - /** - * @tc.number: TEST_PARAMS_SET_002 - * @tc.name : testParamsSet002 - * @tc.desc : Sets the value associated with a given search parameter to the given value. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - * If there were several matching values, this method deletes the others. - * If the search parameter doesn't exist, this method creates it. - */ - it("testParamsSet002", 0, function () { - let params = new Url.URLParams("1=value1&2=value2&key3=3"); - params.set("10", "BBB"); - let res = params.toString(); - expect(res).assertEqual("1=value1&2=value2&key3=3&10=BBB"); - }); - - /** - * @tc.number: TEST_PARAMS_SET_003 - * @tc.name : testParamsSet003 - * @tc.desc : Sets the value associated with a given search parameter to the given value. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - * If there were several matching values, this method deletes the others. - * If the search parameter doesn't exist, this method creates it. - */ - it("testParamsSet003", 0, function () { - let params = new Url.URLParams("1=value1&2=value2&key3=3"); - params.set("ma 大", "10¥"); - let res = params.toString(); - expect(res).assertEqual("1=value1&2=value2&key3=3&ma+%E5%A4%A7=10%EF%BF%A5"); - }); - - /** - * @tc.number: TEST_PARAMS_SET_004 - * @tc.name : testParamsSet004 - * @tc.desc : Sets the value associated with a given search parameter to the given value. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - * If there were several matching values, this method deletes the others. - * If the search parameter doesn't exist, this method creates it. - */ - it("testParamsSet004", 0, function () { - let params = new Url.URLParams("1=value1&2=value2&key3=3"); - params.set("1", "CCC"); - let res = params.toString(); - expect(res).assertEqual("1=CCC&2=value2&key3=3"); - }); - - /** - * @tc.number: TEST_PARAMS_SET_005 - * @tc.name : testParamsSet005 - * @tc.desc : Sets the value associated with a given search parameter to the given value. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - * If there were several matching values, this method deletes the others. - * If the search parameter doesn't exist, this method creates it. - */ - it("testParamsSet005", 0, function () { - let params = new Url.URLParams("1=value1&2=value2&key3=3"); - params.set("12", "BBB"); - let res = params.toString(); - expect(res).assertEqual("1=value1&2=value2&key3=3&12=BBB"); - }); - - /** - * @tc.number: TEST_PARAMS_SET_006 - * @tc.name : testParamsSet006 - * @tc.desc : toString throw BusinessError: Parameter error. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - * If there were several matching values, this method deletes the others. - * If the search parameter doesn't exist, this method creates it. - */ - it("testParamsSet006", 0, function () { - let b = undefined; - try { - let params = new Url.URLParams("1=value1&2=value2&key3=3"); - params.set("12", b); - let res = params.toString(); - expect(0).assertEqual(1); - } catch (err) { - expect(err.toString()).assertEqual(`BusinessError: Parameter error.The type of ${b} must be string`); - expect(err.code).assertEqual(401); - expect(err.message).assertEqual(`Parameter error.The type of ${b} must be string`); - } - }); - - /** - * @tc.number: TEST_PARAMS_SORT_001 - * @tc.name : testParamsSort001 - * @tc.desc : Sort all key/value pairs contained in this object in place and return undefined. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsSort001", 0, function () { - let params = new Url.URLParams("1=value1&3=value3&2=key2"); - params.sort(); - let res = params.toString(); - expect(res).assertEqual("1=value1&2=key2&3=value3"); - }); - - /** - * @tc.number: TEST_PARAMS_SORT_002 - * @tc.name : testParamsSort002 - * @tc.desc : Sort all key/value pairs contained in this object in place and return undefined. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsSort002", 0, function () { - let params = new Url.URLParams("a=value1&c=value2&b=key2"); - params.sort(); - let res = params.toString(); - expect(res).assertEqual("a=value1&b=key2&c=value2"); - }); - - /** - * @tc.number: TEST_PARAMS_SORT_003 - * @tc.name : testParamsSort003 - * @tc.desc : Sort all key/value pairs contained in this object in place and return undefined. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsSort003", 0, function () { - let params = new Url.URLParams("d=value1&c=value2&b=33"); - params.append("a", "ACA"); - params.sort(); - let res = params.toString(); - expect(res).assertEqual("a=ACA&b=33&c=value2&d=value1"); - }); - - /** - * @tc.number: TEST_PARAMS_SORT_004 - * @tc.name : testParamsSort004 - * @tc.desc : Sort all key/value pairs contained in this object in place and return undefined. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsSort004", 0, function () { - let params = new Url.URLParams("1=value1&3=value3&2=key2&4=key4"); - params.sort(); - let res = params.toString(); - expect(res).assertEqual("1=value1&2=key2&3=value3&4=key4"); - }); - - /** - * @tc.number: TEST_PARAMS_SORT_005 - * @tc.name : testParamsSort005 - * @tc.desc : Sort all key/value pairs contained in this object in place and return undefined. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsSort005", 0, function () { - let params = new Url.URLParams("a=value1&c=value2&4=key4&b=key2"); - params.sort(); - let res = params.toString(); - expect(res).assertEqual("4=key4&a=value1&b=key2&c=value2"); - }); - - /** - * @tc.number: TEST_PARAMS_KEYS_001 - * @tc.name : testParamsKeys001 - * @tc.desc : Returns an iterator allowing to go through all keys contained in this object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsKeys001", 0, function () { - let params = new Url.URLParams("小=value1&¥=value2&key3=大"); - let arr = {}; - let i = 0; - for (let key of params.keys()) { - arr[i] = key; - i++; - } - expect(arr[0]).assertEqual("小"); - }); - - /** - * @tc.number: TEST_PARAMS_KEYS_002 - * @tc.name : testParamsKeys002 - * @tc.desc : Returns an iterator allowing to go through all keys contained in this object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsKeys002", 0, function () { - let params = new Url.URLParams("小=value1&¥=value2&key3=大"); - let arr = {}; - let i = 0; - for (let key of params.keys()) { - arr[i] = key; - i++; - } - expect(arr[1]).assertEqual("¥"); - }); - - /** - * @tc.number: TEST_PARAMS_KEYS_003 - * @tc.name : testParamsKeys003 - * @tc.desc : Returns an iterator allowing to go through all keys contained in this object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsKeys003", 0, function () { - let params = new Url.URLParams("小=value1&¥=value2&key3=大"); - let arr = {}; - let i = 0; - for (let key of params.keys()) { - arr[i] = key; - i++; - } - expect(arr[2]).assertEqual("key3"); - }); - - /** - * @tc.number: TEST_PARAMS_KEYS_004 - * @tc.name : testParamsKeys004 - * @tc.desc : Returns an iterator allowing to go through all keys contained in this object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsKeys004", 0, function () { - let params = new Url.URLParams("小=value1&¥=value2&key3=大&key4=六"); - let arr = {}; - let i = 0; - for (let key of params.keys()) { - arr[i] = key; - i++; - } - expect(arr[3]).assertEqual("key4"); - }); - - /** - * @tc.number: TEST_PARAMS_KEYS_005 - * @tc.name : testParamsKeys005 - * @tc.desc : Returns an iterator allowing to go through all keys contained in this object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsKeys005", 0, function () { - let params = new Url.URLParams("小=value1&¥=value2&key3=大&key4=六&key5=发"); - let arr = {}; - let i = 0; - for (let key of params.keys()) { - arr[i] = key; - i++; - } - expect(arr[4]).assertEqual("key5"); - }); - - /** - * @tc.number: TEST_PARAMS_VALUES_001 - * @tc.name : testParamsValues001 - * @tc.desc : Returns an iterator allowing to go through all keys contained in this object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsValues001", 0, function () { - let params = new Url.URLParams("d=value1&c=value2&b=大"); - let arr = {}; - let i = 0; - for (let value of params.values()) { - arr[i] = value; - i++; - } - expect(arr[0]).assertEqual("value1"); - }); - - /** - * @tc.number: TEST_PARAMS_VALUES_002 - * @tc.name : testParamsValues002 - * @tc.desc : Returns an iterator allowing to go through all keys contained in this object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsValues002", 0, function () { - let params = new Url.URLParams("d=value1&c=value2&b=大"); - let arr = {}; - let i = 0; - for (let value of params.values()) { - arr[i] = value; - i++; - } - expect(arr[1]).assertEqual("value2"); - }); - - /** - * @tc.number: TEST_PARAMS_VALUES_003 - * @tc.name : testParamsValues003 - * @tc.desc : Returns an iterator allowing to go through all keys contained in this object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsValues003", 0, function () { - let params = new Url.URLParams("d=value1&c=value2&b=大"); - params.append("a", "ACA"); - let arr = {}; - let i = 0; - for (let value of params.values()) { - arr[i] = value; - i++; - } - expect(arr[3]).assertEqual("ACA"); - }); - - /** - * @tc.number: TEST_PARAMS_VALUES_004 - * @tc.name : testParamsValues004 - * @tc.desc : Returns an iterator allowing to go through all keys contained in this object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsValues004", 0, function () { - let params = new Url.URLParams("d=value1&c=value2&b=大&4=key4"); - let arr = {}; - let i = 0; - for (let value of params.values()) { - arr[i] = value; - i++; - } - expect(arr[3]).assertEqual("key4"); - }); - - /** - * @tc.number: TEST_PARAMS_VALUES_005 - * @tc.name : testParamsValues005 - * @tc.desc : Returns an iterator allowing to go through all keys contained in this object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsValues005", 0, function () { - let params = new Url.URLParams("d=value1&c=value2&b=大&4=key4&5=key5"); - let arr = {}; - let i = 0; - for (let value of params.values()) { - arr[i] = value; - i++; - } - expect(arr[4]).assertEqual("key5"); - }); - - /** - * @tc.number: TEST_PARAMS_SYMBOL_ITERATOR_001 - * @tc.name : testParamsSymbolIterator001 - * @tc.desc : Returns an ES6 iterator. Each item of the iterator is a JavaScript Array. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsSymbolIterator001", 0, function () { - let params = new Url.URLParams("key1=value1&key2=value2"); - let i = 0; - let arr = {}; - for (let pair of params[Symbol.iterator]()) { - arr[i] = pair[0]; - i++; - arr[i] = pair[1]; - i++; - } - expect(arr[1]).assertEqual("value1"); - }); - - /** - * @tc.number: TEST_PARAMS_SYMBOL_ITERATOR_002 - * @tc.name : testParamsSymbolIterator002 - * @tc.desc : Returns an ES6 iterator. Each item of the iterator is a JavaScript Array. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsSymbolIterator002", 0, function () { - let params = new Url.URLParams("key1=value1&key2=value2"); - let i = 0; - let arr = {}; - for (let pair of params[Symbol.iterator]()) { - arr[i] = pair[0]; - i++; - arr[i] = pair[1]; - i++; - } - expect(arr[2]).assertEqual("key2"); - }); - - /** - * @tc.number: TEST_PARAMS_SYMBOL_ITERATOR_003 - * @tc.name : testParamsSymbolIterator003 - * @tc.desc : Returns an ES6 iterator. Each item of the iterator is a JavaScript Array. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsSymbolIterator003", 0, function () { - let params = new Url.URLParams("key1=value1&key2=value2"); - params.append("foo", "jk"); - let i = 0; - let arr = {}; - for (let pair of params[Symbol.iterator]()) { - arr[i] = pair[0]; - i++; - arr[i] = pair[1]; - i++; - } - expect(arr[5]).assertEqual("jk"); - }); - - /** - * @tc.number: TEST_PARAMS_SYMBOL_ITERATOR_004 - * @tc.name : testParamsSymbolIterator004 - * @tc.desc : Returns an ES6 iterator. Each item of the iterator is a JavaScript Array. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsSymbolIterator004", 0, function () { - let params = new Url.URLParams("key1=value1&key2=value2"); - let i = 0; - let arr = {}; - for (let pair of params[Symbol.iterator]()) { - arr[i] = pair[0]; - i++; - arr[i] = pair[1]; - i++; - } - expect(arr[3]).assertEqual("value2"); - }); - - /** - * @tc.number: TEST_PARAMS_SYMBOL_ITERATOR_005 - * @tc.name : testParamsSymbolIterator005 - * @tc.desc : Returns an ES6 iterator. Each item of the iterator is a JavaScript Array. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsSymbolIterator005", 0, function () { - let params = new Url.URLParams("key1=value1&key2=value2"); - params.append("jss", "txt"); - let i = 0; - let arr = {}; - for (let pair of params[Symbol.iterator]()) { - arr[i] = pair[0]; - i++; - arr[i] = pair[1]; - i++; - } - expect(arr[4]).assertEqual("jss"); - }); - - /** - * @tc.number: TEST_PARAMS_TO_STRING_001 - * @tc.name : testParamsToString001 - * @tc.desc : Returns a query string suitable for use in a URL. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsToString001", 0, function () { - let params = new Url.URLParams("d=value1&c=value2&b=大"); - let result = params.toString(); - expect(result).assertEqual("d=value1&c=value2&b=%E5%A4%A7"); - }); - - /** - * @tc.number: TEST_PARAMS_TO_STRING_002 - * @tc.name : testParamsToString002 - * @tc.desc : Returns a query string suitable for use in a URL. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsToString002", 0, function () { - let params = new Url.URLParams("d=value1&c=value2&b= 大"); - params.append("1 12", "QQQ"); - let result = params.toString(); - expect(result).assertEqual("d=value1&c=value2&b=+%E5%A4%A7&1+12=QQQ"); - }); - - /** - * @tc.number: TEST_PARAMS_TO_STRING_003 - * @tc.name : testParamsToString003 - * @tc.desc : Returns a query string suitable for use in a URL. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsToString003", 0, function () { - let params = new Url.URLParams("$=()"); - params.delete("5"); - let result = params.toString(); - expect(result).assertEqual("%24=%28%29"); - }); - - /** - * @tc.number: TEST_PARAMS_TO_STRING_004 - * @tc.name : testParamsToString004 - * @tc.desc : Returns a query string suitable for use in a URL. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsToString004", 0, function () { - let params = new Url.URLParams("d=value1&c=value2&b=大&4=key4"); - let result = params.toString(); - expect(result).assertEqual("d=value1&c=value2&b=%E5%A4%A7&4=key4"); - }); - - /** - * @tc.number: TEST_PARAMS_TO_STRING_005 - * @tc.name : testParamsToString005 - * @tc.desc : Returns a query string suitable for use in a URL. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsToString005", 0, function () { - let params = new Url.URLParams("d=value1&c=value2&b= 大&4=key4&5=key5"); - params.append("1 12", "QQQ"); - let result = params.toString(); - expect(result).assertEqual("d=value1&c=value2&b=+%E5%A4%A7&4=key4&5=key5&1+12=QQQ"); - }); - - /** - * @tc.number: TEST_URL_TO_STRING_001 - * @tc.name : testUrlToString001 - * @tc.desc : Returns the serialized URL as a string. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUrlToString001", 0, function () { - let params = Url.URL.parseURL("http://username:password@host:8080/directory/file?query#fragment"); - let result = params.toString(); - expect(result).assertEqual("http://username:password@host:8080/directory/file?query#fragment"); - }); - - /** - * @tc.number: TEST_URL_TO_STRING_002 - * @tc.name : testUrlToString002 - * @tc.desc : Returns the serialized URL as a string. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUrlToString002", 0, function () { - let params = Url.URL.parseURL("http://username:password@host:8080/directory/file"); - let result = params.toString(); - expect(result).assertEqual("http://username:password@host:8080/directory/file"); - }); - - /** - * @tc.number: TEST_URL_TO_STRING_003 - * @tc.name : testUrlToString003 - * @tc.desc : Returns the serialized URL as a string. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUrlToString003", 0, function () { - let params = Url.URL.parseURL("http://username:password@host:8080#fragment"); - let result = params.toString(); - expect(result).assertEqual("http://username:password@host:8080/#fragment"); - }); - - /** - * @tc.number: TEST_URL_TO_STRING_004 - * @tc.name : testUrlToString004 - * @tc.desc : Returns the serialized URL as a string. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUrlToString004", 0, function () { - let params = Url.URL.parseURL("http1://host/directory/file?query#fragment"); - let result = params.toString(); - expect(result).assertEqual("http1://host/directory/file?query#fragment"); - }); - - /** - * @tc.number: TEST_URL_TO_STRING_005 - * @tc.name : testUrlToString005 - * @tc.desc : Returns the serialized URL as a string. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUrlToString005", 0, function () { - let params = Url.URL.parseURL("http:host:8080/directory/file?query#fragment"); - let result = params.toString(); - expect(result).assertEqual("http://host:8080/directory/file?query#fragment"); - }); - - /** - * @tc.number: TEST_URL_PARSE_URL_001 - * @tc.name : testUrlParseUrl001 - * @tc.desc : URL constructor, which is used to instantiate a URL object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUrlParseUrl001", 0, function () { - let params = new Url.URL(); - expect(params != null).assertTrue(); - let params2 = Url.URL.parseURL("https://developer.mozilla.org"); - let result = params2.href; - expect(result).assertEqual("https://developer.mozilla.org/"); - }); - - /** - * @tc.number: TEST_URL_PARSE_URL_002 - * @tc.name : testUrlParseUrl002 - * @tc.desc : URL constructor, which is used to instantiate a URL object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUrlParseUrl002", 0, function () { - let params = new Url.URL(); - expect(params != null).assertTrue(); - let params2 = Url.URL.parseURL("https://developer.mozilla.org", "flie:/developer.mozilla.org"); - let result = params2.href; - expect(result).assertEqual("https://developer.mozilla.org/"); - }); - - /** - * @tc.number: TEST_URL_PARSE_URL_003 - * @tc.name : testUrlParseUrl003 - * @tc.desc : URL constructor, which is used to instantiate a URL object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUrlParseUrl003", 0, function () { - let params = new Url.URL(); - expect(params != null).assertTrue(); - let params2 = Url.URL.parseURL("https://developer.mozilla.org", "ftp://www.example.com"); - let result = params2.href; - expect(result).assertEqual("https://developer.mozilla.org/"); - }); - - /** - * @tc.number: TEST_URL_PARSE_URL_004 - * @tc.name : testUrlParseUrl004 - * @tc.desc : URL constructor, which is used to instantiate a URL object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUrlParseUrl004", 0, function () { - let params = new Url.URL(); - expect(params != null).assertTrue(); - let params2 = Url.URL.parseURL(" ", "http://www.example.com"); - let result = params2.href; - expect(result).assertEqual("http://www.example.com/"); - }); - - /** - * @tc.number: TEST_URL_PARSE_URL_005 - * @tc.name : testUrlParseUrl005 - * @tc.desc : URL constructor, which is used to instantiate a URL object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUrlParseUrl005", 0, function () { - let params = new Url.URL(); - expect(params != null).assertTrue(); - let params2 = Url.URL.parseURL(".", "http://www.example.com"); - let result = params2.href; - expect(result).assertEqual("http://www.example.com/"); - }); - - /** - * @tc.number: TEST_URL_PARSE_URL_006 - * @tc.name : testUrlParseUrl006 - * @tc.desc : URL constructor, which is used to instantiate a URL object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUrlParseUrl006", 0, function () { - let params = new Url.URL(); - expect(params != null).assertTrue(); - let params2 = Url.URL.parseURL("../h:", "http://www.example.com"); - let result = params2.href; - expect(result).assertEqual("http://www.example.com/h:"); - }); - - /** - * @tc.number: TEST_URL_PARSE_URL_007 - * @tc.name : testUrlParseUrl007 - * @tc.desc : URL constructor, BusinessError: Parameter error. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUrlParseUrl007", 0, function () { - let a = undefined; - try { - let params = new Url.URL(); - expect(params != null).assertTrue(); - Url.URL.parseURL(a); - expect(0).assertEqual(1); - } catch (err) { - expect(err.toString()).assertEqual(`BusinessError: Parameter error.The type of ${a} must be string`); - expect(err.code).assertEqual(401); - expect(err.message).assertEqual(`Parameter error.The type of ${a} must be string`); - } - }); - - /** - * @tc.number: TEST_URL_PARSE_URL_008 - * @tc.name : testUrlParseUrl008 - * @tc.desc : URL constructor, throw BusinessError: Syntax Error. Invalid Url string. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUrlParseUrl008", 0, function () { - try { - let params = new Url.URL(); - expect(params != null).assertTrue(); - let a = "666666"; - let b = "666666"; - Url.URL.parseURL(a, b); - expect(0).assertEqual(1); - } catch (err) { - expect(err.toString()).assertEqual(`BusinessError: Syntax Error. Invalid Url string`); - expect(err.code).assertEqual(10200002); - expect(err.message).assertEqual(`Syntax Error. Invalid Url string`); - } - }); - - /** - * @tc.number: TEST_URL_TO_JSON_001 - * @tc.name : testUrlToJson001 - * @tc.desc : Returns the serialized URL as a string. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUrlToJson001", 0, function () { - let params = Url.URL.parseURL("http://username:password@host:8080/directory/file?query=pppppp#qwer=da"); - let result = params.toJSON(); - expect(result).assertEqual("http://username:password@host:8080/directory/file?query=pppppp#qwer=da"); - }); - - /** - * @tc.number: TEST_URL_TO_JSON_002 - * @tc.name : testUrlToJson002 - * @tc.desc : Returns the serialized URL as a string. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUrlToJson002", 0, function () { - let params = Url.URL.parseURL("http://host:8080/directory/file?query=pppppp#qwer=da"); - let result = params.toJSON(); - expect(result).assertEqual("http://host:8080/directory/file?query=pppppp#qwer=da"); - }); - - /** - * @tc.number: TEST_URL_TO_JSON_003 - * @tc.name : testUrlToJson003 - * @tc.desc : Returns the serialized URL as a string. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUrlToJson003", 0, function () { - let params = Url.URL.parseURL("http://username:password@host:8080"); - let result = params.toJSON(); - expect(result).assertEqual("http://username:password@host:8080/"); - }); - - /** - * @tc.number: TEST_URL_TO_JSON_004 - * @tc.name : testUrlToJson004 - * @tc.desc : Returns the serialized URL as a string. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUrlToJson004", 0, function () { - let params = Url.URL.parseURL("http11://username:password@host:8080?query=pppppp#qwer=da"); - let result = params.toJSON(); - expect(result).assertEqual("http11://username:password@host:8080?query=pppppp#qwer=da"); - }); - - /** - * @tc.number: TEST_URL_TO_JSON_005 - * @tc.name : testUrlToJson005 - * @tc.desc : Returns the serialized URL as a string. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUrlToJson005", 0, function () { - let params = Url.URL.parseURL("http://username:password@host:8080/directory"); - let result = params.toJSON(); - expect(result).assertEqual("http://username:password@host:8080/directory"); - }); - - /** - * @tc.number: TEST_PARAMS_CONSTRUCTION_001 - * @tc.name : testParamsConstruction001 - * @tc.desc : A parameterized constructor used to create an URLParams instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsConstruction001", 0, function () { - let params = new Url.URLParams("?user=abc&query=xyz"); - let result = params.toString(); - expect(result).assertEqual("user=abc&query=xyz"); - }); - - /** - * @tc.number: TEST_PARAMS_CONSTRUCTION_002 - * @tc.name : testParamsConstruction002 - * @tc.desc : A parameterized constructor used to create an URLParams instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsConstruction002", 0, function () { - let params = new Url.URLParams({ - user: "abc", - query: "first", - }); - let result = params.toString(); - expect(result).assertEqual("user=abc&query=first"); - }); - - /** - * @tc.number: TEST_PARAMS_CONSTRUCTION_003 - * @tc.name : testParamsConstruction003 - * @tc.desc : A parameterized constructor used to create an URLParams instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsConstruction003", 0, function () { - let params = new Url.URLParams([ - ["user", "abc"], - ["query", "first"], - ["query", "second"], - ]); - let result = params.toString(); - expect(result).assertEqual("user=abc&query=first&query=second"); - }); - - /** - * @tc.number: TEST_PARAMS_CONSTRUCTION_004 - * @tc.name : testParamsConstruction004 - * @tc.desc : A parameterized constructor used to create an URLParams instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsConstruction004", 0, function () { - let params = new Url.URLParams(); - params.append("abcde", "fghki"); - let paramsResult = params.toString(); - expect(paramsResult).assertEqual("abcde=fghki"); - }); - - /** - * @tc.number: TEST_PARAMS_CONSTRUCTION_005 - * @tc.name : testParamsConstruction005 - * @tc.desc : A parameterized constructor used to create an URLParams instance. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsConstruction005", 0, function () { - let param; - let params = new Url.URLParams(param); - params.append("abcde", "fghki"); - let paramsResult = params.toString(); - expect(paramsResult).assertEqual("abcde=fghki"); - }); - - /** - * @tc.number: TEST_PARAMS_CONSTRUCTION_006 - * @tc.name : testParamsConstruction006 - * @tc.desc : BusinessError: Parameter error. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParamsConstruction006", 0, function () { - let param = [["user", "abc", "error"]]; - try { - let params = new Url.URLParams(param); - expect(0).assertEqual(1); - } catch (err) { - expect(err.toString()).assertEqual(`BusinessError: Parameter error.The type of ${param} must be string[][]`); - expect(err.code).assertEqual(401); - expect(err.message).assertEqual(`Parameter error.The type of ${param} must be string[][]`); - } - }); - - /** - * @tc.number: TEST_URL_HASH_001 - * @tc.name : testUrlHash001 - * @tc.desc : Gets and sets the fragment portion of the URL. - * @tc.size : MediumTest - * @tc.type : Field - * @tc.level : Level 0 - */ - it("testUrlHash001", 0, function () { - let params = Url.URL.parseURL("http://username:password@host:8080/directory/file?query=pppppp#fragment"); - let result = params.hash; - expect(result).assertEqual("#fragment"); - }); - - /** - * @tc.number: TEST_URL_HOST_001 - * @tc.name : testUrlHost001 - * @tc.desc : Gets and sets the host portion of the URL. - * @tc.size : MediumTest - * @tc.type : Field - * @tc.level : Level 0 - */ - it("testUrlHost001", 0, function () { - let params = Url.URL.parseURL("http://username:password@host:8080/directory/file?query#fragment"); - let result = params.host; - expect(result).assertEqual("host:8080"); - }); - - /** - * @tc.number: TEST_URL_HOST_NAME_001 - * @tc.name : testUrlHostName001 - * @tc.desc : Gets and sets the host name portion of the URL,not include the port. - * @tc.size : MediumTest - * @tc.type : Field - * @tc.level : Level 0 - */ - it("testUrlHostName001", 0, function () { - let params = Url.URL.parseURL("http://username:password@host:8080/directory/file?query#fragment"); - let result = params.hostname; - expect(result).assertEqual("host"); - }); - - /** - * @tc.number: TEST_URL_HREF_001 - * @tc.name : testUrlHref001 - * @tc.desc : Gets and sets the serialized URL. - * @tc.size : MediumTest - * @tc.type : Field - * @tc.level : Level 0 - */ - it("testUrlHref001", 0, function () { - let params = Url.URL.parseURL("http://username:password@host:8080/directory/file?query#fragment"); - let result = params.href; - expect(result).assertEqual("http://username:password@host:8080/directory/file?query#fragment"); - }); - - /** - * @tc.number: TEST_URL_ORIGIN_001 - * @tc.name : testUrlOrigin001 - * @tc.desc : Gets the read-only serialization of the URL's origin. - * @tc.size : MediumTest - * @tc.type : Field - * @tc.level : Level 0 - */ - it("testUrlOrigin001", 0, function () { - let params = Url.URL.parseURL("http://username:password@host:8080/directory/file?query#fragment"); - let result = params.origin; - expect(result).assertEqual("http://host:8080"); - }); - - /** - * @tc.number: TEST_URL_PASSWORD_001 - * @tc.name : testUrlPassword001 - * @tc.desc : Gets and sets the password portion of the URL. - * @tc.size : MediumTest - * @tc.type : Field - * @tc.level : Level 0 - */ - it("testUrlPassword001", 0, function () { - let params = Url.URL.parseURL("http://username:11@host:8080/directory/file?query#fragment"); - let result = params.password; - expect(result).assertEqual("11"); - }); - - /** - * @tc.number: TEST_URL_PATHNAME_001 - * @tc.name : testUrlPathName001 - * @tc.desc : Gets and sets the path portion of the URL. - * @tc.size : MediumTest - * @tc.type : Field - * @tc.level : Level 0 - */ - it("testUrlPathName001", 0, function () { - let params = Url.URL.parseURL("http://username:password@host:8080/directory/file?query#fragment"); - let result = params.pathname; - expect(result).assertEqual("/directory/file"); - }); - - /** - * @tc.number: TEST_URL_PORT_001 - * @tc.name : testUrlPort001 - * @tc.desc : Gets and sets the port portion of the URL. - * @tc.size : MediumTest - * @tc.type : Field - * @tc.level : Level 0 - */ - it("testUrlPort001", 0, function () { - let params = Url.URL.parseURL("http://username:password@host:8080/directory/file?query#fragment"); - let result = params.port; - expect(result).assertEqual("8080"); - }); - - /** - * @tc.number: TEST_URL_PROTOCOL_001 - * @tc.name : testUrlProtocol001 - * @tc.desc : Gets and sets the protocol portion of the URL. - * @tc.size : MediumTest - * @tc.type : Field - * @tc.level : Level 0 - */ - it("testUrlProtocol001", 0, function () { - let params = Url.URL.parseURL("http://username:password@host:8080/directory/file?query#fragment"); - let result = params.protocol; - expect(result).assertEqual("http:"); - }); - - /** - * @tc.number: TEST_URL_SEARCH_001 - * @tc.name : testUrlSearch001 - * @tc.desc : Gets and sets the serialized query portion of the URL. - * @tc.size : MediumTest - * @tc.type : Field - * @tc.level : Level 0 - */ - it("testUrlSearch001", 0, function () { - let params = Url.URL.parseURL("http://username:password@host:8080/directory/file?query=qqqq#fragment"); - let result = params.search; - expect(result).assertEqual("?query=qqqq"); - }); - - /** - * @tc.number: TEST_URL_URL_PARAMS_001 - * @tc.name : testUrlURLParams001 - * @tc.desc : Gets the SearchParams portion of the URL - * @tc.size : MediumTest - * @tc.type : Field - * @tc.level : Level 0 - */ - it("testUrlURLParams001", 0, function () { - let that = Url.URL.parseURL("http://username:password@host:8080/directory/file?foo=1&bar=2"); - let seach = that.params; - let result = seach.toString(); - expect(result).assertEqual("foo=1&bar=2"); - }); - - /** - * @tc.number: TEST_URL_USERNAME_001 - * @tc.name : testUrlUserName001 - * @tc.desc : Gets and sets the username portion of the URL. - * @tc.size : MediumTest - * @tc.type : Field - * @tc.level : Level 0 - */ - it("testUrlUserName001", 0, function () { - let params = Url.URL.parseURL("http://username:password@host:8080/directory/file?query#fragment"); - let result = params.username; - expect(result).assertEqual("username"); - }); - }); -} diff --git a/commonlibrary/crossplatform/commonlibraryurletstest/src/main/module.json b/commonlibrary/crossplatform/commonlibraryurletstest/src/main/module.json deleted file mode 100644 index a4443e713..000000000 --- a/commonlibrary/crossplatform/commonlibraryurletstest/src/main/module.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "module": { - "name": "entry_test", - "type": "feature", - "description": "$string:module_test_desc", - "mainElement": "TestAbility", - "deviceTypes": [ - "phone" - ], - "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", - "skills": [ - { - "actions": [ - "action.system.home" - ], - "entities": [ - "entity.system.home" - ] - } - ] - } - ] - } -} diff --git a/commonlibrary/crossplatform/commonlibraryurletstest/src/main/resources/base/element/color.json b/commonlibrary/crossplatform/commonlibraryurletstest/src/main/resources/base/element/color.json deleted file mode 100644 index 3c712962d..000000000 --- a/commonlibrary/crossplatform/commonlibraryurletstest/src/main/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/commonlibrary/crossplatform/commonlibraryurletstest/src/main/resources/base/element/string.json b/commonlibrary/crossplatform/commonlibraryurletstest/src/main/resources/base/element/string.json deleted file mode 100644 index 65d8fa5a7..000000000 --- a/commonlibrary/crossplatform/commonlibraryurletstest/src/main/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/commonlibrary/crossplatform/commonlibraryurletstest/src/main/resources/base/media/icon.png b/commonlibrary/crossplatform/commonlibraryurletstest/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6BLrPFWk?s;$LOP{GmJpBl$qoSA!PUg~PA65-S00{{S`XKG6NkG0RgjEntPrmV+?0|00mu7;+5 zrdpa{2QLqPJ4Y{j7=Mrl{BaxrkdY69+c~(w{Fv-v&aR%aEI&JYSeRTLWm!zbv;?)_ ziZB;fwGbbeL5Q}YLx`J$lp~A09KK8t_z}PZ=4ZzgdeKtgoc+o5EvN9A1K1_<>M?MBqb#!ASf&# zEX?<)!RH(7>1P+j=jqG(58}TVN-$psA6K}atCuI!KTJD&FMmH-78ZejBm)0qc{ESp z|LuG1{QnBUJRg_E=h1#XMWt2%fcoN@l7eAS!Es?Q+;XsRNPhiiE=@AqlLkJzF`O18 zbsbSmKN=aaq8k3NFYZfDWpKmM!coBU0(XnL8R{4=i|wi{!uWYM2je{U{B*K2PVdu&=E zTq*-XsEsJ$u5H4g6DIm2Y!DN`>^v|AqlwuCD;w45K0@eqauiqWf7l&o)+YLHm~|L~ z7$0v5mkobriU!H<@mVJHLlmQqzQ3d6Rh_-|%Yy2li*tHO>_vcnuZ7OR_xkAIuIU&x z-|8Y0wj|6|a6_I(v91y%k_kNw6pnkNdxjqG8!%Vz_d%c_!X+6-;1`GC9_FpjoHev5fEV7RhJ>r=mh-jp$fqbqRJ=obwdgLDVP5+s zy1=_DWG0Y-Jb3t^WXmkr(d9~08k-|#Ly zaNOmT(^9tIb&eb4%CzIT zAm3CUtWSr1t4?h1kk#NBi{U|pJslvME{q|_eS^3En>SOqSxyuN1x;Is@8~m?*>}** znrRFArP!K_52RpX*&JHMR<^lVdm8ypJ}0R(SD(51j;6@ni$6bQ+2X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v>9#b(f<`Rnq@oz}5OdFowP zvkz`pq(yf>2rumZX4pZFKN^ldr~3FatV_9KAQs^JnWdWoCij*u^J%5CQWWzTi6A+o z>_?&=^BE$k18I-QBbxS_Fi9eCCJC{E&ib`A;w77Ih>a&6OrgGY!NFPc+oY+R>OQ{a zaGamBaoa2LA3nU`5b9Q7x<+~((!8hXR$J9QTg#B4ovx*8{;V6m{SEQu!_C|7RgJti zIdes*Gwa3imaxOHuyBy>-`f%J3K*6kN_v7gA|T)%1DV82?#HBzqO`5=k9oB_$-L)$ zW6pub3U=t{1FI+SCIL4euoY|$^!Xij*Ua^s+shBF*_YEYc-6Tfhl|=Kys>zyB39YF zb)0m|#p9H4lHZZTY~+LN_p^UZ&D}F;kafh4RkxZ}0^`f|n*T=7ZhA-E=1sT2`daha z`u3d}7pJwH)s1ctaXi8~9(DKeXaaF`#y}*`uzLN(2vX$B`tvAZJ{v`R3WX+a`S#@I z{TYhA%TMp9`ukP*g&g6PvG3lzz${Vk+m(EK?~Rus@2f>bCDVO|)xv}WCcZ+;gyH6HuxpE}!WPAFR1)el>x8DBM zvc+S3t%mNmH39GSb4 o3+ZqjO}TQR`B-7jQZ;fX=f#Qo_dbixTNHh(<9t`vrK4^C12FVpS^xk5 diff --git a/commonlibrary/crossplatform/commonlibraryutiletstest/src/main/ets/TestAbility/TestAbility.ets b/commonlibrary/crossplatform/commonlibraryutiletstest/src/main/ets/TestAbility/TestAbility.ets deleted file mode 100644 index 368aef919..000000000 --- a/commonlibrary/crossplatform/commonlibraryutiletstest/src/main/ets/TestAbility/TestAbility.ets +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import UIAbility from '@ohos.app.ability.UIAbility'; -import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; -import hilog from '@ohos.hilog'; -import { Hypium } from '@ohos/hypium'; -import testsuite from '../test/List.test'; -import window from '@ohos.window'; - -export default class TestAbility extends UIAbility { - onCreate(want, 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) ?? ''); - var abilityDelegator: any - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var abilityDelegatorArguments: any - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - hilog.info(0x0000, 'testTag', '%{public}s', 'start run testcase!!!'); - Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) - } - - onDestroy() { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onDestroy'); - } - - onWindowStageCreate(windowStage: window.WindowStage) { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageCreate'); - windowStage.loadContent('TestAbility/pages/Index', (err, data) => { - 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. Data: %{public}s', - JSON.stringify(data) ?? ''); - }); - } - - 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/commonlibrary/crossplatform/commonlibraryutiletstest/src/main/ets/TestAbility/pages/Index.ets b/commonlibrary/crossplatform/commonlibraryutiletstest/src/main/ets/TestAbility/pages/Index.ets deleted file mode 100644 index e95640899..000000000 --- a/commonlibrary/crossplatform/commonlibraryutiletstest/src/main/ets/TestAbility/pages/Index.ets +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import hilog from '@ohos.hilog'; - -@Entry -@Component -struct Index { - aboutToAppear() { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility index aboutToAppear'); - } - @State message: string = 'Hello World' - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Button() { - Text('next page') - .fontSize(20) - .fontWeight(FontWeight.Bold) - }.type(ButtonType.Capsule) - .margin({ - top: 20 - }) - .backgroundColor('#0D9FFB') - .width('35%') - .height('5%') - .onClick(()=>{ - }) - } - .width('100%') - } - .height('100%') - } - } \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryutiletstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/commonlibrary/crossplatform/commonlibraryutiletstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts deleted file mode 100644 index 92a16d84e..000000000 --- a/commonlibrary/crossplatform/commonlibraryutiletstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts +++ /dev/null @@ -1,49 +0,0 @@ -import hilog from '@ohos.hilog'; -import TestRunner from '@ohos.application.testRunner'; -import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; - -var abilityDelegator = undefined -var abilityDelegatorArguments = undefined - -async function onAbilityCreateCallback() { - hilog.info(0x0000, 'testTag', '%{public}s', 'onAbilityCreateCallback'); -} - -async function addAbilityMonitorCallback(err: any) { - 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() { - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun run'); - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var testAbilityName = abilityDelegatorArguments.bundleName + '.TestAbility' - let lMonitor = { - abilityName: testAbilityName, - onAbilityCreate: onAbilityCreateCallback, - }; - abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) - var cmd = 'aa start -d 0 -a TestAbility' + ' -b ' + abilityDelegatorArguments.bundleName - var debug = abilityDelegatorArguments.parameters['-D'] - if (debug == 'true') - { - cmd += ' -D' - } - hilog.info(0x0000, 'testTag', 'cmd : %{public}s', cmd); - abilityDelegator.executeShellCommand(cmd, - (err: any, d: any) => { - hilog.info(0x0000, 'testTag', 'executeShellCommand : err : %{public}s', JSON.stringify(err) ?? ''); - hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.stdResult ?? ''); - hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.exitCode ?? ''); - }) - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun end'); - } -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryutiletstest/src/main/ets/test/List.test.ets b/commonlibrary/crossplatform/commonlibraryutiletstest/src/main/ets/test/List.test.ets deleted file mode 100644 index db667fe9d..000000000 --- a/commonlibrary/crossplatform/commonlibraryutiletstest/src/main/ets/test/List.test.ets +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import UtilFunTest from './util.test' - -export default function testsuite() { - UtilFunTest() -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryutiletstest/src/main/ets/test/util.test.ets b/commonlibrary/crossplatform/commonlibraryutiletstest/src/main/ets/test/util.test.ets deleted file mode 100644 index 5b32091c1..000000000 --- a/commonlibrary/crossplatform/commonlibraryutiletstest/src/main/ets/test/util.test.ets +++ /dev/null @@ -1,8226 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; -import util from "@ohos.util"; -import url from "@ohos.url"; -import app from "@system.app"; -import process from "@ohos.process"; -import request from "@ohos.request"; - -class Temperature { - private readonly _temp: Temperature; - - constructor(value) { - this._temp = value; - } - compareTo(value) { - return this._temp >= value.getTemp(); - } - getTemp() { - return this._temp; - } - toString() { - return this._temp.toString(); - } -} -let tempLower = new Temperature(30); -let tempUpper = new Temperature(40); -let tempLess = new Temperature(20); -let tempMiDF = new Temperature(35); -let tempMidS = new Temperature(39); -let tempMore = new Temperature(45); - -let rangeHp = new util.ScopeHelper(tempLower, tempUpper); -let rangeHpFir = new util.ScopeHelper(tempMiDF, tempMidS); -let rangeHpSec = new util.ScopeHelper(tempLess, tempMore); -let rangeHpThi = new util.ScopeHelper(tempLess, tempMiDF); -let rangeHpFif = new util.ScopeHelper(tempMiDF, tempMore); - -export default function UtilFunTest() { - describe("UtilTest", function () { - /** - * @tc.number: TEST_IS_NUMBER_OBJECT_001 - * @tc.name : testIsNumberObject001 - * @tc.desc : Check whether the entered value is of the number object type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsNumberObject001", 0, function () { - let proc = new util.types(); - let result = proc.isNumberObject(new Number(0)); - expect(result).assertEqual(true); - }); - /** - * @tc.number: TEST_IS_NUMBER_OBJECT_002 - * @tc.name : testIsNumberObject002 - * @tc.desc : Check whether the entered value is of the number object type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsNumberObject002", 0, function () { - let proc = new util.types(); - let result = proc.isNumberObject(new Number(10)); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_NUMBER_OBJECT_003 - * @tc.name : testIsNumberObject003 - * @tc.desc : Check whether the entered value is of the number object type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsNumberObject003", 0, function () { - let proc = new util.types(); - let result = proc.isNumberObject(new Number(200)); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_NUMBER_OBJECT_004 - * @tc.name : testIsNumberObject004 - * @tc.desc : Check whether the entered value is of the number object type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsNumberObject004", 0, function () { - let proc = new util.types(); - let result = proc.isNumberObject(0); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_NUMBER_OBJECT_005 - * @tc.name : testIsNumberObject005 - * @tc.desc : Check whether the entered value is of the number object type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsNumberObject005", 0, function () { - let proc = new util.types(); - let result = proc.isNumberObject(100); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_PROMISE_001 - * @tc.name : testIsPromise001 - * @tc.desc : Check whether the entered value is of promise type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsPromise001", 0, function () { - let proc = new util.types(); - let result = proc.isPromise(Promise.resolve(42)); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_PROMISE_002 - * @tc.name : testIsPromise002 - * @tc.desc : Check whether the entered value is of promise type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsPromise002", 0, function () { - let proc = new util.types(); - let result = proc.isPromise(Promise.resolve(33)); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_PROMISE_003 - * @tc.name : testIsPromise003 - * @tc.desc : Check whether the entered value is of promise type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsPromise003", 0, function () { - let proc = new util.types(); - let result = proc.isPromise(Promise.resolve(44)); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_PROMISE_004 - * @tc.name : testIsPromise004 - * @tc.desc : Check whether the entered value is of promise type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsPromise004", 0, function () { - let proc = new util.types(); - let err = Error("33"); - let result = proc.isPromise(Promise.reject(err)); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_PROMISE_005 - * @tc.name : testIsPromise005 - * @tc.desc : Check whether the entered value is of promise type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsPromise005", 0, function () { - let proc = new util.types(); - let err = Error("23"); - let result = proc.isPromise(Promise.reject(err)); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_PROXY_001 - * @tc.name : testIsProxy001 - * @tc.desc : Check whether the value entered is of proxy type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsProxy001", 0, function () { - let proc = new util.types(); - const target = {}; - const proxy = new Proxy(target, {}); - let result = proc.isProxy(proxy); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_PROXY_002 - * @tc.name : testIsProxy002 - * @tc.desc : Check whether the value entered is of proxy type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsProxy002", 0, function () { - let proc = new util.types(); - const target = {}; - let result = proc.isProxy(target); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_PROXY_003 - * @tc.name : testIsProxy003 - * @tc.desc : Check whether the value entered is of proxy type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsProxy003", 0, function () { - let proc = new util.types(); - const handler = { - get: function (obj, prop) { - return prop in obj ? obj[prop] : 37; - }, - }; - const p = new Proxy({}, handler); - let result = proc.isProxy(p); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_PROXY_004 - * @tc.name : testIsProxy004 - * @tc.desc : Check whether the value entered is of proxy type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsProxy004", 0, function () { - let proc = new util.types(); - const handler = { - get: function (obj, prop) { - return prop in obj ? obj[prop] : 121; - }, - }; - const p = new Proxy({}, handler); - let result = proc.isProxy(p); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_PROXY_005 - * @tc.name : testIsProxy005 - * @tc.desc : Check whether the value entered is of proxy type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsProxy005", 0, function () { - let proc = new util.types(); - const handler = { - get: function (obj, prop) { - return prop in obj ? obj[prop] : 121; - }, - }; - let result = proc.isProxy(handler); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_REG_EXP_001 - * @tc.name : testIsRegExp001 - * @tc.desc : Check whether the entered value is of type regexp. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsRegExp001", 0, function () { - let proc = new util.types(); - let result = proc.isRegExp(new RegExp("abc")); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_REG_EXP_002 - * @tc.name : testIsRegExp002 - * @tc.desc : Check whether the entered value is of type regexp. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsRegExp002", 0, function () { - let proc = new util.types(); - let result = proc.isRegExp(/abc/); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_REG_EXP_003 - * @tc.name : testIsRegExp003 - * @tc.desc : Check whether the entered value is of type regexp. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsRegExp003", 0, function () { - let proc = new util.types(); - let result = proc.isRegExp(new RegExp("fgd")); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_REG_EXP_004 - * @tc.name : testIsRegExp004 - * @tc.desc : Check whether the entered value is of type regexp. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsRegExp004", 0, function () { - let proc = new util.types(); - let result = proc.isRegExp(new RegExp("123")); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_REG_EXP_005 - * @tc.name : testIsRegExp005 - * @tc.desc : Check whether the entered value is of type regexp. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsRegExp005", 0, function () { - let proc = new util.types(); - let result = proc.isRegExp(new RegExp(/ab+c/, "i")); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_SET_001 - * @tc.name : testIsSet001 - * @tc.desc : Check whether the entered value is of type set. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsSet001", 0, function () { - let proc = new util.types(); - let result = proc.isSet(new Set()); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_SET_002 - * @tc.name : testIsSet002 - * @tc.desc : Check whether the entered value is of type set. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsSet002", 0, function () { - let proc = new util.types(); - let result = proc.isSet(new Map()); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_SET_003 - * @tc.name : testIsSet003 - * @tc.desc : Check whether the entered value is of type set. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsSet003", 0, function () { - let proc = new util.types(); - let result = proc.isSet(new String()); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_SET_004 - * @tc.name : testIsSet004 - * @tc.desc : Check whether the entered value is of type set. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsSet004", 0, function () { - let proc = new util.types(); - let result = proc.isSet(new Boolean()); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_SET_005 - * @tc.name : testIsSet005 - * @tc.desc : Check whether the entered value is of type set. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsSet005", 0, function () { - let proc = new util.types(); - let result = proc.isSet(new WeakSet()); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_SET_ITERATOR_001 - * @tc.name : testIsSetIterator001 - * @tc.desc : Check whether the entered value is the iterator type of set. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsSetIterator001", 0, function () { - let proc = new util.types(); - const set = new Set(); - let result = proc.isSetIterator(set.keys()); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_SET_ITERATOR_002 - * @tc.name : testIsSetIterator002 - * @tc.desc : Check whether the entered value is the iterator type of set. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsSetIterator002", 0, function () { - let proc = new util.types(); - const set = new Set(); - let result = proc.isSetIterator(set.values()); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_SET_ITERATOR_003 - * @tc.name : testIsSetIterator003 - * @tc.desc : Check whether the entered value is the iterator type of set. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsSetIterator003", 0, function () { - let proc = new util.types(); - const set = new Set(); - let result = proc.isSetIterator(set.entries()); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_SET_ITERATOR_004 - * @tc.name : testIsSetIterator004 - * @tc.desc : Check whether the entered value is the iterator type of set. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsSetIterator004", 0, function () { - let proc = new util.types(); - const set = new Set(); - let result = proc.isSetIterator(set[Symbol.iterator]()); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_SET_ITERATOR_005 - * @tc.name : testIsSetIterator005 - * @tc.desc : Check whether the entered value is the iterator type of set. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsSetIterator005", 0, function () { - let proc = new util.types(); - const set = new Set(); - let result = proc.isSetIterator(set); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_SHARED_ARRAY_BUFFER_001 - * @tc.name : testIsSharedArrayBuffer001 - * @tc.desc : Check whether the entered value is of type sharedarraybuffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsSharedArrayBuffer001", 0, function () { - let proc = new util.types(); - let result = proc.isSharedArrayBuffer(new SharedArrayBuffer(0)); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_SHARED_ARRAY_BUFFER_002 - * @tc.name : testIsSharedArrayBuffer002 - * @tc.desc : Check whether the entered value is of type sharedarraybuffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsSharedArrayBuffer002", 0, function () { - let proc = new util.types(); - let result = proc.isSharedArrayBuffer(new Int16Array([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_SHARED_ARRAY_BUFFER_003 - * @tc.name : testIsSharedArrayBuffer003 - * @tc.desc : Check whether the entered value is of type sharedarraybuffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsSharedArrayBuffer003", 0, function () { - let proc = new util.types(); - let result = proc.isSharedArrayBuffer(new Int32Array([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_SHARED_ARRAY_BUFFER_004 - * @tc.name : testIsSharedArrayBuffer004 - * @tc.desc : Check whether the entered value is of type sharedarraybuffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsSharedArrayBuffer004", 0, function () { - let proc = new util.types(); - let result = proc.isSharedArrayBuffer(new ArrayBuffer(1)); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_SHARED_ARRAY_BUFFER_005 - * @tc.name : testIsSharedArrayBuffer005 - * @tc.desc : Check whether the entered value is of type sharedarraybuffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsSharedArrayBuffer005", 0, function () { - let proc = new util.types(); - let result = proc.isSharedArrayBuffer(new Uint8Array([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_STRING_OBJECT_001 - * @tc.name : testIsStringObject001 - * @tc.desc : Check whether the entered value is a string object type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsStringObject001", 0, function () { - let proc = new util.types(); - let result = proc.isStringObject(new String("foo")); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_STRING_OBJECT_002 - * @tc.name : testIsStringObject002 - * @tc.desc : Check whether the entered value is a string object type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsStringObject002", 0, function () { - let proc = new util.types(); - let result = proc.isStringObject(new String("twoo")); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_STRING_OBJECT_003 - * @tc.name : testIsStringObject003 - * @tc.desc : Check whether the entered value is a string object type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsStringObject003", 0, function () { - let proc = new util.types(); - let result = proc.isStringObject(new String("fdfsfd")); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_STRING_OBJECT_004 - * @tc.name : testIsStringObject004 - * @tc.desc : Check whether the entered value is a string object type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsStringObject004", 0, function () { - let proc = new util.types(); - let result = proc.isStringObject("ffds111"); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_STRING_OBJECT_005 - * @tc.name : testIsStringObject005 - * @tc.desc : Check whether the entered value is a string object type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsStringObject005", 0, function () { - let proc = new util.types(); - let result = proc.isStringObject("foo"); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_SYMBOL_OBJECT_001 - * @tc.name : testIsSymbolObject001 - * @tc.desc : Check whether the entered value is a symbol object type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsSymbolObject001", 0, function () { - let proc = new util.types(); - const symbols = Symbol("foo"); - let result = proc.isSymbolObject(Object(symbols)); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_SYMBOL_OBJECT_002 - * @tc.name : testIsSymbolObject002 - * @tc.desc : Check whether the entered value is a symbol object type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsSymbolObject002", 0, function () { - let proc = new util.types(); - const symbols = Symbol("s12"); - let result = proc.isSymbolObject(Object(symbols)); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_SYMBOL_OBJECT_003 - * @tc.name : testIsSymbolObject003 - * @tc.desc : Check whether the entered value is a symbol object type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsSymbolObject003", 0, function () { - let proc = new util.types(); - const symbols = Symbol("sads"); - let result = proc.isSymbolObject(Object(symbols)); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_SYMBOL_OBJECT_004 - * @tc.name : testIsSymbolObject004 - * @tc.desc : Check whether the entered value is a symbol object type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsSymbolObject004", 0, function () { - let proc = new util.types(); - const symbols = Symbol("asdd"); - let result = proc.isSymbolObject(symbols); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_SYMBOL_OBJECT_005 - * @tc.name : testIsSymbolObject005 - * @tc.desc : Check whether the entered value is a symbol object type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsSymbolObject005", 0, function () { - let proc = new util.types(); - const symbols = Symbol("foo"); - let result = proc.isSymbolObject(symbols); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_TYPED_ARRAY_001 - * @tc.name : testIsTypedArray001 - * @tc.desc : Check whether the entered value is a type contained in typedarray. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsTypedArray001", 0, function () { - let proc = new util.types(); - let result = proc.isTypedArray(new Float64Array([])); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_TYPED_ARRAY_002 - * @tc.name : testIsTypedArray002 - * @tc.desc : Check whether the entered value is a type contained in typedarray. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsTypedArray002", 0, function () { - let proc = new util.types(); - let result = proc.isTypedArray(new Uint8Array([])); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_TYPED_ARRAY_003 - * @tc.name : testIsTypedArray003 - * @tc.desc : Check whether the entered value is a type contained in typedarray. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsTypedArray003", 0, function () { - let proc = new util.types(); - let result = proc.isTypedArray(new Uint16Array([])); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_TYPED_ARRAY_004 - * @tc.name : testIsTypedArray004 - * @tc.desc : Check whether the entered value is a type contained in typedarray. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsTypedArray004", 0, function () { - let proc = new util.types(); - let result = proc.isTypedArray(new Uint32Array([])); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_TYPED_ARRAY_005 - * @tc.name : testIsTypedArray005 - * @tc.desc : Check whether the entered value is a type contained in typedarray. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsTypedArray005", 0, function () { - let proc = new util.types(); - let result = proc.isTypedArray(new ArrayBuffer(0)); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_UINT8_ARRAY_001 - * @tc.name : testIsUint8Array001 - * @tc.desc : Check whether the entered value is the uint8array array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsUint8Array001", 0, function () { - let proc = new util.types(); - let result = proc.isUint8Array(new Uint8Array([])); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_UINT8_ARRAY_002 - * @tc.name : testIsUint8Array002 - * @tc.desc : Check whether the entered value is the uint8array array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsUint8Array002", 0, function () { - let proc = new util.types(); - let result = proc.isUint8Array(new Uint16Array([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_UINT8_ARRAY_003 - * @tc.name : testIsUint8Array003 - * @tc.desc : Check whether the entered value is the uint8array array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsUint8Array003", 0, function () { - let proc = new util.types(); - let result = proc.isUint8Array(new Uint32Array([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_UINT8_ARRAY_004 - * @tc.name : testIsUint8Array004 - * @tc.desc : Check whether the entered value is the uint8array array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsUint8Array004", 0, function () { - let proc = new util.types(); - let result = proc.isUint8Array(new Int8Array([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_UINT8_ARRAY_005 - * @tc.name : testIsUint8Array005 - * @tc.desc : Check whether the entered value is the uint8array array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsUint8Array005", 0, function () { - let proc = new util.types(); - let result = proc.isUint8Array(new Int16Array([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_UINT8_CLAMPED_ARRAY_001 - * @tc.name : testIsUint8ClampedArray001 - * @tc.desc : Check whether the entered value is the uint8clampedarray array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsUint8ClampedArray001", 0, function () { - let proc = new util.types(); - let result = proc.isUint8ClampedArray(new Uint8ClampedArray([])); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_UINT8_CLAMPED_ARRAY_002 - * @tc.name : testIsUint8ClampedArray002 - * @tc.desc : Check whether the entered value is the uint8clampedarray array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsUint8ClampedArray002", 0, function () { - let proc = new util.types(); - let result = proc.isUint8ClampedArray(new Int8Array([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_UINT8_CLAMPED_ARRAY_003 - * @tc.name : testIsUint8ClampedArray003 - * @tc.desc : Check whether the entered value is the uint8clampedarray array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsUint8ClampedArray003", 0, function () { - let proc = new util.types(); - let result = proc.isUint8ClampedArray(new Int16Array([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_UINT8_CLAMPED_ARRAY_004 - * @tc.name : testIsUint8ClampedArray004 - * @tc.desc : Check whether the entered value is the uint8clampedarray array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsUint8ClampedArray004", 0, function () { - let proc = new util.types(); - let result = proc.isUint8ClampedArray(new Int32Array([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_UINT8_CLAMPED_ARRAY_005 - * @tc.name : testIsUint8ClampedArray005 - * @tc.desc : Check whether the entered value is the uint8clampedarray array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsUint8ClampedArray005", 0, function () { - let proc = new util.types(); - let result = proc.isUint8ClampedArray(new Uint32Array([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_UINT16_ARRAY_001 - * @tc.name : testIsUint16Array001 - * @tc.desc : Check whether the entered value is the uint16array array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsUint16Array001", 0, function () { - let proc = new util.types(); - let result = proc.isUint16Array(new Uint16Array([])); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_UINT16_ARRAY_002 - * @tc.name : testIsUint16Array002 - * @tc.desc : Check whether the entered value is the uint16array array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsUint16Array002", 0, function () { - let proc = new util.types(); - let result = proc.isUint16Array(new Uint8Array([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_UINT16_ARRAY_003 - * @tc.name : testIsUint16Array003 - * @tc.desc : Check whether the entered value is the uint16array array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsUint16Array003", 0, function () { - let proc = new util.types(); - let result = proc.isUint16Array(new Uint32Array([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_UINT16_ARRAY_004 - * @tc.name : testIsUint16Array004 - * @tc.desc : Check whether the entered value is the uint16array array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsUint16Array004", 0, function () { - let proc = new util.types(); - let result = proc.isUint16Array(new Uint8ClampedArray([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_UINT16_ARRAY_005 - * @tc.name : testIsUint16Array005 - * @tc.desc : Check whether the entered value is the uint16array array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsUint16Array005", 0, function () { - let proc = new util.types(); - let result = proc.isUint16Array(new Int8Array([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_UINT32_ARRAY_001 - * @tc.name : testIsUint32Array001 - * @tc.desc : Check whether the entered value is the uint32array array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsUint32Array001", 0, function () { - let proc = new util.types(); - let result = proc.isUint32Array(new Uint32Array([])); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_UINT32_ARRAY_002 - * @tc.name : testIsUint32Array002 - * @tc.desc : Check whether the entered value is the uint32array array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsUint32Array002", 0, function () { - let proc = new util.types(); - let result = proc.isUint32Array(new Uint8Array([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_UINT32_ARRAY_003 - * @tc.name : testIsUint32Array003 - * @tc.desc : Check whether the entered value is the uint32array array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsUint32Array003", 0, function () { - let proc = new util.types(); - let result = proc.isUint32Array(new Uint16Array([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_UINT32_ARRAY_004 - * @tc.name : testIsUint32Array004 - * @tc.desc : Check whether the entered value is the uint32array array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsUint32Array004", 0, function () { - let proc = new util.types(); - let result = proc.isUint32Array(new Int8Array([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_UINT32_ARRAY_005 - * @tc.name : testIsUint32Array005 - * @tc.desc : Check whether the entered value is the uint32array array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsUint32Array005", 0, function () { - let proc = new util.types(); - let result = proc.isUint32Array(new Uint8ClampedArray([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_WEAK_MAP_001 - * @tc.name : testIsWeakMap001 - * @tc.desc : Check whether the entered value is of type weakmap. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsWeakMap001", 0, function () { - let proc = new util.types(); - let result = proc.isWeakMap(new WeakMap()); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_WEAK_MAP_002 - * @tc.name : testIsWeakMap002 - * @tc.desc : Check whether the entered value is of type weakmap. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsWeakMap002", 0, function () { - let proc = new util.types(); - let result = proc.isWeakMap(new Map()); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_WEAK_MAP_003 - * @tc.name : testIsWeakMap003 - * @tc.desc : Check whether the entered value is of type weakmap. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsWeakMap003", 0, function () { - let proc = new util.types(); - let result = proc.isWeakMap(new Set()); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_WEAK_MAP_004 - * @tc.name : testIsWeakMap004 - * @tc.desc : Check whether the entered value is of type weakmap. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsWeakMap004", 0, function () { - let proc = new util.types(); - let result = proc.isWeakMap(new String()); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_WEAK_MAP_005 - * @tc.name : testIsWeakMap005 - * @tc.desc : Check whether the entered value is of type weakmap. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsWeakMap005", 0, function () { - let proc = new util.types(); - let result = proc.isWeakMap(new WeakSet()); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_WEAK_SET_001 - * @tc.name : testIsWeakSet001 - * @tc.desc : Check whether the entered value is of type weakset. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsWeakSet001", 0, function () { - let proc = new util.types(); - let result = proc.isWeakSet(new WeakSet()); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_WEAK_SET_002 - * @tc.name : testIsWeakSet002 - * @tc.desc : Check whether the entered value is of type weakset. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsWeakSet002", 0, function () { - let proc = new util.types(); - let result = proc.isWeakSet(new WeakMap()); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_WEAK_SET_003 - * @tc.name : testIsWeakSet003 - * @tc.desc : Check whether the entered value is of type weakset. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsWeakSet003", 0, function () { - let proc = new util.types(); - let result = proc.isWeakSet(new String()); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_WEAK_SET_004 - * @tc.name : testIsWeakSet004 - * @tc.desc : Check whether the entered value is of type weakset. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsWeakSet004", 0, function () { - let proc = new util.types(); - let result = proc.isWeakSet(new Set()); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_WEAK_SET_005 - * @tc.name : testIsWeakSet005 - * @tc.desc : Check whether the entered value is of type weakset. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsWeakSet005", 0, function () { - let proc = new util.types(); - let result = proc.isWeakSet(new Map()); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_NATIVE_ERROR_001 - * @tc.name : testIsNativeError001 - * @tc.desc : Check whether the value entered is of type error. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsNativeError001", 0, function () { - let proc = new util.types(); - let result = proc.isNativeError(new TypeError()); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_NATIVE_ERROR_002 - * @tc.name : testIsNativeError002 - * @tc.desc : Check whether the value entered is of type error. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsNativeError002", 0, function () { - let proc = new util.types(); - let result = proc.isNativeError(new Error()); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_NATIVE_ERROR_003 - * @tc.name : testIsNativeError003 - * @tc.desc : Check whether the value entered is of type error. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsNativeError003", 0, function () { - let proc = new util.types(); - let result = proc.isNativeError(new RangeError()); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_NATIVE_ERROR_004 - * @tc.name : testIsNativeError004 - * @tc.desc : Check whether the value entered is of type error. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsNativeError004", 0, function () { - let proc = new util.types(); - let result = proc.isNativeError(true); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_NATIVE_ERROR_005 - * @tc.name : testIsNativeError005 - * @tc.desc : Check whether the value entered is of type error. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsNativeError005", 0, function () { - let proc = new util.types(); - let result = proc.isNativeError(false); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_MODULE_NAMESPACE_OBJECT_001 - * @tc.name : testIsModuleNamespaceObject001 - * @tc.desc : Check whether the entered value is the module namespace object object type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsModuleNamespaceObject001", 0, function () { - let proc = new util.types(); - let result = proc.isModuleNamespaceObject(url); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_MODULE_NAMESPACE_OBJECT_002 - * @tc.name : testIsModuleNamespaceObject002 - * @tc.desc : Check whether the entered value is the module namespace object object type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsModuleNamespaceObject002", 0, function () { - let proc = new util.types(); - let result = proc.isModuleNamespaceObject(request); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_MODULE_NAMESPACE_OBJECT_003 - * @tc.name : testIsModuleNamespaceObject003 - * @tc.desc : Check whether the entered value is the module namespace object object type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsModuleNamespaceObject003", 0, function () { - let proc = new util.types(); - let result = proc.isModuleNamespaceObject(process); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_MODULE_NAMESPACE_OBJECT_004 - * @tc.name : testIsModuleNamespaceObject004 - * @tc.desc : Check whether the entered value is the module namespace object object type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsModuleNamespaceObject004", 0, function () { - let proc = new util.types(); - let result = proc.isModuleNamespaceObject(app); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_MAP_ITERATOR_001 - * @tc.name : testIsMapIterator001 - * @tc.desc : Check whether the entered value is the iterator type of map. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsMapIterator001", 0, function () { - let proc = new util.types(); - const map = new Map(); - let result = proc.isMapIterator(map.keys()); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_MAP_ITERATOR_002 - * @tc.name : testIsMapIterator002 - * @tc.desc : Check whether the entered value is the iterator type of map. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsMapIterator002", 0, function () { - let proc = new util.types(); - const map = new Map(); - let result = proc.isMapIterator(map.values()); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_MAP_ITERATOR_003 - * @tc.name : testIsMapIterator003 - * @tc.desc : Check whether the entered value is the iterator type of map. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsMapIterator003", 0, function () { - let proc = new util.types(); - const map = new Map(); - let result = proc.isMapIterator(map.entries()); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_MAP_ITERATOR_004 - * @tc.name : testIsMapIterator004 - * @tc.desc : Check whether the entered value is the iterator type of map. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsMapIterator004", 0, function () { - let proc = new util.types(); - const map = new Map(); - let result = proc.isMapIterator(map[Symbol.iterator]()); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_MAP_ITERATOR_005 - * @tc.name : testIsMapIterator005 - * @tc.desc : Check whether the entered value is the iterator type of map. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsMapIterator005", 0, function () { - let proc = new util.types(); - const map = new Map(); - let result = proc.isMapIterator(map); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_MAP_001 - * @tc.name : testIsMap001 - * @tc.desc : Check whether the entered value is of map type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsMap001", 0, function () { - let proc = new util.types(); - let result = proc.isMap(new Map()); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_MAP_002 - * @tc.name : testIsMap002 - * @tc.desc : Check whether the entered value is of map type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsMap002", 0, function () { - let proc = new util.types(); - let result = proc.isMap(new Set()); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_MAP_003 - * @tc.name : testIsMap003 - * @tc.desc : Check whether the entered value is of map type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsMap003", 0, function () { - let proc = new util.types(); - let result = proc.isMap(new String()); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_MAP_004 - * @tc.name : testIsMap004 - * @tc.desc : Check whether the entered value is of map type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsMap004", 0, function () { - let proc = new util.types(); - let result = proc.isMap(new Object()); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_MAP_005 - * @tc.name : testIsMap005 - * @tc.desc : Check whether the entered value is of map type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsMap005", 0, function () { - let proc = new util.types(); - let result = proc.isMap(new Boolean()); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_INT32_ARRAY_001 - * @tc.name : testIsInt32Array001 - * @tc.desc : Check whether the entered value is the int32array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsInt32Array001", 0, function () { - let proc = new util.types(); - let result = proc.isInt32Array(new Int32Array([])); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_INT32_ARRAY_002 - * @tc.name : testIsInt32Array002 - * @tc.desc : Check whether the entered value is the int32array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsInt32Array002", 0, function () { - let proc = new util.types(); - let result = proc.isInt32Array(new Int8Array([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_INT32_ARRAY_003 - * @tc.name : testIsInt32Array003 - * @tc.desc : Check whether the entered value is the int32array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsInt32Array003", 0, function () { - let proc = new util.types(); - let result = proc.isInt32Array(new Int16Array([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_INT32_ARRAY_004 - * @tc.name : testIsInt32Array004 - * @tc.desc : Check whether the entered value is the int32array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsInt32Array004", 0, function () { - let proc = new util.types(); - let result = proc.isInt32Array(new Float64Array([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_INT32_ARRAY_005 - * @tc.name : testIsInt32Array005 - * @tc.desc : Check whether the entered value is the int32array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsInt32Array005", 0, function () { - let proc = new util.types(); - let result = proc.isInt32Array(new Uint8Array([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_INT16_ARRAY_001 - * @tc.name : testIsInt16Array001 - * @tc.desc : Check whether the entered value is the int16array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsInt16Array001", 0, function () { - let proc = new util.types(); - let result = proc.isInt16Array(new Int16Array([])); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_INT16_ARRAY_002 - * @tc.name : testIsInt16Array002 - * @tc.desc : Check whether the entered value is the int16array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsInt16Array002", 0, function () { - let proc = new util.types(); - let result = proc.isInt16Array(new Int8Array([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_INT16_ARRAY_003 - * @tc.name : testIsInt16Array003 - * @tc.desc : Check whether the entered value is the int16array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsInt16Array003", 0, function () { - let proc = new util.types(); - let result = proc.isInt16Array(new Int32Array([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_INT16_ARRAY_004 - * @tc.name : testIsInt16Array004 - * @tc.desc : Check whether the entered value is the int16array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsInt16Array004", 0, function () { - let proc = new util.types(); - let result = proc.isInt16Array(new Uint8Array([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_INT16_ARRAY_005 - * @tc.name : testIsInt16Array005 - * @tc.desc : Check whether the entered value is the int16array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsInt16Array005", 0, function () { - let proc = new util.types(); - let result = proc.isInt16Array(new Float64Array([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_INT8_ARRAY_001 - * @tc.name : testIsInt8Array001 - * @tc.desc : Check whether the entered value is of int8array array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsInt8Array001", 0, function () { - let proc = new util.types(); - let result = proc.isInt8Array(new Int8Array([])); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_INT8_ARRAY_002 - * @tc.name : testIsInt8Array002 - * @tc.desc : Check whether the entered value is of int8array array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsInt8Array002", 0, function () { - let proc = new util.types(); - let result = proc.isInt8Array(new ArrayBuffer(0)); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_INT8_ARRAY_003 - * @tc.name : testIsInt8Array003 - * @tc.desc : Check whether the entered value is of int8array array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsInt8Array003", 0, function () { - let proc = new util.types(); - let result = proc.isInt8Array(new Int32Array([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_INT8_ARRAY_004 - * @tc.name : testIsInt8Array004 - * @tc.desc : Check whether the entered value is of int8array array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsInt8Array004", 0, function () { - let proc = new util.types(); - let result = proc.isInt8Array(new Float64Array([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_INT8_ARRAY_005 - * @tc.name : testIsInt8Array005 - * @tc.desc : Check whether the entered value is of int8array array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsInt8Array005", 0, function () { - let proc = new util.types(); - let result = proc.isInt8Array(new Uint8Array([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_GENERATOR_OBJECT_001 - * @tc.name : testIsGeneratorObject001 - * @tc.desc : Check whether the entered value is a generator object type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsGeneratorObject001", 0, function () { - let proc = new util.types(); - let result = proc.isGeneratorObject(false); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_GENERATOR_OBJECT_002 - * @tc.name : testIsGeneratorObject002 - * @tc.desc : Check whether the entered value is a generator object type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsGeneratorObject002", 0, function () { - let proc = new util.types(); - let result = proc.isGeneratorObject(new Int8Array([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_GENERATOR_OBJECT_003 - * @tc.name : testIsGeneratorObject003 - * @tc.desc : Check whether the entered value is a generator object type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsGeneratorObject003", 0, function () { - let proc = new util.types(); - let result = proc.isGeneratorObject(new Int16Array([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_GENERATOR_OBJECT_004 - * @tc.name : testIsGeneratorObject004 - * @tc.desc : Check whether the entered value is a generator object type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsGeneratorObject004", 0, function () { - let proc = new util.types(); - let result = proc.isGeneratorObject(true); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_GENERATOR_FUNCTION_001 - * @tc.name : testIsGeneratorFunction001 - * @tc.desc : Check whether the input value is a generator function type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsGeneratorFunction001", 0, function () { - let proc = new util.types(); - let result = proc.isGeneratorFunction(new Int8Array()); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_GENERATOR_FUNCTION_002 - * @tc.name : testIsGeneratorFunction002 - * @tc.desc : Check whether the input value is a generator function type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsGeneratorFunction002", 0, function () { - let proc = new util.types(); - let result = proc.isGeneratorFunction(function foo() {}); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_GENERATOR_FUNCTION_003 - * @tc.name : testIsGeneratorFunction003 - * @tc.desc : Check whether the input value is a generator function type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsGeneratorFunction003", 0, function () { - let proc = new util.types(); - let result = proc.isGeneratorFunction(true); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_GENERATOR_FUNCTION_004 - * @tc.name : testIsGeneratorFunction004 - * @tc.desc : Check whether the input value is a generator function type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsGeneratorFunction004", 0, function () { - let proc = new util.types(); - let result = proc.isGeneratorFunction(false); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_FLOAT64_ARRAY_001 - * @tc.name : testIsFloat64Array001 - * @tc.desc : Check whether the entered value is of float64array array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsFloat64Array001", 0, function () { - let proc = new util.types(); - let result = proc.isFloat64Array(new Float64Array()); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_FLOAT64_ARRAY_002 - * @tc.name : testIsFloat64Array002 - * @tc.desc : Check whether the entered value is of float64array array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsFloat64Array002", 0, function () { - let proc = new util.types(); - let result = proc.isFloat64Array(new Int8Array()); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_FLOAT64_ARRAY_003 - * @tc.name : testIsFloat64Array003 - * @tc.desc : Check whether the entered value is of float64array array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsFloat64Array003", 0, function () { - let proc = new util.types(); - let result = proc.isFloat64Array(new Float32Array()); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_FLOAT64_ARRAY_004 - * @tc.name : testIsFloat64Array004 - * @tc.desc : Check whether the entered value is of float64array array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsFloat64Array004", 0, function () { - let proc = new util.types(); - let result = proc.isFloat64Array(new Uint8Array()); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_FLOAT64_ARRAY_005 - * @tc.name : testIsFloat64Array005 - * @tc.desc : Check whether the entered value is of float64array array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsFloat64Array005", 0, function () { - let proc = new util.types(); - let result = proc.isFloat64Array(new Int16Array([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_FLOAT32_ARRAY_001 - * @tc.name : testIsFloat32Array001 - * @tc.desc : Check whether the entered value is of float32array array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsFloat32Array001", 0, function () { - let proc = new util.types(); - let result = proc.isFloat32Array(new Float32Array()); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_FLOAT32_ARRAY_002 - * @tc.name : testIsFloat32Array002 - * @tc.desc : Check whether the entered value is of float32array array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsFloat32Array002", 0, function () { - let proc = new util.types(); - let result = proc.isFloat32Array(new Int8Array()); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_FLOAT32_ARRAY_003 - * @tc.name : testIsFloat32Array003 - * @tc.desc : Check whether the entered value is of float32array array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsFloat32Array003", 0, function () { - let proc = new util.types(); - let result = proc.isFloat32Array(new Int16Array()); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_FLOAT32_ARRAY_004 - * @tc.name : testIsFloat32Array004 - * @tc.desc : Check whether the entered value is of float32array array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsFloat32Array004", 0, function () { - let proc = new util.types(); - let result = proc.isFloat32Array(new Float64Array()); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_FLOAT32_ARRAY_005 - * @tc.name : testIsFloat32Array005 - * @tc.desc : Check whether the entered value is of float32array array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsFloat32Array005", 0, function () { - let proc = new util.types(); - let result = proc.isFloat32Array(new Uint8Array()); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_EXTERNAL_001 - * @tc.name : testIsExternal001 - * @tc.desc : Check whether the entered value is a native external value type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsExternal001", 0, function () { - let proc = new util.types(); - let result = proc.isExternal(new Float32Array([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_EXTERNAL_002 - * @tc.name : testIsExternal002 - * @tc.desc : Check whether the entered value is a native external value type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsExternal002", 0, function () { - let proc = new util.types(); - let result = proc.isExternal(new Int8Array([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_EXTERNAL_003 - * @tc.name : testIsExternal003 - * @tc.desc : Check whether the entered value is a native external value type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsExternal003", 0, function () { - let proc = new util.types(); - let result = proc.isExternal(true); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_EXTERNAL_004 - * @tc.name : testIsExternal004 - * @tc.desc : Check whether the entered value is a native external value type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsExternal004", 0, function () { - let proc = new util.types(); - let result = proc.isExternal(false); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_EXTERNAL_005 - * @tc.name : testIsExternal005 - * @tc.desc : Check whether the entered value is a native external value type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsExternal005", 0, function () { - let proc = new util.types(); - let result = proc.isExternal(new Int16Array()); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_DATE_001 - * @tc.name : testIsDate001 - * @tc.desc : Check whether the entered value is of type date. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsDate001", 0, function () { - let proc = new util.types(); - let result = proc.isDate(new Date()); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_DATE_002 - * @tc.name : testIsDate002 - * @tc.desc : Check whether the entered value is of type date. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsDate002", 0, function () { - let proc = new util.types(); - let result = proc.isDate(new Int8Array([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_DATE_003 - * @tc.name : testIsDate003 - * @tc.desc : Check whether the entered value is of type date. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsDate003", 0, function () { - let proc = new util.types(); - let result = proc.isDate(true); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_DATE_004 - * @tc.name : testIsDate004 - * @tc.desc : Check whether the entered value is of type date. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsDate004", 0, function () { - let proc = new util.types(); - let result = proc.isDate(new Int16Array([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_DATE_005 - * @tc.name : testIsDate005 - * @tc.desc : Check whether the entered value is of type date. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsDate005", 0, function () { - let proc = new util.types(); - let result = proc.isDate(new Float64Array([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_DATA_VIEW_001 - * @tc.name : testIsDataView001 - * @tc.desc : Check whether the entered value is of DataView type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsDataView001", 0, function () { - let proc = new util.types(); - const ab = new ArrayBuffer(20); - let result = proc.isDataView(new DataView(ab)); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_DATA_VIEW_002 - * @tc.name : testIsDataView002 - * @tc.desc : Check whether the entered value is of DataView type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsDataView002", 0, function () { - let proc = new util.types(); - let result = proc.isDataView(new Int8Array([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_DATA_VIEW_003 - * @tc.name : testIsDataView003 - * @tc.desc : Check whether the entered value is of DataView type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsDataView003", 0, function () { - let proc = new util.types(); - let result = proc.isDataView(new Float64Array([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_DATA_VIEW_004 - * @tc.name : testIsDataView004 - * @tc.desc : Check whether the entered value is of DataView type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsDataView004", 0, function () { - let proc = new util.types(); - let result = proc.isDataView(true); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_DATA_VIEW_005 - * @tc.name : testIsDataView005 - * @tc.desc : Check whether the entered value is of DataView type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsDataView005", 0, function () { - let proc = new util.types(); - let result = proc.isDataView(false); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_BOXED_PRIMITIVE_001 - * @tc.name : testIsBoxedPrimitive001 - * @tc.desc : Check whether the entered value is a Boolean or number or string or symbol object type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsBoxedPrimitive001", 0, function () { - let proc = new util.types(); - let result = proc.isBoxedPrimitive(false); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_BOXED_PRIMITIVE_002 - * @tc.name : testIsBoxedPrimitive002 - * @tc.desc : Check whether the entered value is a Boolean or number or string or symbol object type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsBoxedPrimitive002", 0, function () { - let proc = new util.types(); - let result = proc.isBoxedPrimitive(new Boolean(false)); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_BOXED_PRIMITIVE_003 - * @tc.name : testIsBoxedPrimitive003 - * @tc.desc : Check whether the entered value is a Boolean or number or string or symbol object type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsBoxedPrimitive003", 0, function () { - let proc = new util.types(); - let result = proc.isBoxedPrimitive(Symbol("foo")); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_BOXED_PRIMITIVE_004 - * @tc.name : testIsBoxedPrimitive004 - * @tc.desc : Check whether the entered value is a Boolean or number or string or symbol object type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsBoxedPrimitive004", 0, function () { - let proc = new util.types(); - let result = proc.isBoxedPrimitive(Object(Symbol("foo"))); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_BOXED_PRIMITIVE_005 - * @tc.name : testIsBoxedPrimitive005 - * @tc.desc : Check whether the entered value is a Boolean or number or string or symbol object type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsBoxedPrimitive005", 0, function () { - let proc = new util.types(); - let result = proc.isBoxedPrimitive(new Boolean(true)); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_BOOLEAN_OBJECT_001 - * @tc.name : testIsBooleanObject001 - * @tc.desc : Check whether the entered value is a Boolean object type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsBooleanObject001", 0, function () { - let proc = new util.types(); - let result = proc.isBooleanObject(new Boolean(false)); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_BOOLEAN_OBJECT_002 - * @tc.name : testIsBooleanObject002 - * @tc.desc : Check whether the entered value is a Boolean object type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsBooleanObject002", 0, function () { - let proc = new util.types(); - let result = proc.isBooleanObject(new Boolean(true)); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_BOOLEAN_OBJECT_003 - * @tc.name : testIsBooleanObject003 - * @tc.desc : Check whether the entered value is a Boolean object type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsBooleanObject003", 0, function () { - let proc = new util.types(); - let result = proc.isBooleanObject(true); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_BOOLEAN_OBJECT_004 - * @tc.name : testIsBooleanObject004 - * @tc.desc : Check whether the entered value is a Boolean object type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsBooleanObject004", 0, function () { - let proc = new util.types(); - let result = proc.isBooleanObject(false); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_BOOLEAN_OBJECT_005 - * @tc.name : testIsBooleanObject005 - * @tc.desc : Check whether the entered value is a Boolean object type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsBooleanObject005", 0, function () { - let proc = new util.types(); - let result = proc.isBooleanObject(Boolean(true)); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_BIG_UINT64_ARRAY_001 - * @tc.name : testIsBigUint64Array001 - * @tc.desc : Check whether the entered value is of biguint64array array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsBigUint64Array001", 0, function () { - let proc = new util.types(); - let result = proc.isBigUint64Array(new BigUint64Array([])); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_BIG_UINT64_ARRAY_002 - * @tc.name : testIsBigUint64Array002 - * @tc.desc : Check whether the entered value is of biguint64array array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsBigUint64Array002", 0, function () { - let proc = new util.types(); - let result = proc.isBigUint64Array(new Int8Array([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_BIG_UINT64_ARRAY_003 - * @tc.name : testIsBigUint64Array003 - * @tc.desc : Check whether the entered value is of biguint64array array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsBigUint64Array003", 0, function () { - let proc = new util.types(); - let result = proc.isBigUint64Array(new Float64Array([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_BIG_UINT64_ARRAY_004 - * @tc.name : testIsBigUint64Array004 - * @tc.desc : Check whether the entered value is of biguint64array array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsBigUint64Array004", 0, function () { - let proc = new util.types(); - let result = proc.isBigUint64Array(new Uint8Array([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_BIG_UINT64_ARRAY_005 - * @tc.name : testIsBigUint64Array005 - * @tc.desc : Check whether the entered value is of biguint64array array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsBigUint64Array005", 0, function () { - let proc = new util.types(); - let result = proc.isBigUint64Array(new BigInt64Array([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_BIG_INT64_ARRAY_001 - * @tc.name : testIsBigInt64Array001 - * @tc.desc : Check whether the entered value is of bigint64array array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsBigInt64Array001", 0, function () { - let proc = new util.types(); - let result = proc.isBigInt64Array(new BigInt64Array([])); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_BIG_INT64_ARRAY_002 - * @tc.name : testIsBigInt64Array002 - * @tc.desc : Check whether the entered value is of bigint64array array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsBigInt64Array002", 0, function () { - let proc = new util.types(); - let result = proc.isBigInt64Array(new Int32Array([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_BIG_INT64_ARRAY_003 - * @tc.name : testIsBigInt64Array003 - * @tc.desc : Check whether the entered value is of bigint64array array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsBigInt64Array003", 0, function () { - let proc = new util.types(); - let result = proc.isBigInt64Array(new Uint8Array([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_BIG_INT64_ARRAY_004 - * @tc.name : testIsBigInt64Array004 - * @tc.desc : Check whether the entered value is of bigint64array array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsBigInt64Array004", 0, function () { - let proc = new util.types(); - let result = proc.isBigInt64Array(new Float64Array([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_BIG_INT64_ARRAY_005 - * @tc.name : testIsBigInt64Array005 - * @tc.desc : Check whether the entered value is of bigint64array array type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsBigInt64Array005", 0, function () { - let proc = new util.types(); - let result = proc.isBigInt64Array(new Int8Array([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_ASYNC_FUNCTION_001 - * @tc.name : testIsAsyncFunction001 - * @tc.desc : Check whether the value entered is an asynchronous function type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsAsyncFunction001", 0, function () { - let proc = new util.types(); - let result = proc.isAsyncFunction(false); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_ASYNC_FUNCTION_002 - * @tc.name : testIsAsyncFunction002 - * @tc.desc : Check whether the value entered is an asynchronous function type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsAsyncFunction002", 0, function () { - let proc = new util.types(); - let result = proc.isAsyncFunction(function foo() {}); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_ASYNC_FUNCTION_003 - * @tc.name : testIsAsyncFunction003 - * @tc.desc : Check whether the value entered is an asynchronous function type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsAsyncFunction003", 0, function () { - let proc = new util.types(); - let result = proc.isAsyncFunction(new Int8Array()); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_ASYNC_FUNCTION_004 - * @tc.name : testIsAsyncFunction004 - * @tc.desc : Check whether the value entered is an asynchronous function type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsAsyncFunction004", 0, function () { - let proc = new util.types(); - let result = proc.isAsyncFunction(async function foo() {}); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_ARRAY_BUFFER_001 - * @tc.name : testIsArrayBuffer001 - * @tc.desc : Check whether the entered value is of arraybuffer type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsArrayBuffer001", 0, function () { - let proc = new util.types(); - let result = proc.isArrayBuffer(new ArrayBuffer(0)); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_ARRAY_BUFFER_002 - * @tc.name : testIsArrayBuffer002 - * @tc.desc : Check whether the entered value is of arraybuffer type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsArrayBuffer002", 0, function () { - let proc = new util.types(); - let result = proc.isArrayBuffer(true); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_ARRAY_BUFFER_003 - * @tc.name : testIsArrayBuffer003 - * @tc.desc : Check whether the entered value is of arraybuffer type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsArrayBuffer003", 0, function () { - let proc = new util.types(); - let result = proc.isArrayBuffer(false); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_ARRAY_BUFFER_004 - * @tc.name : testIsArrayBuffer004 - * @tc.desc : Check whether the entered value is of arraybuffer type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsArrayBuffer004", 0, function () { - let proc = new util.types(); - let result = proc.isArrayBuffer(new Int8Array()); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_ARRAY_BUFFER_005 - * @tc.name : testIsArrayBuffer005 - * @tc.desc : Check whether the entered value is of arraybuffer type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsArrayBuffer005", 0, function () { - let proc = new util.types(); - let result = proc.isArrayBuffer(new Int16Array()); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_ARGUMENTS_OBJECT_001 - * @tc.name : testIsArgumentsObject001 - * @tc.desc : Check whether the entered value is an arguments object type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsArgumentsObject001", 0, function () { - let proc = new util.types(); - function foo() { - let result = proc.isArgumentsObject(arguments); - expect(result).assertEqual(true); - } - let f = foo(); - }); - - /** - * @tc.number: TEST_IS_ARGUMENTS_OBJECT_002 - * @tc.name : testIsArgumentsObject002 - * @tc.desc : Check whether the entered value is an arguments object type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsArgumentsObject002", 0, function () { - let proc = new util.types(); - let result = proc.isArgumentsObject(new Int8Array([])); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_ARGUMENTS_OBJECT_003 - * @tc.name : testIsArgumentsObject003 - * @tc.desc : Check whether the entered value is an arguments object type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsArgumentsObject003", 0, function () { - let proc = new util.types(); - let result = proc.isArgumentsObject(true); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_ARGUMENTS_OBJECT_004 - * @tc.name : testIsArgumentsObject004 - * @tc.desc : Check whether the entered value is an arguments object type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsArgumentsObject004", 0, function () { - let proc = new util.types(); - let result = proc.isArgumentsObject(false); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_ARGUMENTS_OBJECT_005 - * @tc.name : testIsArgumentsObject005 - * @tc.desc : Check whether the entered value is an arguments object type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsArgumentsObject005", 0, function () { - let proc = new util.types(); - let result = proc.isArgumentsObject(new Boolean()); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_ARRAY_BUFFER_VIEW_001 - * @tc.name : testIsArrayBufferView001 - * @tc.desc : Check whether the entered value is napi_ int8_ array or napi_ uint8_ array - or naPi_ uint8_ clamped_ array or naPi_ int16_ array or naPi_ uint16_ array or napi_ int32_ array or napi_ - uint32_ array or napi_ float32_ array or napi_ float64_ array array or DataView type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsArrayBufferView001", 0, function () { - let proc = new util.types(); - let result = proc.isArrayBufferView(new Int8Array([])); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_ARRAY_BUFFER_VIEW_002 - * @tc.name : testIsArrayBufferView002 - * @tc.desc : Check whether the entered value is napi_ int8_ array or napi_ uint8_ array - or naPi_ uint8_ clamped_ array or naPi_ int16_ array or naPi_ uint16_ array or napi_ int32_ array or napi_ - uint32_ array or napi_ float32_ array or napi_ float64_ array array or DataView type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsArrayBufferView002", 0, function () { - let proc = new util.types(); - let result = proc.isArrayBufferView(new Int32Array([])); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_ARRAY_BUFFER_VIEW_003 - * @tc.name : testIsArrayBufferView003 - * @tc.desc : Check whether the entered value is napi_ int8_ array or napi_ uint8_ array - or naPi_ uint8_ clamped_ array or naPi_ int16_ array or naPi_ uint16_ array or napi_ int32_ array or napi_ - uint32_ array or napi_ float32_ array or napi_ float64_ array array or DataView type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsArrayBufferView003", 0, function () { - let proc = new util.types(); - let result = proc.isArrayBufferView(new DataView(new ArrayBuffer(16))); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_ARRAY_BUFFER_VIEW_004 - * @tc.name : testIsArrayBufferView004 - * @tc.desc : Check whether the entered value is napi_ int8_ array or napi_ uint8_ array - or naPi_ uint8_ clamped_ array or naPi_ int16_ array or naPi_ uint16_ array or napi_ int32_ array or napi_ - uint32_ array or napi_ float32_ array or napi_ float64_ array array or DataView type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsArrayBufferView004", 0, function () { - let proc = new util.types(); - let result = proc.isArrayBufferView(false); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_ARRAY_BUFFER_VIEW_005 - * @tc.name : testIsArrayBufferView005 - * @tc.desc : Check whether the entered value is napi_ int8_ array or napi_ uint8_ array - or naPi_ uint8_ clamped_ array or naPi_ int16_ array or naPi_ uint16_ array or napi_ int32_ array or napi_ - uint32_ array or napi_ float32_ array or napi_ float64_ array array or DataView type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsArrayBufferView005", 0, function () { - let proc = new util.types(); - let result = proc.isArrayBufferView(new Int16Array([])); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_ANY_ARRAY_BUFFER_001 - * @tc.name : testIsAnyArrayBuffer001 - * @tc.desc : Check whether the entered value is of anyarraybuffer type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsAnyArrayBuffer001", 0, function () { - let proc = new util.types(); - let result = proc.isAnyArrayBuffer(new ArrayBuffer(0)); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_ANY_ARRAY_BUFFER_002 - * @tc.name : testIsAnyArrayBuffer002 - * @tc.desc : Check whether the entered value is of anyarraybuffer type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsAnyArrayBuffer002", 0, function () { - let proc = new util.types(); - let result = proc.isAnyArrayBuffer(true); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_ANY_ARRAY_BUFFER_003 - * @tc.name : testIsAnyArrayBuffer003 - * @tc.desc : Check whether the entered value is of anyarraybuffer type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsAnyArrayBuffer003", 0, function () { - let proc = new util.types(); - let result = proc.isAnyArrayBuffer(false); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_ANY_ARRAY_BUFFER_004 - * @tc.name : testIsAnyArrayBuffer004 - * @tc.desc : Check whether the entered value is of anyarraybuffer type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsAnyArrayBuffer004", 0, function () { - let proc = new util.types(); - let buf = new ArrayBuffer(10); - let result = proc.isAnyArrayBuffer(buf); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_ANY_ARRAY_BUFFER_005 - * @tc.name : testIsAnyArrayBuffer005 - * @tc.desc : Check whether the entered value is of anyarraybuffer type. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsAnyArrayBuffer005", 0, function () { - let proc = new util.types(); - let result = proc.isAnyArrayBuffer(new Boolean(false)); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_UTIL_FORMAT_001 - * @tc.name : testUtilFormat001 - * @tc.desc : Returns the formatted string. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUtilFormat001", 0, function () { - let format = "%i,%s"; - let value1 = 1.5; - let value2 = "qwer"; - let value3 = 15; - let result = util.format(format, value1, value2, value3); - expect(result).assertEqual("1,qwer 15"); - }); - - /** - * @tc.number: TEST_UTIL_FORMAT_002 - * @tc.name : testUtilFormat002 - * @tc.desc : Returns the formatted string. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUtilFormat002", 0, function () { - let format = "%O"; - let value = { name: "jack", age: 15 }; - let result = util.format(format, value); - expect(result).assertEqual("{ name: 'jack',\n age: 15 }"); - }); - - /** - * @tc.number: TEST_UTIL_FORMAT_003 - * @tc.name : testUtilFormat003 - * @tc.desc : Returns the formatted string. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUtilFormat003", 0, function () { - let format = "%o"; - let value = [1, 2, 3]; - let result = util.format(format, value); - expect(result).assertEqual("[ 1, 2, 3, [length]: 3 ]"); - }); - - /** - * @tc.number: TEST_UTIL_FORMAT_004 - * @tc.name : testUtilFormat004 - * @tc.desc : Returns the formatted string. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUtilFormat004", 0, function () { - let format = "%s,%s,%s"; - let value1 = "1.5"; - let value2 = "qwer"; - let result = util.format(format, value1, value2); - expect(result).assertEqual("1.5,qwer,%s"); - }); - - /** - * @tc.number: TEST_UTIL_FORMAT_005 - * @tc.name : testUtilFormat005 - * @tc.desc : Returns the formatted string. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUtilFormat005", 0, function () { - let format = "%d,%d"; - let value1 = 6; - let value2 = 16; - let result = util.format(format, value1, value2); - expect(result).assertEqual("6,16"); - }); - - /** - * @tc.number: TEST_UTIL_ERR_NO_TO_STRING_001 - * @tc.name : testUtilErrNoToString001 - * @tc.desc : Get the string name of the system errno. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUtilErrNoToString001", 0, async function () { - let errnum = 10; - let result = util.errnoToString(errnum); - expect(result).assertEqual("Unknown system error 10"); - }); - - /** - * @tc.number: TEST_UTIL_ERR_NO_TO_STRING_002 - * @tc.name : testUtilErrNoToString002 - * @tc.desc : Get the string name of the system errno. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUtilErrNoToString002", 0, async function () { - let errnum = 0; - let result = util.errnoToString(errnum); - expect(result).assertEqual("Unknown system error 0"); - }); - - /** - * @tc.number: TEST_UTIL_ERR_NO_TO_STRING_003 - * @tc.name : testUtilErrNoToString003 - * @tc.desc : Get the string name of the system errno. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUtilErrNoToString003", 0, async function () { - let errnum = -1; - let result = util.errnoToString(errnum); - expect(result).assertEqual("operation not permitted"); - }); - - /** - * @tc.number: TEST_UTIL_ERR_NO_TO_STRING_004 - * @tc.name : testUtilErrNoToString004 - * @tc.desc : Get the string name of the system errno. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUtilErrNoToString004", 0, async function () { - let errnum = 9; - let result = util.errnoToString(errnum); - expect(result).assertEqual("Unknown system error 9"); - }); - - /** - * @tc.number: TEST_UTIL_ERR_NO_TO_STRING_005 - * @tc.name : testUtilErrNoToString005 - * @tc.desc : Get the string name of the system errno. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUtilErrNoToString005", 0, async function () { - let errnum = 555; - let result = util.errnoToString(errnum); - expect(result).assertEqual("Unknown system error 555"); - }); - - /** - * @tc.number: TEST_UTIL_CALLBACK_WRAPPER_001 - * @tc.name : testUtilCallbackWrapper001 - * @tc.desc : Takes an async function (or a function that returns a Promise) and - returns a function following the error-first callback style. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUtilCallbackWrapper001", 0, async function () { - async function promiseFn() { - return Promise.resolve("value"); - } - let cb = util.callbackWrapper(promiseFn); - cb(1, (err, ret) => { - expect(err).assertEqual(null); - expect(ret).assertEqual("value"); - }); - }); - - /** - * @tc.number: TEST_UTIL_CALLBACK_WRAPPER_002 - * @tc.name : testUtilCallbackWrapper002 - * @tc.desc : Takes an async function (or a function that returns a Promise) and - returns a function following the error-first callback style. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUtilCallbackWrapper002", 0, async function () { - async function promiseFn() { - return 42; - } - let cb = util.callbackWrapper(promiseFn); - cb(1, (err, ret) => { - expect(err).assertEqual(null); - expect(ret).assertEqual(42); - }); - }); - - /** - * @tc.number: TEST_UTIL_CALLBACK_WRAPPER_003 - * @tc.name : testUtilCallbackWrapper003 - * @tc.desc : Takes an async function (or a function that returns a Promise) and - returns a function following the error-first callback style. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUtilCallbackWrapper003", 0, async function () { - async function promiseFn() { - let err = Error("value"); - return Promise.reject(err); - } - let cb = util.callbackWrapper(promiseFn); - cb(1, (err, ret) => { - expect(err.message === "value").assertTrue(); - expect(ret).assertEqual(undefined); - }); - }); - - /** - * @tc.number: TEST_UTIL_CALLBACK_WRAPPER_004 - * @tc.name : testUtilCallbackWrapper004 - * @tc.desc : Takes an async function (or a function that returns a Promise) and - returns a function following the error-first callback style. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUtilCallbackWrapper004", 0, async function () { - async function promiseFn(args) { - const [a, b] = args; - return a + b; - } - let cb = util.callbackWrapper(promiseFn); - cb([1, 2], (err, ret) => { - expect(err).assertEqual(null); - expect(ret).assertEqual(3); - }); - }); - - /** - * @tc.number: TEST_UTIL_CALLBACK_WRAPPER_005 - * @tc.name : testUtilCallbackWrapper005 - * @tc.desc : Takes an async function (or a function that returns a Promise) and - returns a function following the error-first callback style. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUtilCallbackWrapper005", 0, async function () { - async function promiseFn() { - return null; - } - let cb = util.callbackWrapper(promiseFn); - try { - cb(1, [1, 2]); - expect(0).assertEqual(1); - } catch (err) { - expect(err.message).assertEqual("maybe is not function"); - } - }); - - /** - * @tc.number: TEST_UTIL_PROMISIFY_001 - * @tc.name : testUtilPromisify001 - * @tc.desc : Takes a function following the common error-first callback style, - taking an callback as the last argument, and return a function that returns promises. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUtilPromisify001", 0, async function () { - function fn(val, callback) { - if (typeof val === "string") { - callback(null, val); - } else { - callback("type err"); - } - } - let value = util.promisify(fn); - const result = await value("Hello"); - expect(result[0] == "Hello").assertTrue(); - }); - - /** - * @tc.number: TEST_UTIL_PROMISIFY_002 - * @tc.name : testUtilPromisify002 - * @tc.desc : Takes a function following the common error-first callback style, - taking an callback as the last argument, and return a function that returns promises. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUtilPromisify002", 0, async function () { - function fn(str, callback) { - if (typeof str === "string") { - callback(null, str); - } else { - callback(null, "type err"); - } - } - let value = util.promisify(fn); - const result = await value(123); - expect(result[0] == "type err").assertTrue(); - }); - - /** - * @tc.number: TEST_UTIL_PROMISIFY_003 - * @tc.name : testUtilPromisify003 - * @tc.desc : Takes a function following the common error-first callback style, - taking an callback as the last argument, and return a function that returns promises. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUtilPromisify003", 0, async function () { - function fn(val, callback) { - callback(null, val); - } - let value = util.promisify(fn); - const result = await value(42); - expect(result[0] == 42).assertTrue(); - }); - - /** - * @tc.number: TEST_UTIL_PROMISIFY_004 - * @tc.name : testUtilPromisify004 - * @tc.desc : Takes a function following the common error-first callback style, - taking an callback as the last argument, and return a function that returns promises. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUtilPromisify004", 0, async function () { - function fn(val, callback) { - if (typeof val === "boolean") { - callback(null, val); - } else { - callback("type err"); - } - } - let value = util.promisify(fn); - const result = await value(false); - expect(result[0] == false).assertTrue(); - }); - - /** - * @tc.number: TEST_UTIL_PROMISIFY_005 - * @tc.name : testUtilPromisify005 - * @tc.desc : Takes a function following the common error-first callback style, - taking an callback as the last argument, and return a function that returns promises. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUtilPromisify005", 0, async function () { - function fn(val, callback) { - if (typeof val === "number") { - callback(null, val); - } else { - callback("type err"); - } - } - let value = util.promisify(fn); - const result = await value(100); - expect(result[0] == 100).assertTrue(); - }); - - /** - * @tc.number: TEST_UTIL_GENERATE_RANDOM_UUID_001 - * @tc.name : testUtilGenerateRandomUUID001 - * @tc.desc : Generate a random RFC 4122 version 4 UUID. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUtilGenerateRandomUUID001", 0, async function () { - let result = util.generateRandomUUID(true); - expect(result.length).assertEqual(36); - }); - - /** - * @tc.number: TEST_UTIL_GENERATE_RANDOM_UUID_002 - * @tc.name : testUtilGenerateRandomUUID002 - * @tc.desc : Generate a random RFC 4122 version 4 UUID. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUtilGenerateRandomUUID002", 0, async function () { - let result = util.generateRandomUUID(false); - expect(result.length).assertEqual(36); - }); - - /** - * @tc.number: TEST_UTIL_GENERATE_RANDOM_BINARY_UUID_001 - * @tc.name : testUtilGenerateRandomBinaryUUID001 - * @tc.desc : Generate a random RFC 4122 version 4 UUID. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUtilGenerateRandomBinaryUUID001", 0, async function () { - let result = util.generateRandomBinaryUUID(true); - expect(result.length).assertEqual(16); - }); - - /** - * @tc.number: TEST_UTIL_GENERATE_RANDOM_BINARY_UUID_002 - * @tc.name : testUtilGenerateRandomBinaryUUID002 - * @tc.desc : Generate a random RFC 4122 version 4 UUID. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUtilgenerateRandomBinaryUUID002", 0, async function () { - let result = util.generateRandomBinaryUUID(false); - expect(result.length).assertEqual(16); - }); - - /** - * @tc.number: TEST_UTIL_PARSE_UUID_001 - * @tc.name : testUtilParseUUID001 - * @tc.desc : Generate a random RFC 4122 version 4 UUID. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUtilParseUUID001", 0, async function () { - let result = util.parseUUID("84bdf796-66cc-4655-9b89-d6218d100f9c"); - expect(result.length).assertEqual(16); - }); - - /** - * @tc.number: TEST_UTIL_PARSE_UUID_002 - * @tc.name : testUtilParseUUID002 - * @tc.desc : Generate a random RFC 4122 version 4 UUID. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUtilParseUUID002", 0, async function () { - try { - let result = util.parseUUID("84df796-66cc-4655-9b89-d6218d100f9c"); - expect(0).assertEqual(1); - } catch (e) { - expect(e.message).assertEqual("Syntax Error.Invalid 84df796-66cc-4655-9b89-d6218d100f9c string"); - } - }); - - /** - * @tc.number: TEST_UTIL_PARSE_UUID_003 - * @tc.name : testUtilParseUUID003 - * @tc.desc : Generate a random RFC 4122 version 4 UUID. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testUtilParseUUID003", 0, async function () { - try { - let result = util.parseUUID("84Wdf796-66cc-4655-9b89-d6218d100f9c"); - expect(0).assertEqual(1); - } catch (e) { - expect(e.message).assertEqual("Syntax Error.Invalid 84Wdf796-66cc-4655-9b89-d6218d100f9c string"); - } - }); - - /** - * @tc.number: TEST_ENCODING_TEXT_DECODER_001 - * @tc.name : testEncodingTextDecoder001 - * @tc.desc : The source encoding's name, lowercased. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEncodingTextDecoder001", 0, function () { - let that = util.TextDecoder.create("utf-8", { ignoreBOM: true }); - let retStr = that.encoding; - expect(retStr).assertEqual("utf-8"); - }); - - /** - * @tc.number: TEST_FATAL_001 - * @tc.name : testFatal001 - * @tc.desc : Returns `true` if error mode is "fatal", and `false` otherwise. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testFatal001", 0, function () { - let that = util.TextDecoder.create("utf-16be", { fatal: true }); - let fatalStr = that.fatal; - expect(fatalStr).assertEqual(true); - }); - - /** - * @tc.number: TEST_IGNORE_BOM_001 - * @tc.name : testIgnoreBom001 - * @tc.desc : Returns `true` if ignore BOM flag is set, and `false` otherwise. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIgnoreBOM001", 0, function () { - let that = util.TextDecoder.create("utf-16be", { ignoreBOM: true }); - let ignoreBOMStr = that.ignoreBOM; - expect(ignoreBOMStr).assertEqual(true); - }); - - /** - * @tc.number: TEST_CONSTRUCTOR_001 - * @tc.name : testConstructor001 - * @tc.desc : Check if the constructor of TextDecoder has been called. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testConstructor001", 0, function () { - let that = new util.TextDecoder(); - expect(that != null).assertTrue(); - }); - - /** - * @tc.number: TEST_TEXT_DECODER_CREATE_001 - * @tc.name : testTextDecoderCreate001 - * @tc.desc : The source encoding's name, lowercased. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testTextDecoderCreate001", 0, function () { - let that = util.TextDecoder.create("utf-8", { ignoreBOM: true }); - let retStr = that.encoding; - expect(retStr).assertEqual("utf-8"); - }); - - /** - * @tc.number: TEST_TEXT_DECODER_CREATE_002 - * @tc.name : testTextDecoderCreate002 - * @tc.desc : The source encoding's name, lowercased. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testTextDecoderCreate002", 0, function () { - let that = util.TextDecoder.create("utf-16le"); - let encodingStr = that.encoding; - expect(encodingStr).assertEqual("utf-16le"); - }); - - /** - * @tc.number: TEST_TEXT_DECODER_CREATE_003 - * @tc.name : testTextDecoderCreate003 - * @tc.desc : The source encoding's name, lowercased. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testTextDecoderCreate003", 0, function () { - let that = util.TextDecoder.create("utf-16be", { ignoreBOM: true }); - let encodingStr = that.encoding; - expect(encodingStr).assertEqual("utf-16be"); - }); - - /** - * @tc.number: TEST_TEXT_DECODER_CREATE_004 - * @tc.name : testTextDecoderCreate004 - * @tc.desc : The source encoding's name, lowercased. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testTextDecoderCreate004", 0, function () { - let that = util.TextDecoder.create("utf-16be", { ignoreBOM: false }); - let encodingStr = that.encoding; - expect(encodingStr).assertEqual("utf-16be"); - }); - - /** - * @tc.number: TEST_TEXT_DECODER_CREATE_005 - * @tc.name : testTextDecoderCreate005 - * @tc.desc : The source encoding's name, lowercased. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testTextDecoderCreate005", 0, function () { - let that = util.TextDecoder.create(); - let encodingStr = that.encoding; - expect(encodingStr).assertEqual("utf-8"); - }); - - /** - * @tc.number: TEST_TEXT_DECODER_CREATE_006 - * @tc.name : testTextDecoderCreate006 - * @tc.desc : The source encoding's name, lowercased. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testTextDecoderCreate006", 0, function () { - let that = util.TextDecoder.create("utf-8", { ignoreBOM: false }); - let encodingStr = that.encoding; - expect(encodingStr).assertEqual("utf-8"); - }); - - /** - * @tc.number: TEST_DECODER_WITH_STREAM_001 - * @tc.name : testDecodeWithStream001 - * @tc.desc : Decode the input parameters and output the corresponding text. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testDecodeWithStream001", 0, function () { - let that = util.TextDecoder.create("utf-16le", { ignoreBOM: false }); - let arr = new Uint8Array(8); - arr[0] = 0xff; - arr[1] = 0xfe; - arr[2] = 0x61; - arr[3] = 0x00; - arr[4] = 0x62; - arr[5] = 0x00; - arr[6] = 0x63; - arr[7] = 0x00; - let retStr = that.decodeWithStream(arr, { stream: false }); - let BOM = "\uFEFF"; - let rel = "abc"; - let re = BOM + rel; - expect(retStr).assertEqual(re); - }); - - /** - * @tc.number: TEST_DECODER_WITH_STREAM_002 - * @tc.name : testDecodeWithStream002 - * @tc.desc : Decode the input parameters and output the corresponding text. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testDecodeWithStream002", 0, function () { - let that = util.TextDecoder.create("utf-8", { ignoreBOM: true }); - let arr = new Uint8Array(6); - arr[0] = 0xef; - arr[1] = 0xbb; - arr[2] = 0xbf; - arr[3] = 0x61; - arr[4] = 0x62; - arr[5] = 0x63; - let retStr = that.decodeWithStream(arr, { stream: true }); - let BOM = "\uFEFF"; - let rel = "abc"; - let re = BOM + rel; - expect(retStr).assertEqual(re); - }); - - /** - * @tc.number: TEST_DECODER_WITH_STREAM_003 - * @tc.name : testDecodeWithStream003 - * @tc.desc : Decode the input parameters and output the corresponding text. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testDecodeWithStream003", 0, function () { - let that = util.TextDecoder.create("utf-16be"); - let arr = new Uint8Array(6); - arr[0] = 0x00; - arr[1] = 0x61; - arr[2] = 0x00; - arr[3] = 0x62; - arr[4] = 0x00; - arr[5] = 0x63; - let retStr = that.decodeWithStream(arr); - let rel = "abc"; - expect(retStr).assertEqual(rel); - }); - - /** - * @tc.number: TEST_DECODER_WITH_STREAM_004 - * @tc.name : testDecodeWithStream004 - * @tc.desc : Decode the input parameters and output the corresponding text. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testDecodeWithStream004", 0, function () { - let that = util.TextDecoder.create("utf-16le"); - let arr = new Uint8Array(6); - arr[0] = 0x61; - arr[1] = 0x00; - arr[2] = 0x62; - arr[3] = 0x00; - arr[4] = 0x63; - arr[5] = 0x00; - let retStr = that.decodeWithStream(arr); - let rel = "abc"; - expect(retStr).assertEqual(rel); - }); - - /** - * @tc.number: TEST_DECODER_WITH_STREAM_005 - * @tc.name : testDecodeWithStream005 - * @tc.desc : Decode the input parameters and output the corresponding text. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testDecodeWithStream005", 0, function () { - let that = util.TextDecoder.create("utf-8"); - let arr = new Uint8Array(3); - for (let i = 0; i < 3; i++) { - arr[i] = 0x61 + i; - } - let retStr = that.decodeWithStream(arr); - let rel = "abc"; - expect(retStr).assertEqual(rel); - }); - - /** - * @tc.number: TEST_ENCODING_TEXT_ENCODER_001 - * @tc.name : testEncodingTextEncoder001 - * @tc.desc : Encoding format. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEncodingTextEncoder001", 0, function () { - let that = new util.TextEncoder(); - let str = that.encoding; - expect(str).assertEqual("utf-8"); - }); - - /** - * @tc.number: TEST_ENCODE_INTO_001 - * @tc.name : testEncodeInto001 - * @tc.desc : Returns the result of encoder. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEncodeInto001", 0, function () { - let that = new util.TextEncoder(); - let buffer = new ArrayBuffer(20); - let result = new Uint8Array(buffer); - result = that.encodeInto("abc"); - expect(result[0]).assertEqual(0x61); - }); - - /** - * @tc.number: TEST_ENCODE_INTO_002 - * @tc.name : testEncodeInto002 - * @tc.desc : Returns the result of encoder. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEncodeInto002", 0, function () { - let that = new util.TextEncoder(); - let buffer = new ArrayBuffer(20); - let result = new Uint8Array(buffer); - result = that.encodeInto("\uD800楼楼"); - expect(result[5]).assertEqual(188); - }); - - /** - * @tc.number: TEST_ENCODE_INTO_003 - * @tc.name : testEncodeInto003 - * @tc.desc : Returns the result of encoder. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEncodeInto003", 0, function () { - let that = new util.TextEncoder(); - let buffer = new ArrayBuffer(20); - let result = new Uint8Array(buffer); - result = that.encodeInto("a\uD800楼楼"); - expect(result[0]).assertEqual(0x61); - }); - - /** - * @tc.number: TEST_ENCODE_INTO_004 - * @tc.name : testEncodeInto004 - * @tc.desc : Returns the result of encoder. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEncodeInto004", 0, function () { - let that = new util.TextEncoder(); - let buffer = new ArrayBuffer(20); - let result = new Uint8Array(buffer); - result = that.encodeInto("abc\uD800楼楼"); - expect(result[1]).assertEqual(0x62); - }); - - /** - * @tc.number: TEST_ENCODE_INTO_005 - * @tc.name : testEncodeInto005 - * @tc.desc : Returns the result of encoder. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEncodeInto005", 0, function () { - let that = new util.TextEncoder(); - let buffer = new ArrayBuffer(20); - let result = new Uint8Array(buffer); - result = that.encodeInto("123\uD800楼楼"); - expect(result[0]).assertEqual(49); - expect(result[9]).assertEqual(230); - }); - - /** - * @tc.number: TEST_ENCODE_INTO_006 - * @tc.name : testEncodeInto006 - * @tc.desc : Returns the result of encoder. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEncodeInto006", 0, function () { - let that = new util.TextEncoder(); - let buffer = new ArrayBuffer(20); - let result = new Uint8Array(buffer); - result = that.encodeInto("123¥\uD800楼"); - expect(result[10]).assertEqual(0xbc); - }); - - /** - * @tc.number: TEST_ENCODE_INTO_007 - * @tc.name : testEncodeInto007 - * @tc.desc : Returns the result of encoder. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEncodeInto007", 0, function () { - let that = new util.TextEncoder(); - let buffer = new ArrayBuffer(20); - let result = new Uint8Array(buffer); - result = that.encodeInto("¥¥"); - expect(result[0]).assertEqual(0xc2); - }); - - /** - * @tc.number: TEST_ENCODE_INTO_008 - * @tc.name : testEncodeInto008 - * @tc.desc : Returns the result of encoder. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEncodeInto008", 0, function () { - let that = new util.TextEncoder(); - let buffer = new ArrayBuffer(20); - let result = new Uint8Array(buffer); - result = that.encodeInto("$$"); - expect(result[0]).assertEqual(0x24); - }); - - /** - * @tc.number: TEST_ENCODE_INTO_009 - * @tc.name : testEncodeInto009 - * @tc.desc : Returns the result of encoder for gb18030. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEncodeInto009", 0, function () { - let that1 = new util.TextEncoder('gb18030'); - let that = new util.TextEncoder(); - let buffer = new ArrayBuffer(20); - let result = new Uint8Array(buffer); - result = that.encodeInto("abcde"); - expect(that1 != null).assertTrue(); - expect(result[0]).assertEqual(97); - expect(result[1]).assertEqual(98); - expect(result[2]).assertEqual(99); - expect(result[3]).assertEqual(100); - expect(result[4]).assertEqual(101); - }); - - /** - * @tc.number: TEST_ENCODE_INTO_010 - * @tc.name : testEncodeInto010 - * @tc.desc : Returns the result of encoder for GB18030. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEncodeInto010", 0, function () { - let that1 = new util.TextEncoder('GB18030'); - let that = new util.TextEncoder(); - let buffer = new ArrayBuffer(20); - let result = new Uint8Array(buffer); - result = that.encodeInto("abcde"); - expect(that1 != null).assertTrue(); - expect(result[0]).assertEqual(97); - expect(result[1]).assertEqual(98); - expect(result[2]).assertEqual(99); - expect(result[3]).assertEqual(100); - expect(result[4]).assertEqual(101); - }); - - /** - * @tc.number: TEST_ENCODE_INTO_UINT_8_ARRAY_001 - * @tc.name : testEncodeIntoUint8Array001 - * @tc.desc : encode string, write the result to dest array. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEncodeIntoUint8Array001", 0, function () { - let that = new util.TextEncoder(); - let buffer = new ArrayBuffer(20); - let dest = new Uint8Array(buffer, 0, 13); - let result = new Object(); - result = that.encodeIntoUint8Array("\uD800A\uDF06A楼HiA", dest); - expect(result["read"]).assertEqual(7); - expect(result["written"]).assertEqual(13); - }); - - /** - * @tc.number: TEST_ENCODE_INTO_UINT_8_ARRAY_002 - * @tc.name : testEncodeIntoUint8Array002 - * @tc.desc : encode string, write the result to dest array. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEncodeIntoUint8Array002", 0, function () { - let that = new util.TextEncoder(); - let buffer = new ArrayBuffer(6); - let dest = new Uint8Array(buffer); - let result = new Object(); - result = that.encodeIntoUint8Array("abc\u2603d", dest); - expect(result["read"]).assertEqual(4); - expect(result["written"]).assertEqual(6); - }); - - /** - * @tc.number: TEST_ENCODE_INTO_UINT_8_ARRAY_003 - * @tc.name : testEncodeIntoUint8Array003 - * @tc.desc : encode string, write the result to dest array. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEncodeIntoUint8Array003", 0, function () { - let that = new util.TextEncoder(); - let buffer = new ArrayBuffer(4); - let dest = new Uint8Array(buffer); - let result = new Object(); - result = that.encodeIntoUint8Array("abcd", dest); - expect(result["read"]).assertEqual(4); - expect(result["written"]).assertEqual(4); - }); - - /** - * @tc.number: TEST_ENCODE_INTO_UINT_8_ARRAY_004 - * @tc.name : testEncodeIntoUint8Array004 - * @tc.desc : encode string, write the result to dest array. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEncodeIntoUint8Array004", 0, function () { - let that = new util.TextEncoder(); - let buffer = new ArrayBuffer(4); - let dest = new Uint8Array(buffer); - let result = new Object(); - result = that.encodeIntoUint8Array("12345", dest); - expect(result["read"]).assertEqual(4); - expect(result["written"]).assertEqual(4); - }); - - /** - * @tc.number: TEST_ENCODE_INTO_UINT_8_ARRAY_005 - * @tc.name : testEncodeIntoUint8Array005 - * @tc.desc : encode string, write the result to dest array. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEncodeIntoUint8Array005", 0, function () { - let that = new util.TextEncoder(); - let buffer = new ArrayBuffer(4); - let dest = new Uint8Array(buffer); - let result = new Object(); - result = that.encodeIntoUint8Array("123 4*!@#", dest); - expect(result["read"]).assertEqual(4); - expect(result["written"]).assertEqual(4); - }); - - /** - * @tc.number: TEST_ENCODE_INTO_UINT_8_ARRAY_006 - * @tc.name : testEncodeIntoUint8Array006 - * @tc.desc : encode string, write the result to dest array. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEncodeIntoUint8Array006", 0, function () { - let that = new util.TextEncoder(); - let buffer = new ArrayBuffer(4); - let dest = new Uint8Array(buffer); - let result = new Object(); - result = that.encodeIntoUint8Array("", dest); - expect(result["read"]).assertEqual(0); - expect(result["written"]).assertEqual(0); - }); - - /** - * @tc.number: TEST_ENCODE_INTO_UINT_8_ARRAY_007 - * @tc.name : testEncodeIntoUint8Array007 - * @tc.desc : encode string, write the result to dest array. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEncodeIntoUint8Array007", 0, function () { - let that = new util.TextEncoder(); - let buffer = new ArrayBuffer(20); - let dest = new Uint8Array(buffer); - let result = new Object(); - result = that.encodeIntoUint8Array("12ab", dest); - expect(result["read"]).assertEqual(4); - expect(result["written"]).assertEqual(4); - }); - - /** - * @tc.number: TEST_ENCODE_INTO_UINT_8_ARRAY_008 - * @tc.name : testEncodeIntoUint8Array008 - * @tc.desc : encode string, write the result to dest array. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEncodeIntoUint8Array008", 0, function () { - let that = new util.TextEncoder(); - let buffer = new ArrayBuffer(20); - let dest = new Uint8Array(buffer, 0, 0); - let result = new Object(); - result = that.encodeIntoUint8Array("\uD800A\uDF06A楼HiA", dest); - expect(result["read"]).assertEqual(0); - expect(result["written"]).assertEqual(0); - }); - - /** - * @tc.number: TEST_PARSE_Rational_NUMBER_001 - * @tc.name : testParseRationalNumber001 - * @tc.desc : Creates a RationalNumber object based on a given string. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParseRationalNumber001", 0, function () { - let res = util.RationalNumber.parseRationalNumber(2, 1); - let result = res.valueOf(); - expect(result).assertEqual(2); - }); - - /** - * @tc.number: TEST_CREATE_Rational_FROM_STRING_001 - * @tc.name : testCreateRationalFromString001 - * @tc.desc : Creates a RationalNumber object based on a given string. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testCreateRationalFromString001", 0, function () { - let res = util.RationalNumber.createRationalFromString("-1:2"); - let result = res.valueOf(); - expect(result).assertEqual(-0.5); - }); - - /** - * @tc.number: TEST_CREATE_Rational_FROM_STRING_002 - * @tc.name : testCreateRationalFromString002 - * @tc.desc : Creates a RationalNumber object based on a given string. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testCreateRationalFromString002", 0, function () { - let res = util.RationalNumber.createRationalFromString("+3/4"); - let result = res.valueOf(); - expect(result).assertEqual(0.75); - }); - - /** - * @tc.number: TEST_CREATE_Rational_FROM_STRING_003 - * @tc.name : testCreateRationalFromString003 - * @tc.desc : Creates a RationalNumber object based on a given string. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testCreateRationalFromString003", 0, function () { - let res = util.RationalNumber.createRationalFromString("+3:-4"); - let result = res.valueOf(); - expect(result).assertEqual(-0.75); - }); - - /** - * @tc.number: TEST_CREATE_Rational_FROM_STRING_004 - * @tc.name : testCreateRationalFromString004 - * @tc.desc : Creates a RationalNumber object based on a given string. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testCreateRationalFromString004", 0, function () { - let res = util.RationalNumber.createRationalFromString("+2:4"); - let result = res.valueOf(); - expect(result).assertEqual(0.5); - }); - - /** - * @tc.number: TEST_CREATE_Rational_FROM_STRING_004 - * @tc.name : testCreateRationalFromString004 - * @tc.desc : Creates a RationalNumber object based on a given string. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testCreateRationalFromString005", 0, function () { - let res = util.RationalNumber.createRationalFromString("+2:-4"); - let result = res.valueOf(); - expect(result).assertEqual(-0.5); - }); - - /** - * @tc.number: TEST_COMPARE_001 - * @tc.name : testCompare001 - * @tc.desc : Compares the current RationalNumber object with a given object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testCompare001", 0, function () { - let pro = util.RationalNumber.parseRationalNumber(2, 1); - let proc = util.RationalNumber.parseRationalNumber(3, 4); - let res = pro.compare(proc); - expect(res).assertEqual(1); - }); - - /** - * @tc.number: TEST_COMPARE_002 - * @tc.name : testCompare002 - * @tc.desc : Compares the current RationalNumber object with a given object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testCompare002", 0, function () { - let pro = util.RationalNumber.parseRationalNumber(2, 1); - let proc = util.RationalNumber.parseRationalNumber(0, 0); - let res = pro.compare(proc); - expect(res).assertEqual(-1); - }); - - /** - * @tc.number: TEST_COMPARE_003 - * @tc.name : testCompare003 - * @tc.desc : Compares the current RationalNumber object with a given object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testCompare003", 0, function () { - let pro = util.RationalNumber.parseRationalNumber(2, 1); - let proc = util.RationalNumber.parseRationalNumber(8, 3); - let res = pro.compare(proc); - expect(res).assertEqual(-1); - }); - - /** - * @tc.number: TEST_COMPARE_004 - * @tc.name : testCompare004 - * @tc.desc : Compares the current RationalNumber object with a given object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testCompare004", 0, function () { - let pro = util.RationalNumber.parseRationalNumber(2, 1); - let proc = util.RationalNumber.parseRationalNumber(2, 1); - let res = pro.compare(proc); - expect(res).assertEqual(0); - }); - - /** - * @tc.number: TEST_COMPARE_005 - * @tc.name : testCompare005 - * @tc.desc : Compares the current RationalNumber object with a given object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testCompare005", 0, function () { - let pro = util.RationalNumber.parseRationalNumber(0, 0); - let proc = util.RationalNumber.parseRationalNumber(2, 1); - let res = pro.compare(proc); - expect(res).assertEqual(1); - }); - - /** - * @tc.number: TEST_EQUALS_001 - * @tc.name : testEquals001 - * @tc.desc : Checks whether a given object is the same as the current RationalNumber object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEquals001", 0, function () { - let pro = new util.RationalNumber(); - expect(pro != null).assertTrue(); - let proc = new util.RationalNumber(); - let res = pro.equals(proc); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_EQUALS_002 - * @tc.name : testEquals002 - * @tc.desc : Checks whether a given object is the same as the current RationalNumber object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEquals002", 0, function () { - let pro = util.RationalNumber.parseRationalNumber(1, 2); - let proc = util.RationalNumber.parseRationalNumber(4, 2); - let res = pro.equals(proc); - expect(res).assertEqual(false); - }); - - /** - * @tc.number: TEST_EQUALS_003 - * @tc.name : testEquals003 - * @tc.desc : Checks whether a given object is the same as the current RationalNumber object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEquals003", 0, function () { - let pro = util.RationalNumber.parseRationalNumber(0, 1); - let proc = util.RationalNumber.parseRationalNumber(0, 2); - let res = pro.equals(proc); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_EQUALS_004 - * @tc.name : testEquals004 - * @tc.desc : Checks whether a given object is the same as the current RationalNumber object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEquals004", 0, function () { - let pro = util.RationalNumber.parseRationalNumber(0, 0); - let proc = util.RationalNumber.parseRationalNumber(0, 2); - let res = pro.equals(proc); - expect(res).assertEqual(false); - }); - - /** - * @tc.number: TEST_EQUALS_005 - * @tc.name : testEquals005 - * @tc.desc : Checks whether a given object is the same as the current RationalNumber object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEquals005", 0, function () { - let pro = util.RationalNumber.parseRationalNumber(-2, 0); - let proc = util.RationalNumber.parseRationalNumber(2, 0); - let res = pro.equals(proc); - expect(res).assertEqual(false); - }); - - /** - * @tc.number: TEST_RATIONAL_NUMBER_VALUE_OF_001 - * @tc.name : testRationalNumberValueOf001 - * @tc.desc : Obtains the value of the current RationalNumber object as a number. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testRationalNumberValueOf001", 0, function () { - let pro = util.RationalNumber.parseRationalNumber(2, 1); - let res = pro.valueOf(); - expect(res).assertEqual(2); - }); - - /** - * @tc.number: TEST_RATIONAL_NUMBER_VALUE_OF_002 - * @tc.name : testRationalNumberValueOf002 - * @tc.desc : Obtains the value of the current RationalNumber object as a number. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testRationalNumberValueOf002", 0, function () { - let pro = util.RationalNumber.parseRationalNumber(2, 10); - let res = pro.valueOf(); - expect(res).assertEqual(0.2); - }); - - /** - * @tc.number: TEST_RATIONAL_NUMBER_VALUE_OF_003 - * @tc.name : testRationalNumberValueOf003 - * @tc.desc : Obtains the value of the current RationalNumber object as a number. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testRationalNumberValueOf003", 0, function () { - let pro = util.RationalNumber.parseRationalNumber(1, 2); - let res = pro.valueOf(); - expect(res).assertEqual(0.5); - }); - - /** - * @tc.number: TEST_RATIONAL_NUMBER_VALUE_OF_004 - * @tc.name : testRationalNumberValueOf004 - * @tc.desc : Obtains the value of the current RationalNumber object as a number. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testRationalNumberValueOf004", 0, function () { - let pro = util.RationalNumber.parseRationalNumber(4, 2); - let res = pro.valueOf(); - expect(res).assertEqual(2); - }); - - /** - * @tc.number: TEST_RATIONAL_NUMBER_VALUE_OF_005 - * @tc.name : testRationalNumberValueOf005 - * @tc.desc : Obtains the value of the current RationalNumber object as a number. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testRationalNumberValueOf005", 0, function () { - let pro = util.RationalNumber.parseRationalNumber(4, 1); - let res = pro.valueOf(); - expect(res).assertEqual(4); - }); - - /** - * @tc.number: TEST_GET_COMMON_FACTOR_001 - * @tc.name : testGetCommonFactor001 - * @tc.desc : Obtains the greatest common divisor of two specified numbers. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetCommonFactor001", 0, function () { - let res = util.RationalNumber.getCommonFactor(4, 8); - expect(res).assertEqual(4); - }); - - /** - * @tc.number: TEST_GET_COMMON_FACTOR_002 - * @tc.name : testGetCommonFactor002 - * @tc.desc : Obtains the greatest common divisor of two specified numbers. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetCommonFactor002", 0, function () { - let res = util.RationalNumber.getCommonFactor(10, 15); - expect(res).assertEqual(5); - }); - - /** - * @tc.number: TEST_GET_COMMON_FACTOR_003 - * @tc.name : testGetCommonFactor003 - * @tc.desc : Obtains the greatest common divisor of two specified numbers. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetCommonFactor003", 0, function () { - let res = util.RationalNumber.getCommonFactor(8, 4); - expect(res).assertEqual(4); - }); - - /** - * @tc.number: TEST_GET_COMMON_FACTOR_004 - * @tc.name : testGetCommonFactor004 - * @tc.desc : Obtains the greatest common divisor of two specified numbers. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetCommonFactor004", 0, function () { - let res = util.RationalNumber.getCommonFactor(8, 16); - expect(res).assertEqual(8); - }); - - /** - * @tc.number: TEST_GET_COMMON_FACTOR_005 - * @tc.name : testGetCommonFactor005 - * @tc.desc : Obtains the greatest common divisor of two specified numbers. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetCommonFactor005", 0, function () { - let res = util.RationalNumber.getCommonFactor(2, 16); - expect(res).assertEqual(2); - }); - - /** - * @tc.number: TEST_GET_DENOMINATOR_001 - * @tc.name : testGetDenominator001 - * @tc.desc : Obtains the denominator of the current RationalNumber object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetDenominator001", 0, function () { - let pro = util.RationalNumber.parseRationalNumber(2, 1); - let res = pro.getDenominator(); - expect(res).assertEqual(1); - }); - - /** - * @tc.number: TEST_GET_DENOMINATOR_002 - * @tc.name : testGetDenominator002 - * @tc.desc : Obtains the denominator of the current RationalNumber object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetDenominator002", 0, function () { - let pro = util.RationalNumber.parseRationalNumber(2, 3); - let res = pro.getDenominator(); - expect(res).assertEqual(3); - }); - - /** - * @tc.number: TEST_GET_DENOMINATOR_003 - * @tc.name : testGetDenominator003 - * @tc.desc : Obtains the denominator of the current RationalNumber object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetDenominator003", 0, function () { - let pro = util.RationalNumber.parseRationalNumber(2, 0); - let res = pro.getDenominator(); - expect(res).assertEqual(0); - }); - - /** - * @tc.number: TEST_GET_DENOMINATOR_004 - * @tc.name : testGetDenominator004 - * @tc.desc : Obtains the denominator of the current RationalNumber object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetDenominator004", 0, function () { - let pro = util.RationalNumber.parseRationalNumber(10, 5); - let res = pro.getDenominator(); - expect(res).assertEqual(1); - }); - - /** - * @tc.number: TEST_GET_DENOMINATOR_005 - * @tc.name : testGetDenominator005 - * @tc.desc : Obtains the denominator of the current RationalNumber object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetDenominator005", 0, function () { - let pro = util.RationalNumber.parseRationalNumber(6, 3); - let res = pro.getDenominator(); - expect(res).assertEqual(1); - }); - - /** - * @tc.number: TEST_GET_DENOMINATOR_006 - * @tc.name : testGetDenominator006 - * @tc.desc : Obtains the denominator of the current RationalNumber object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetDenominator006", 0, function () { - let pro = util.RationalNumber.parseRationalNumber(6, -3); - let res = pro.getDenominator(); - expect(res).assertEqual(1); - }); - - /** - * @tc.number: TEST_GET_NUMERATOR_001 - * @tc.name : testGetNumerator001 - * @tc.desc : Obtains the numerator of the current RationalNumber object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetNumerator001", 0, function () { - let pro = util.RationalNumber.parseRationalNumber(-2, 1); - let res = pro.getNumerator(); - expect(res).assertEqual(-2); - }); - - /** - * @tc.number: TEST_GET_NUMERATOR_002 - * @tc.name : testGetNumerator002 - * @tc.desc : Obtains the numerator of the current RationalNumber object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetNumerator002", 0, function () { - let pro = util.RationalNumber.parseRationalNumber(0, 3); - let res = pro.getNumerator(); - expect(res).assertEqual(0); - }); - - /** - * @tc.number: TEST_GET_NUMERATOR_003 - * @tc.name : testGetNumerator003 - * @tc.desc : Obtains the numerator of the current RationalNumber object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetNumerator003", 0, function () { - let pro = util.RationalNumber.parseRationalNumber(2, 4); - let res = pro.getNumerator(); - expect(res).assertEqual(1); - }); - - /** - * @tc.number: TEST_GET_NUMERATOR_004 - * @tc.name : testGetNumerator004 - * @tc.desc : Obtains the numerator of the current RationalNumber object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetNumerator004", 0, function () { - let pro = util.RationalNumber.parseRationalNumber(3, 6); - let res = pro.getNumerator(); - expect(res).assertEqual(1); - }); - - /** - * @tc.number: TEST_GET_NUMERATOR_005 - * @tc.name : testGetNumerator005 - * @tc.desc : Obtains the numerator of the current RationalNumber object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetNumerator005", 0, function () { - let pro = util.RationalNumber.parseRationalNumber(10, 5); - let res = pro.getNumerator(); - expect(res).assertEqual(2); - }); - - /** - * @tc.number: TEST_IS_FINITE_001 - * @tc.name : testIsFinite001 - * @tc.desc : Checks whether the current RationalNumber object represents a finite value. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsFinite001", 0, function () { - let pro = util.RationalNumber.parseRationalNumber(-2, 1); - let res = pro.isFinite(); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_FINITE_002 - * @tc.name : testIsFinite002 - * @tc.desc : Checks whether the current RationalNumber object represents a finite value. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsFinite002", 0, function () { - let pro = util.RationalNumber.parseRationalNumber(0, 3); - let res = pro.isFinite(); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_FINITE_003 - * @tc.name : testIsFinite003 - * @tc.desc : Checks whether the current RationalNumber object represents a finite value. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsFinite003", 0, function () { - let pro = util.RationalNumber.parseRationalNumber(2, 0); - let res = pro.isFinite(); - expect(res).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_FINITE_004 - * @tc.name : testIsFinite004 - * @tc.desc : Checks whether the current RationalNumber object represents a finite value. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsFinite004", 0, function () { - let pro = util.RationalNumber.parseRationalNumber(1, 3); - let res = pro.isFinite(); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_FINITE_005 - * @tc.name : testIsFinite005 - * @tc.desc : Checks whether the current RationalNumber object represents a finite value. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsFinite005", 0, function () { - let pro = util.RationalNumber.parseRationalNumber(10, 5); - let res = pro.isFinite(); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_NAN_001 - * @tc.name : testIsNaN001 - * @tc.desc : Checks whether the current RationalNumber object represents a finite value. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsNaN001", 0, function () { - let pro = util.RationalNumber.parseRationalNumber(-2, 1); - let res = pro.isNaN(); - expect(res).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_NAN_002 - * @tc.name : testIsNaN002 - * @tc.desc : Checks whether the current RationalNumber object represents a finite value. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsNaN002", 0, function () { - let pro = util.RationalNumber.parseRationalNumber(0, 3); - let res = pro.isNaN(); - expect(res).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_NAN_003 - * @tc.name : testIsNaN003 - * @tc.desc : Checks whether the current RationalNumber object represents a finite value. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsNaN003", 0, function () { - let pro = util.RationalNumber.parseRationalNumber(0, 0); - let res = pro.isNaN(); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_NAN_004 - * @tc.name : testIsNaN004 - * @tc.desc : Checks whether the current RationalNumber object represents a finite value. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsNaN004", 0, function () { - let pro = util.RationalNumber.parseRationalNumber(10, 0); - let res = pro.isNaN(); - expect(res).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_NAN_005 - * @tc.name : testIsNaN005 - * @tc.desc : Checks whether the current RationalNumber object represents a finite value. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsNaN005", 0, function () { - let pro = util.RationalNumber.parseRationalNumber(10, 1); - let res = pro.isNaN(); - expect(res).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_ZERO_001 - * @tc.name : testIsZero001 - * @tc.desc : Checks whether the current RationalNumber object represents the value 0. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsZero001", 0, function () { - let pro = util.RationalNumber.parseRationalNumber(-2, 1); - let res = pro.isZero(); - expect(res).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_ZERO_002 - * @tc.name : testIsZero002 - * @tc.desc : Checks whether the current RationalNumber object represents the value 0. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsZero002", 0, function () { - let pro = util.RationalNumber.parseRationalNumber(0, 3); - let res = pro.isZero(); - expect(res).assertEqual(true); - }); - - /** - * @tc.number: TEST_IS_ZERO_003 - * @tc.name : testIsZero003 - * @tc.desc : Checks whether the current RationalNumber object represents the value 0. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsZero003", 0, function () { - let pro = util.RationalNumber.parseRationalNumber(0, 0); - let res = pro.isZero(); - expect(res).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_ZERO_004 - * @tc.name : testIsZero004 - * @tc.desc : Checks whether the current RationalNumber object represents the value 0. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsZero004", 0, function () { - let pro = util.RationalNumber.parseRationalNumber(10, 2); - let res = pro.isZero(); - expect(res).assertEqual(false); - }); - - /** - * @tc.number: TEST_IS_ZERO_005 - * @tc.name : testIsZero005 - * @tc.desc : Checks whether the current RationalNumber object represents the value 0. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsZero005", 0, function () { - let pro = util.RationalNumber.parseRationalNumber(1, 1); - let res = pro.isZero(); - expect(res).assertEqual(false); - }); - - /** - * @tc.number: TEST_RATIONAL_NUMBER_TO_STRING_001 - * @tc.name : testRationalNumberToString001 - * @tc.desc : Obtains a string representation of the current RationalNumber object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testRationalNumberToString001", 0, function () { - let pro = util.RationalNumber.parseRationalNumber(-2, 1); - let res = pro.toString(); - expect(res).assertEqual("-2/1"); - }); - - /** - * @tc.number: TEST_RATIONAL_NUMBER_TO_STRING_002 - * @tc.name : testRationalNumberToString002 - * @tc.desc : Obtains a string representation of the current RationalNumber object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testRationalNumberToString002", 0, function () { - let pro = util.RationalNumber.parseRationalNumber(0, 0); - let res = pro.toString(); - expect(res).assertEqual("NaN"); - }); - - /** - * @tc.number: TEST_RATIONAL_NUMBER_TO_STRING_003 - * @tc.name : testRationalNumberToString003 - * @tc.desc : Obtains a string representation of the current RationalNumber object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testRationalNumberToString003", 0, function () { - let pro = util.RationalNumber.parseRationalNumber(3, 0); - let res = pro.toString(); - expect(res).assertEqual("Infinity"); - }); - - /** - * @tc.number: TEST_RATIONAL_NUMBER_TO_STRING_004 - * @tc.name : testRationalNumberToString004 - * @tc.desc : Obtains a string representation of the current RationalNumber object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testRationalNumberToString004", 0, function () { - let pro = util.RationalNumber.parseRationalNumber(-3, 0); - let res = pro.toString(); - expect(res).assertEqual("-Infinity"); - }); - - /** - * @tc.number: TEST_RATIONAL_NUMBER_TO_STRING_005 - * @tc.name : testRationalNumberToString005 - * @tc.desc : Obtains a string representation of the current RationalNumber object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testRationalNumberToString005", 0, function () { - let pro = util.RationalNumber.parseRationalNumber(2, 3); - let res = pro.toString(); - expect(res).assertEqual("2/3"); - }); - - /** - * @tc.number: TEST_LRU_CACHE_UPDATE_GET_CAPACITY_001 - * @tc.name : testLruCacheUpdateGetCapacity001 - * @tc.desc : Updates the buffer capacity to a specified capacity. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheUpdateGetCapacity001", 0, function () { - let that = new util.LRUCache(); - expect(that != null).assertTrue(); - that.updateCapacity(10); - let result = that.getCapacity(); - expect(result).assertEqual(10); - }); - - /** - * @tc.number: TEST_LRU_CACHE_UPDATE_GET_CAPACITY_002 - * @tc.name : testLruCacheUpdateGetCapacity002 - * @tc.desc : Updates the buffer capacity to a specified capacity. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheUpdateGetCapacity002", 0, function () { - let that = new util.LRUCache(); - expect(that != null).assertTrue(); - that.updateCapacity(2147483646); - let result = that.getCapacity(); - expect(result).assertEqual(2147483646); - }); - - /** - * @tc.number: TEST_LRU_CACHE_UPDATE_GET_CAPACITY_003 - * @tc.name : testLruCacheUpdateGetCapacity003 - * @tc.desc : Updates the buffer capacity to a specified capacity. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheUpdateGetCapacity003", 0, function () { - let that = new util.LRUCache(100); - expect(that != null).assertTrue(); - that.updateCapacity(20); - let result = that.getCapacity(); - expect(result).assertEqual(20); - }); - - /** - * @tc.number: TEST_LRU_CACHE_UPDATE_GET_CAPACITY_004 - * @tc.name : testLruCacheUpdateGetCapacity004 - * @tc.desc : Updates the buffer capacity to a specified capacity. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheUpdateGetCapacity004", 0, function () { - let that = new util.LRUCache(50); - expect(that != null).assertTrue(); - that.updateCapacity(2); - let result = that.getCapacity(); - expect(result).assertEqual(2); - }); - - /** - * @tc.number: TEST_LRU_CACHE_UPDATE_GET_CAPACITY_005 - * @tc.name : testLruCacheUpdateGetCapacity005 - * @tc.desc : Updates the buffer capacity to a specified capacity. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheUpdateGetCapacity005", 0, function () { - let that = new util.LRUCache(200); - expect(that != null).assertTrue(); - that.updateCapacity(100); - let result = that.getCapacity(); - expect(result).assertEqual(100); - }); - - /** - * @tc.number: TEST_LRU_CACHE_TO_STRING_001 - * @tc.name : testLruCacheToString001 - * @tc.desc : Returns a string representation of the object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheToString001", 0, function () { - let that = new util.LRUCache(); - that.put("1111", "bcjdshc"); - that.put(1, 2); - let result = that.toString(); - expect(result).assertEqual("LRUCache[ maxSize = 64, hits = 0, misses = 0, hitRate = 0% ]"); - }); - - /** - * @tc.number: TEST_LRU_CACHE_TO_STRING_002 - * @tc.name : testLruCacheToString002 - * @tc.desc : Returns a string representation of the object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheToString002", 0, function () { - let that = new util.LRUCache(); - that.put("1111", "bcjdshc"); - that.put(1, 2); - that.get(1); - that.get("1111"); - let result = that.toString(); - expect(result).assertEqual("LRUCache[ maxSize = 64, hits = 2, misses = 0, hitRate = 100% ]"); - }); - - /** - * @tc.number: TEST_LRU_CACHE_TO_STRING_003 - * @tc.name : testLruCacheToString003 - * @tc.desc : Returns a string representation of the object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheToString003", 0, function () { - let that = new util.LRUCache(100); - that.put(1, 2); - that.put(3, 10); - that.put(5, 15); - that.put("abc", 20); - that.get(3); - let result = that.toString(); - expect(result).assertEqual("LRUCache[ maxSize = 100, hits = 1, misses = 0, hitRate = 100% ]"); - }); - - /** - * @tc.number: TEST_LRU_CACHE_TO_STRING_004 - * @tc.name : testLruCacheToString004 - * @tc.desc : Returns a string representation of the object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheToString004", 0, function () { - let that = new util.LRUCache(100); - that.put(1, 2); - that.put(3, 10); - that.put(5, 15); - that.put("abc", 20); - that.get(3); - that.get(2); - let result = that.toString(); - expect(result).assertEqual("LRUCache[ maxSize = 100, hits = 1, misses = 1, hitRate = 50% ]"); - }); - - /** - * @tc.number: TEST_LRU_CACHE_TO_STRING_005 - * @tc.name : testLruCacheToString005 - * @tc.desc : Returns a string representation of the object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheToString005", 0, function () { - let that = new util.LRUCache(100); - that.put(1, 2); - that.put(3, 10); - that.put(5, 15); - that.put("abc", 20); - that.get(3); - that.get(2); - that.get(1); - that.contains(5); - let result = that.toString(); - expect(result).assertEqual("LRUCache[ maxSize = 100, hits = 3, misses = 1, hitRate = 75% ]"); - }); - - /** - * @tc.number: TEST_LRU_CACHE_LENGTH_001 - * @tc.name : testLruCacheLength001 - * @tc.desc : Obtains the total number of values in the current buffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheLength001", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - let result = that.length; - expect(result).assertEqual(1); - }); - - /** - * @tc.number: TEST_LRU_CACHE_GET_CAPACITY_001 - * @tc.name : testLruCacheGetCapacity001 - * @tc.desc : Obtains the capacity of the current buffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheGetCapacity001", 0, function () { - let that = new util.LRUCache(); - let result = that.getCapacity(); - expect(result).assertEqual(64); - }); - - /** - * @tc.number: TEST_LRU_CACHE_GET_CAPACITY_002 - * @tc.name : testLruCacheGetCapacity002 - * @tc.desc : Obtains the capacity of the current buffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheGetCapacity002", 0, function () { - let that = new util.LRUCache(2); - let result = that.getCapacity(); - expect(result).assertEqual(2); - }); - - /** - * @tc.number: TEST_LRU_CACHE_GET_CAPACITY_003 - * @tc.name : testLruCacheGetCapacity003 - * @tc.desc : Obtains the capacity of the current buffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheGetCapacity003", 0, function () { - let that = new util.LRUCache(100); - let result = that.getCapacity(); - expect(result).assertEqual(100); - }); - - /** - * @tc.number: TEST_LRU_CACHE_GET_CAPACITY_004 - * @tc.name : testLruCacheGetCapacity004 - * @tc.desc : Obtains the capacity of the current buffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheGetCapacity004", 0, function () { - let that = new util.LRUCache(); - that.updateCapacity(50); - let result = that.getCapacity(); - expect(result).assertEqual(50); - }); - - /** - * @tc.number: TEST_LRU_CACHE_GET_CAPACITY_005 - * @tc.name : testLruCacheGetCapacity005 - * @tc.desc : Obtains the capacity of the current buffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheGetCapacity005", 0, function () { - let that = new util.LRUCache(100); - that.updateCapacity(10); - let result = that.getCapacity(); - expect(result).assertEqual(10); - }); - - /** - * @tc.number: TEST_LRU_CACHE_CLEAR_001 - * @tc.name : testLruCacheClear001 - * @tc.desc : Clears key-value pairs from the current buffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheClear001", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - let result1 = that.length; - that.clear(); - let result2 = that.length; - expect(result1).assertEqual(1); - expect(result2).assertEqual(0); - }); - - /** - * @tc.number: TEST_LRU_CACHE_CLEAR_002 - * @tc.name : testLruCacheClear002 - * @tc.desc : Clears key-value pairs from the current buffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheClear002", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - that.put(2, 10); - that.put(5, 33); - that.put(25, 35); - let result1 = that.length; - that.clear(); - let result2 = that.length; - expect(result1).assertEqual(4); - expect(result2).assertEqual(0); - }); - - /** - * @tc.number: TEST_LRU_CACHE_CLEAR_003 - * @tc.name : testLruCacheClear003 - * @tc.desc : Clears key-value pairs from the current buffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheClear003", 0, function () { - let that = new util.LRUCache(); - that.put("abc", 2); - that.put(2, "abc"); - that.put("ancd", "abcd"); - that.put(10, 35); - let result1 = that.length; - that.clear(); - let result2 = that.length; - expect(result1).assertEqual(4); - expect(result2).assertEqual(0); - }); - - /** - * @tc.number: TEST_LRU_CACHE_CLEAR_004 - * @tc.name : testLruCacheClear004 - * @tc.desc : Clears key-value pairs from the current buffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheClear004", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - that.put(2, 10); - that.put(5, 33); - that.updateCapacity(3); - let result1 = that.length; - that.clear(); - let result2 = that.length; - expect(result1).assertEqual(3); - expect(result2).assertEqual(0); - }); - - /** - * @tc.number: TEST_LRU_CACHE_CLEAR_005 - * @tc.name : testLruCacheClear005 - * @tc.desc : Clears key-value pairs from the current buffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheClear005", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - that.put(2, 10); - that.put(5, 33); - that.put("abcd", "string"); - that.updateCapacity(2); - let result1 = that.length; - that.clear(); - let result2 = that.length; - expect(result1).assertEqual(2); - expect(result2).assertEqual(0); - }); - - /** - * @tc.number: TEST_LRU_CACHE_GET_CREATE_COUNT_001 - * @tc.name : testLruCacheGetCreateCount001 - * @tc.desc : Obtains the number of times createDefault(Object) returned a value. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheGetCreateCount001", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - that.put(2, 10); - that.put("abcd", 15); - that.get(3); - that.get(5); - that.get(10); - let result = that.getCreateCount(); - expect(result).assertEqual(0); - }); - - /** - * @tc.number: TEST_LRU_CACHE_GET_CREATE_COUNT_002 - * @tc.name : testLruCacheGetCreateCount002 - * @tc.desc : Obtains the number of times createDefault(Object) returned a value. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheGetCreateCount002", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - that.put(2, 10); - that.put("abcd", 15); - that.get(6); - that.get(8); - that.get(20); - let result = that.getCreateCount(); - expect(result).assertEqual(0); - }); - - /** - * @tc.number: TEST_LRU_CACHE_GET_CREATE_COUNT_003 - * @tc.name : testLruCacheGetCreateCount003 - * @tc.desc : Obtains the number of times createDefault(Object) returned a value. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheGetCreateCount003", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - that.put(2, 10); - that.get("abc"); - that.get("cndk"); - let result = that.getCreateCount(); - expect(result).assertEqual(0); - }); - - /** - * @tc.number: TEST_LRU_CACHE_GET_CREATE_COUNT_004 - * @tc.name : testLruCacheGetCreateCount004 - * @tc.desc : Obtains the number of times createDefault(Object) returned a value. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheGetCreateCount004", 0, function () { - let that = new util.LRUCache(); - that.put(5, 2); - that.put(10, 10); - that.put("abcd", "abcd"); - that.get(5); - that.get(20); - that.get(12); - let result = that.getCreateCount(); - expect(result).assertEqual(0); - }); - - /** - * @tc.number: TEST_LRU_CACHE_GET_CREATE_COUNT_005 - * @tc.name : testLruCacheGetCreateCount005 - * @tc.desc : Obtains the number of times createDefault(Object) returned a value. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheGetCreateCount005", 0, function () { - let that = new util.LRUCache(); - that.put("xsjk", "bcjds"); - that.put("ajc", 10); - that.put("abcd", 15); - that.get(2); - that.get(10); - that.get(30); - let result = that.getCreateCount(); - expect(result).assertEqual(0); - }); - - /** - * @tc.number: TEST_LRU_CACHE_GET_MISS_COUNT_001 - * @tc.name : testLruCacheGetMissCount001 - * @tc.desc : Obtains the number of times that the queried values are not matched. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheGetMissCount001", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - that.put(2, 10); - that.put("abcd", 15); - that.get(3); - that.get(5); - that.get(10); - let result = that.getMissCount(); - expect(result).assertEqual(3); - }); - - /** - * @tc.number: TEST_LRU_CACHE_GET_MISS_COUNT_002 - * @tc.name : testLruCacheGetMissCount002 - * @tc.desc : Obtains the number of times that the queried values are not matched. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheGetMissCount002", 0, function () { - let that = new util.LRUCache(); - that.put(5, 2); - that.put(1, 10); - that.put("abcd", "bcjsc"); - that.get(2); - that.get(10); - that.get(15); - let result = that.getMissCount(); - expect(result).assertEqual(3); - }); - - /** - * @tc.number: TEST_LRU_CACHE_GET_MISS_COUNT_003 - * @tc.name : testLruCacheGetMissCount003 - * @tc.desc : Obtains the number of times that the queried values are not matched. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheGetMissCount003", 0, function () { - let that = new util.LRUCache(); - that.put(10, 10); - that.put(3, 20); - that.put(12, 16); - that.get(1); - that.get(2); - that.get(6); - let result = that.getMissCount(); - expect(result).assertEqual(3); - }); - - /** - * @tc.number: TEST_LRU_CACHE_GET_MISS_COUNT_004 - * @tc.name : testLruCacheGetMissCount004 - * @tc.desc : Obtains the number of times that the queried values are not matched. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheGetMissCount004", 0, function () { - let that = new util.LRUCache(); - that.put("acb", "asdc"); - that.put("vfb", 1); - that.put("abcd", "abcd"); - that.get(3); - that.get(5); - that.get(10); - let result = that.getMissCount(); - expect(result).assertEqual(3); - }); - - /** - * @tc.number: TEST_LRU_CACHE_GET_MISS_COUNT_005 - * @tc.name : testLruCacheGetMissCount005 - * @tc.desc : Obtains the number of times that the queried values are not matched. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheGetMissCount005", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - that.put(2, 10); - that.put("abcd", 15); - that.get(3); - that.get(5); - that.get(10); - that.contains(2); - that.contains(6); - let result = that.getMissCount(); - expect(result).assertEqual(4); - }); - - /** - * @tc.number: TEST_LRU_CACHE_GET_MISS_COUNT_006 - * @tc.name : testLruCacheGetMissCount006 - * @tc.desc : Obtains the number of times that the queried values are not matched. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheGetMissCount006", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - that.put(2, 10); - that.put("abcd", 15); - that.get(1); - that.get(2); - that.get("abcd"); - let result = that.getMissCount(); - expect(result).assertEqual(0); - }); - - /** - * @tc.number: TEST_LRU_CACHE_GET_REMOVAL_COUNT_001 - * @tc.name : testLruCacheGetRemovalCount001 - * @tc.desc : Obtains the number of times that values are evicted from the buffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheGetRemovalCount001", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - that.put(2, 10); - that.put("abcd", 15); - that.put(3, 20); - that.put(5, 30); - let result = that.getRemovalCount(); - expect(result).assertEqual(0); - }); - - /** - * @tc.number: TEST_LRU_CACHE_GET_REMOVAL_COUNT_002 - * @tc.name : testLruCacheGetRemovalCount002 - * @tc.desc : Obtains the number of times that values are evicted from the buffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheGetRemovalCount002", 0, function () { - let that = new util.LRUCache(); - that.put(10, 2); - that.put(3, 2); - that.put(15, 15); - that.put(1, 20); - let result = that.getRemovalCount(); - expect(result).assertEqual(0); - }); - - /** - * @tc.number: TEST_LRU_CACHE_GET_REMOVAL_COUNT_003 - * @tc.name : testLruCacheGetRemovalCount003 - * @tc.desc : Obtains the number of times that values are evicted from the buffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheGetRemovalCount003", 0, function () { - let that = new util.LRUCache(); - that.put("abc", 2); - that.put("abcd", "abcd"); - that.put(3, 2); - let result = that.getRemovalCount(); - expect(result).assertEqual(0); - }); - - /** - * @tc.number: TEST_LRU_CACHE_GET_REMOVAL_COUNT_004 - * @tc.name : testLruCacheGetRemovalCount004 - * @tc.desc : Obtains the number of times that values are evicted from the buffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheGetRemovalCount004", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - that.put(2, 10); - that.put("abcd", 15); - that.updateCapacity(2); - that.put(3, 20); - that.put(5, 30); - let result = that.getRemovalCount(); - expect(result).assertEqual(3); - }); - - /** - * @tc.number: TEST_LRU_CACHE_GET_REMOVAL_COUNT_005 - * @tc.name : testLruCacheGetRemovalCount005 - * @tc.desc : Obtains the number of times that values are evicted from the buffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheGetRemovalCount005", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - that.put(2, 10); - that.put("abcd", 15); - that.updateCapacity(3); - that.put("string", 20); - that.put("abc", 30); - that.put(10, 20); - let result = that.getRemovalCount(); - expect(result).assertEqual(3); - }); - - /** - * @tc.number: TEST_LRU_CACHE_GET_MATCH_COUNT_001 - * @tc.name : testLruCacheGetMatchCount001 - * @tc.desc : Obtains the number of times that the queried values are successfully matched. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheGetMatchCount001", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - that.put(2, 10); - that.put("abcd", 15); - that.get(1); - that.get(2); - that.get("abcd"); - let result = that.getMatchCount(); - expect(result).assertEqual(3); - }); - - /** - * @tc.number: TEST_LRU_CACHE_GET_MATCH_COUNT_002 - * @tc.name : testLruCacheGetMatchCount002 - * @tc.desc : Obtains the number of times that the queried values are successfully matched. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheGetMatchCount002", 0, function () { - let that = new util.LRUCache(); - that.put(10, 2); - that.put(2, 1); - that.put("abcd", 15); - that.get(10); - that.get(2); - that.get("abcd"); - that.get("string"); - let result = that.getMatchCount(); - expect(result).assertEqual(3); - }); - - /** - * @tc.number: TEST_LRU_CACHE_GET_MATCH_COUNT_003 - * @tc.name : testLruCacheGetMatchCount003 - * @tc.desc : Obtains the number of times that the queried values are successfully matched. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheGetMatchCount003", 0, function () { - let that = new util.LRUCache(); - that.put(0, 1); - that.put(30, 10); - that.put("abcd", 15); - that.get(0); - that.get(30); - that.get("abcd"); - let result = that.getMatchCount(); - expect(result).assertEqual(3); - }); - - /** - * @tc.number: TEST_LRU_CACHE_GET_MATCH_COUNT_004 - * @tc.name : testLruCacheGetMatchCount004 - * @tc.desc : Obtains the number of times that the queried values are successfully matched. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheGetMatchCount004", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - that.put(2, 10); - that.put("abcd", 15); - that.get(1); - that.get(2); - that.get("abcd"); - that.contains(2); - that.contains("abcd"); - that.contains(20); - let result = that.getMatchCount(); - expect(result).assertEqual(5); - }); - - /** - * @tc.number: TEST_LRU_CACHE_GET_MATCH_COUNT_005 - * @tc.name : testLruCacheGetMatchCount005 - * @tc.desc : Obtains the number of times that the queried values are successfully matched. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheGetMatchCount005", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - that.put(2, 10); - that.put("abcd", 15); - that.put("string", "string"); - that.get(1); - that.get(2); - that.get("abcd"); - that.get("string"); - that.contains(2); - that.contains("abcd"); - that.contains("string"); - that.contains(10); - let result = that.getMatchCount(); - expect(result).assertEqual(7); - }); - - /** - * @tc.number: TEST_LRU_CACHE_GET_MATCH_COUNT_006 - * @tc.name : testLruCacheGetMatchCount006 - * @tc.desc : Obtains the number of times that the queried values are successfully matched. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheGetMatchCount006", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - that.put(2, 10); - that.put("abcd", 15); - that.get(5); - let result = that.getMatchCount(); - expect(result).assertEqual(0); - }); - - /** - * @tc.number: TEST_LRU_CACHE_GET_PUT_COUNT_001 - * @tc.name : testLruCacheGetPutCount001 - * @tc.desc : Obtains the number of times that values are added to the buffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheGetPutCount001", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - let result = that.getPutCount(); - expect(result).assertEqual(1); - }); - - /** - * @tc.number: TEST_LRU_CACHE_GET_PUT_COUNT_002 - * @tc.name : testLruCacheGetPutCount002 - * @tc.desc : Obtains the number of times that values are added to the buffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheGetPutCount002", 0, function () { - let that = new util.LRUCache(); - that.put(5, 3); - that.put(2, 10); - let result = that.getPutCount(); - expect(result).assertEqual(2); - }); - - /** - * @tc.number: TEST_LRU_CACHE_GET_PUT_COUNT_003 - * @tc.name : testLruCacheGetPutCount003 - * @tc.desc : Obtains the number of times that values are added to the buffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheGetPutCount003", 0, function () { - let that = new util.LRUCache(); - that.put("string", 2); - that.put("abcd", 1); - that.put("ab", "a"); - let result = that.getPutCount(); - expect(result).assertEqual(3); - }); - - /** - * @tc.number: TEST_LRU_CACHE_GET_PUT_COUNT_004 - * @tc.name : testLruCacheGetPutCount004 - * @tc.desc : Obtains the number of times that values are added to the buffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheGetPutCount004", 0, function () { - let that = new util.LRUCache(); - that.put("string", "string"); - that.put("ac", "abc"); - that.put("abcd", 15); - let result = that.getPutCount(); - expect(result).assertEqual(3); - }); - - /** - * @tc.number: TEST_LRU_CACHE_GET_PUT_COUNT_005 - * @tc.name : testLruCacheGetPutCount005 - * @tc.desc : Obtains the number of times that values are added to the buffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheGetPutCount005", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - that.put(2, 10); - that.updateCapacity(2); - that.put("abcd", "abc"); - let result = that.getPutCount(); - expect(result).assertEqual(3); - }); - - /** - * @tc.number: TEST_LRU_CACHE_IS_EMPTY_001 - * @tc.name : testLruCacheIsEmpty001 - * @tc.desc : Checks whether the current buffer is empty. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheIsEmpty001", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - let result = that.isEmpty(); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_LRU_CACHE_IS_EMPTY_002 - * @tc.name : testLruCacheIsEmpty002 - * @tc.desc : Checks whether the current buffer is empty. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheIsEmpty002", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - that.put(2, 10); - let result = that.isEmpty(); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_LRU_CACHE_IS_EMPTY_003 - * @tc.name : testLruCacheIsEmpty003 - * @tc.desc : Checks whether the current buffer is empty. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheIsEmpty003", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - that.put(2, 10); - that.put(5, 33); - let result = that.isEmpty(); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_LRU_CACHE_IS_EMPTY_004 - * @tc.name : testLruCacheIsEmpty004 - * @tc.desc : Checks whether the current buffer is empty. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheIsEmpty004", 0, function () { - let that = new util.LRUCache(); - that.put("abc", 2); - that.put("string", 10); - that.put("ab", "abc"); - let result = that.isEmpty(); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_LRU_CACHE_IS_EMPTY_005 - * @tc.name : testLruCacheIsEmpty005 - * @tc.desc : Checks whether the current buffer is empty. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheIsEmpty005", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - that.put(2, 10); - that.put(5, 33); - that.clear(); - let result = that.isEmpty(); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_LRU_CACHE_GET_001 - * @tc.name : testLruCacheGet001 - * @tc.desc : Obtains the value associated with a specified key. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheGet001", 0, function () { - let that = new util.LRUCache(100); - that.put(1, 2); - let result = that.get(1); - expect(result).assertEqual(2); - }); - - /** - * @tc.number: TEST_LRU_CACHE_GET_002 - * @tc.name : testLruCacheGet002 - * @tc.desc : Obtains the value associated with a specified key. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheGet002", 0, function () { - let that = new util.LRUCache(100); - that.put(1, 2); - let result = that.get(5); - expect(result).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_LRU_CACHE_GET_003 - * @tc.name : testLruCacheGet003 - * @tc.desc : Obtains the value associated with a specified key. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheGet003", 0, function () { - let that = new util.LRUCache(100); - that.put(1, 2); - that.put(2, 10); - that.put("abcd", 15); - let result1 = that.get(20); - let result2 = that.get("abcd"); - let result3 = that.get(2); - expect(result1).assertEqual(undefined); - expect(result2).assertEqual(15); - expect(result3).assertEqual(10); - }); - - /** - * @tc.number: TEST_LRU_CACHE_GET_004 - * @tc.name : testLruCacheGet004 - * @tc.desc : Obtains the value associated with a specified key. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheGet004", 0, function () { - let that = new util.LRUCache(); - that.put("1111", "bcjdshc"); - that.put(20, "cdjcaxb"); - that.put("abcd", 15); - let result1 = that.get("1111"); - let result2 = that.get(20); - let result3 = that.get("abcd"); - let result4 = that.get(25); - expect(result1).assertEqual("bcjdshc"); - expect(result2).assertEqual("cdjcaxb"); - expect(result3).assertEqual(15); - expect(result4).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_LRU_CACHE_GET_005 - * @tc.name : testLruCacheGet005 - * @tc.desc : Obtains the value associated with a specified key. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheGet005", 0, function () { - let that = new util.LRUCache(); - that.put("1111", "bcjdshc"); - that.put(20, "cdjcaxb"); - that.updateCapacity(2); - that.put("abcd", 15); - let result1 = that.get("1111"); - let result2 = that.get(20); - let result3 = that.get("abcd"); - let result4 = that.get(25); - expect(result1).assertEqual(undefined); - expect(result2).assertEqual("cdjcaxb"); - expect(result3).assertEqual(15); - expect(result4).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_LRU_CACHE_GET_005 - * @tc.name : testLruCacheGet005 - * @tc.desc : Obtains the value associated with a specified key. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheGet006", 0, function () { - let that = new util.LRUCache(); - let un = undefined; - that.put(20, "cdjcaxb"); - try { - let result1 = that.get(un); - expect(0).assertEqual(1); - } catch (e) { - expect(e.toString()).assertEqual("BusinessError: Parameter error.The type of undefined must be Object"); - expect(e.code).assertEqual(401); - expect(e.message).assertEqual("Parameter error.The type of undefined must be Object"); - } - }); - - /** - * @tc.number: TEST_LRU_CACHE_PUT_001 - * @tc.name : testLruCachePut001 - * @tc.desc : Adds a key-value pair to the buffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCachePut001", 0, function () { - let that = new util.LRUCache(); - let temp = that.put("1111", "bcjdshc"); - expect(temp).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_LRU_CACHE_PUT_002 - * @tc.name : testLruCachePut002 - * @tc.desc : Adds a key-value pair to the buffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCachePut002", 0, function () { - let that = new util.LRUCache(); - let temp1 = that.put("1111", "bcjdshc"); - let temp2 = that.put("1111", 13); - expect(temp2).assertEqual("bcjdshc"); - }); - - /** - * @tc.number: TEST_LRU_CACHE_PUT_003 - * @tc.name : testLruCachePut003 - * @tc.desc : Adds a key-value pair to the buffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCachePut003", 0, function () { - let that = new util.LRUCache(); - let temp = that.put("1111", "bcjdshc"); - let temp1 = that.put(1, 12); - let temp2 = that.put(2, 5); - let temp3 = that.put(2, "adasfdad"); - let temp4 = that.put("abc", 10); - expect(temp1).assertEqual(undefined); - expect(temp2).assertEqual(undefined); - expect(temp3).assertEqual(5); - expect(temp4).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_LRU_CACHE_PUT_004 - * @tc.name : testLruCachePut004 - * @tc.desc : Adds a key-value pair to the buffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCachePut004", 0, function () { - let that = new util.LRUCache(); - let temp = that.put("1111", "bcjdshc"); - let temp1 = that.put(1, 12); - let temp2 = that.put(2, 5); - that.updateCapacity(2); - let temp3 = that.put(2, "adasfdad"); - let temp4 = that.put("1111", 10); - expect(temp).assertEqual(undefined); - expect(temp1).assertEqual(undefined); - expect(temp2).assertEqual(undefined); - expect(temp3).assertEqual(5); - expect(temp4).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_LRU_CACHE_PUT_005 - * @tc.name : testLruCachePut005 - * @tc.desc : Adds a key-value pair to the buffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCachePut005", 0, function () { - let that = new util.LRUCache(); - let temp = that.put("1111", "bcjdshc"); - let temp1 = that.put(1, 12); - let temp2 = that.put(2, 5); - let temp3 = that.put(1, 10); - let temp4 = that.put(2, 22); - let temp5 = that.put(2, 30); - expect(temp).assertEqual(undefined); - expect(temp1).assertEqual(undefined); - expect(temp2).assertEqual(undefined); - expect(temp3).assertEqual(12); - expect(temp4).assertEqual(5); - expect(temp5).assertEqual(22); - }); - - /** - * @tc.number: TEST_LRU_CACHE_PUT_006 - * @tc.name : testLruCachePut006 - * @tc.desc : Adds a key-value pair to the buffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCachePut006", 0, function () { - let that = new util.LRUCache(); - let un = undefined; - try { - that.put(un, "bcjdshc"); - expect(0).assertEqual(1); - } catch (e) { - expect(e.toString()).assertEqual("BusinessError: Parameter error.The type of undefined must be Object"); - expect(e.code).assertEqual(401); - expect(e.message).assertEqual("Parameter error.The type of undefined must be Object"); - } - }); - - /** - * @tc.number: TEST_LRU_CACHE_VALUES_001 - * @tc.name : testLruCacheValues001 - * @tc.desc : Obtains a list of all values in the current buffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheValues001", 0, function () { - let that = new util.LRUCache(); - that.put("string", "abc"); - let result = that.values(); - expect(result[0]).assertEqual("abc"); - }); - - /** - * @tc.number: TEST_LRU_CACHE_VALUES_002 - * @tc.name : testLruCacheValues002 - * @tc.desc : Obtains a list of all values in the current buffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheValues002", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - that.put(3, 10); - that.put(5, 15); - that.put("abc", 20); - let result = that.values(); - expect(result[0]).assertEqual(2); - expect(result[1]).assertEqual(10); - expect(result[2]).assertEqual(15); - expect(result[3]).assertEqual(20); - }); - - /** - * @tc.number: TEST_LRU_CACHE_VALUES_003 - * @tc.name : testLruCacheValues003 - * @tc.desc : Obtains a list of all values in the current buffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheValues003", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - that.put(3, 10); - that.put(5, 15); - that.put("abc", 20); - that.get(3); - let result = that.values(); - expect(result[0]).assertEqual(2); - expect(result[1]).assertEqual(15); - expect(result[2]).assertEqual(20); - expect(result[3]).assertEqual(10); - }); - - /** - * @tc.number: TEST_LRU_CACHE_VALUES_004 - * @tc.name : testLruCacheValues004 - * @tc.desc : Obtains a list of all values in the current buffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheValues004", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - that.put(3, 10); - that.put(5, 15); - that.put("abc", 20); - that.get(3); - that.contains(1); - let result = that.values(); - expect(result[0]).assertEqual(15); - expect(result[1]).assertEqual(20); - expect(result[2]).assertEqual(10); - expect(result[3]).assertEqual(2); - }); - - /** - * @tc.number: TEST_LRU_CACHE_VALUES_005 - * @tc.name : testLruCacheValues005 - * @tc.desc : Obtains a list of all values in the current buffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheValues005", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - that.put(3, 10); - that.put(5, 15); - that.put("abc", 20); - that.get(3); - that.remove(5); - that.contains(3); - that.get(1); - that.contains("abc"); - let result = that.values(); - expect(result[0]).assertEqual(10); - expect(result[1]).assertEqual(2); - expect(result[2]).assertEqual(20); - }); - - /** - * @tc.number: TEST_LRU_CACHE_KEYS_001 - * @tc.name : testLruCacheKeys001 - * @tc.desc : Obtains a list of keys for the values in the current buffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheKeys001", 0, function () { - let that = new util.LRUCache(); - that.put("string", "abc"); - let result = that.keys(); - expect(result[0]).assertEqual("string"); - }); - - /** - * @tc.number: TEST_LRU_CACHE_KEYS_002 - * @tc.name : testLruCacheKeys002 - * @tc.desc : Obtains a list of keys for the values in the current buffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheKeys002", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - that.put(3, 10); - that.put(5, 15); - that.put("abc", 20); - let result = that.keys(); - expect(result[0]).assertEqual(1); - expect(result[1]).assertEqual(3); - expect(result[2]).assertEqual(5); - expect(result[3]).assertEqual("abc"); - }); - - /** - * @tc.number: TEST_LRU_CACHE_KEYS_003 - * @tc.name : testLruCacheKeys003 - * @tc.desc : Obtains a list of keys for the values in the current buffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheKeys003", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - that.put(3, 10); - that.put(5, 15); - that.put("abc", 20); - that.get(3); - let result = that.keys(); - expect(result[0]).assertEqual(1); - expect(result[1]).assertEqual(5); - expect(result[2]).assertEqual("abc"); - expect(result[3]).assertEqual(3); - }); - - /** - * @tc.number: TEST_LRU_CACHE_KEYS_004 - * @tc.name : testLruCacheKeys004 - * @tc.desc : Obtains a list of keys for the values in the current buffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheKeys004", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - that.put(3, 10); - that.put(5, 15); - that.put("abc", 20); - that.get(3); - that.contains(1); - let result = that.keys(); - expect(result[0]).assertEqual(5); - expect(result[1]).assertEqual("abc"); - expect(result[2]).assertEqual(3); - expect(result[3]).assertEqual(1); - }); - - /** - * @tc.number: TEST_LRU_CACHE_KEYS_005 - * @tc.name : testLruCacheKeys005 - * @tc.desc : Obtains a list of keys for the values in the current buffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheKeys005", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - that.put(3, 10); - that.put(5, 15); - that.put("abc", 20); - that.get(3); - that.remove(5); - that.contains(3); - that.get(1); - that.contains("abc"); - let result = that.keys(); - expect(result[0]).assertEqual(3); - expect(result[1]).assertEqual(1); - expect(result[2]).assertEqual("abc"); - }); - - /** - * @tc.number: TEST_LRU_CACHE_REMOVE_001 - * @tc.name : testLruCacheRemove001 - * @tc.desc : Deletes a specified key and its associated value from the current buffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheRemove001", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - let result = that.remove(1); - expect(result).assertEqual(2); - }); - - /** - * @tc.number: TEST_LRU_CACHE_REMOVE_002 - * @tc.name : testLruCacheRemove002 - * @tc.desc : Deletes a specified key and its associated value from the current buffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheRemove002", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - that.put("abcd", 20); - let result1 = that.remove(1); - let result2 = that.remove("abcd"); - expect(result1).assertEqual(2); - expect(result2).assertEqual(20); - }); - - /** - * @tc.number: TEST_LRU_CACHE_REMOVE_003 - * @tc.name : testLruCacheRemove003 - * @tc.desc : Deletes a specified key and its associated value from the current buffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheRemove003", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - let result1 = that.remove(1); - let result2 = that.remove(5); - expect(result1).assertEqual(2); - expect(result2).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_LRU_CACHE_REMOVE_004 - * @tc.name : testLruCacheRemove004 - * @tc.desc : Deletes a specified key and its associated value from the current buffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheRemove004", 0, function () { - let that = new util.LRUCache(); - that.put(0, "abc"); - that.put("abcd", 20); - let result1 = that.remove(1); - let result2 = that.remove("abcd"); - expect(result1).assertEqual(undefined); - expect(result2).assertEqual(20); - }); - - /** - * @tc.number: TEST_LRU_CACHE_REMOVE_005 - * @tc.name : testLruCacheRemove005 - * @tc.desc : Deletes a specified key and its associated value from the current buffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheRemove005", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - that.put(3, 10); - that.put(5, 15); - let result1 = that.remove(1); - let result2 = that.remove(3); - let result3 = that.get(3); - expect(result1).assertEqual(2); - expect(result2).assertEqual(10); - expect(result3).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_LRU_CACHE_REMOVE_006 - * @tc.name : testLruCacheRemove006 - * @tc.desc : Deletes a specified key and its associated value from the current buffer. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheRemove006", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - let un = undefined; - try { - that.remove(un); - expect(0).assertEqual(1); - } catch (e) { - expect(e.toString()).assertEqual("BusinessError: Parameter error.The type of undefined must be Object"); - expect(e.code).assertEqual(401); - expect(e.message).assertEqual("Parameter error.The type of undefined must be Object"); - } - }); - - /** - * @tc.number: TEST_LRU_CACHE_AFTER_REMOVAL_001 - * @tc.name : testLruCacheAfterRemoval001 - * @tc.desc : Executes subsequent operations after a value is deleted. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheAfterRemoval001", 0, function () { - let arr = []; - class ChildLRUCache extends util.LRUCache { - constructor() { - super(); - } - afterRemoval(isEvict, key, value, newValue) { - if (isEvict === false) { - arr = [key, value, newValue]; - } - } - } - let lru = new ChildLRUCache(); - lru.afterRemoval(false, 10, 30, null); - expect(arr[0]).assertEqual(10); - }); - - /** - * @tc.number: TEST_LRU_CACHE_AFTER_REMOVAL_002 - * @tc.name : testLruCacheAfterRemoval002 - * @tc.desc : Executes subsequent operations after a value is deleted. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheAfterRemoval002", 0, function () { - let arr = []; - class ChildLRUCache extends util.LRUCache { - constructor() { - super(); - } - afterRemoval(isEvict, key, value, newValue) { - if (isEvict === false) { - arr = [key, value, newValue]; - } - } - } - let lru = new ChildLRUCache(); - lru.afterRemoval(false, "string", 10, null); - expect(arr[0]).assertEqual("string"); - }); - - /** - * @tc.number: TEST_LRU_CACHE_AFTER_REMOVAL_003 - * @tc.name : testLruCacheAfterRemoval003 - * @tc.desc : Executes subsequent operations after a value is deleted. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheAfterRemoval003", 0, function () { - let arr = []; - class ChildLRUCache extends util.LRUCache { - constructor() { - super(); - } - afterRemoval(isEvict, key, value, newValue) { - if (isEvict === false) { - arr = [key, value, newValue]; - } - } - } - let lru = new ChildLRUCache(); - lru.afterRemoval(false, 10, 30, 12); - expect(arr[2]).assertEqual(12); - }); - - /** - * @tc.number: TEST_LRU_CACHE_AFTER_REMOVAL_004 - * @tc.name : testLruCacheAfterRemoval004 - * @tc.desc : Executes subsequent operations after a value is deleted. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheAfterRemoval004", 0, function () { - let arr = []; - class ChildLRUCache extends util.LRUCache { - constructor() { - super(); - } - afterRemoval(isEvict, key, value, newValue) { - if (isEvict === false) { - arr = [key, value, newValue]; - } - } - } - let lru = new ChildLRUCache(); - lru.afterRemoval(false, "abc", 30, "string"); - expect(arr[1]).assertEqual(30); - }); - - /** - * @tc.number: TEST_LRU_CACHE_AFTER_REMOVAL_005 - * @tc.name : testLruCacheAfterRemoval005 - * @tc.desc : Executes subsequent operations after a value is deleted. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheAfterRemoval005", 0, function () { - let arr = []; - class ChildLRUCache extends util.LRUCache { - constructor() { - super(); - } - afterRemoval(isEvict, key, value, newValue) { - if (isEvict === true) { - arr = [key, value, newValue]; - } - } - } - let lru = new ChildLRUCache(); - lru.afterRemoval(true, "abc", "ab", "string"); - expect(arr[2]).assertEqual("string"); - }); - - /** - * @tc.number: TEST_LRU_CACHE_AFTER_REMOVAL_006 - * @tc.name : testLruCacheAfterRemoval006 - * @tc.desc : Executes subsequent operations after a value is deleted. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheAfterRemoval006", 0, function () { - let arr = []; - class ChildLRUCache extends util.LRUCache { - constructor(capacity) { - super(capacity); - } - afterRemoval(isEvict, key, value, newValue) { - if (isEvict === true) { - arr = [key, value]; - } - } - } - let that = new ChildLRUCache(2); - that.put(1, 2); - that.put(3, 10); - that.put("abc", 20); - expect(arr[1]).assertEqual(20); - }); - - /** - * @tc.number: TEST_LRU_CACHE_AFTER_REMOVAL_007 - * @tc.name : testLruCacheAfterRemoval007 - * @tc.desc : Executes subsequent operations after a value is deleted. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheAfterRemoval007", 0, function () { - let arr = []; - class ChildLRUCache extends util.LRUCache { - constructor(capacity) { - super(capacity); - } - afterRemoval(isEvict, key, value, newValue) { - if (isEvict === false) { - arr = [key, value, newValue]; - } - } - } - let that = new ChildLRUCache(3); - that.put(1, 2); - that.put(3, 10); - that.put(1, 8); - expect(arr[2]).assertEqual(8); - }); - - /** - * @tc.number: TEST_LRU_CACHE_AFTER_REMOVAL_008 - * @tc.name : testLruCacheAfterRemoval008 - * @tc.desc : Executes subsequent operations after a value is deleted. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheAfterRemoval008", 0, function () { - let arrk = []; - let arrv = []; - class ChildLRUCache extends util.LRUCache { - constructor(capacity) { - super(capacity); - } - afterRemoval(isEvict, key, value, newValue) { - if (isEvict === false) { - arrk = Array.from(key); - arrv = Array.from(value); - } - } - } - let that = new ChildLRUCache(3); - that.put(1, 2); - that.put(3, 10); - that.put(2, 8); - that.clear(); - expect(arrk[0]).assertEqual(1); - expect(arrk[1]).assertEqual(3); - expect(arrk[2]).assertEqual(2); - expect(arrv[0]).assertEqual(2); - expect(arrv[1]).assertEqual(10); - expect(arrv[2]).assertEqual(8); - }); - - /** - * @tc.number: TEST_LRU_CACHE_CONTAINS_001 - * @tc.name : testLruCacheContains001 - * @tc.desc : Checks whether the current buffer contains a specified key. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheContains001", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - let result = that.contains(1); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_LRU_CACHE_CONTAINS_002 - * @tc.name : testLruCacheContains002 - * @tc.desc : Checks whether the current buffer contains a specified key. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheContains002", 0, function () { - let that = new util.LRUCache(); - that.put(0, 5); - let result = that.contains(0); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_LRU_CACHE_CONTAINS_003 - * @tc.name : testLruCacheContains003 - * @tc.desc : Checks whether the current buffer contains a specified key. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheContains003", 0, function () { - let that = new util.LRUCache(); - that.put("abc", "abc"); - let result = that.contains(1); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_LRU_CACHE_CONTAINS_004 - * @tc.name : testLruCacheContains004 - * @tc.desc : Checks whether the current buffer contains a specified key. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheContains004", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - that.put("abcd", 20); - let result1 = that.contains(1); - let result2 = that.contains(20); - expect(result1).assertEqual(true); - expect(result2).assertEqual(false); - }); - - /** - * @tc.number: TEST_LRU_CACHE_CONTAINS_005 - * @tc.name : testLruCacheContains005 - * @tc.desc : Checks whether the current buffer contains a specified key. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheContains005", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - that.put("string", "string"); - let result1 = that.contains(1); - let result2 = that.contains("string"); - let result3 = that.contains(0); - expect(result1).assertEqual(true); - expect(result2).assertEqual(true); - expect(result3).assertEqual(false); - }); - - /** - * @tc.number: TEST_LRU_CACHE_CONTAINS_006 - * @tc.name : testLruCacheContains006 - * @tc.desc : Checks whether the current buffer contains a specified key. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheContains006", 0, function () { - let that = new util.LRUCache(); - that.put("abc", "abc"); - let un = undefined; - try { - that.contains(un); - expect(0).assertEqual(1); - } catch (e) { - expect(e.toString()).assertEqual("BusinessError: Parameter error.The type of undefined must be Object"); - expect(e.code).assertEqual(401); - expect(e.message).assertEqual("Parameter error.The type of undefined must be Object"); - } - }); - - /** - * @tc.number: TEST_LRU_CACHE_CREATE_DEFAULT_001 - * @tc.name : testLruCacheCreateDefault001 - * @tc.desc : Executes subsequent operations if miss to compute a value for the specific key. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheCreateDefault001", 0, function () { - let that = new util.LRUCache(); - let result = that.createDefault(1); - expect(result).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_LRU_CACHE_CREATE_DEFAULT_002 - * @tc.name : testLruCacheCreateDefault002 - * @tc.desc : Executes subsequent operations if miss to compute a value for the specific key. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheCreateDefault002", 0, function () { - let that = new util.LRUCache(); - let result = that.createDefault(0); - expect(result).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_LRU_CACHE_CREATE_DEFAULT_003 - * @tc.name : testLruCacheCreateDefault003 - * @tc.desc : Executes subsequent operations if miss to compute a value for the specific key. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheCreateDefault003", 0, function () { - let that = new util.LRUCache(); - let result = that.createDefault("string"); - expect(result).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_LRU_CACHE_CREATE_DEFAULT_004 - * @tc.name : testLruCacheCreateDefault004 - * @tc.desc : Executes subsequent operations if miss to compute a value for the specific key. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheCreateDefault004", 0, function () { - let that = new util.LRUCache(); - let result = that.createDefault(10); - expect(result).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_LRU_CACHE_CREATE_DEFAULT_005 - * @tc.name : testLruCacheCreateDefault005 - * @tc.desc : Executes subsequent operations if miss to compute a value for the specific key. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheCreateDefault005", 0, function () { - let that = new util.LRUCache(); - let result1 = that.createDefault("abc"); - let result2 = that.createDefault("ab"); - expect(result1).assertEqual(undefined); - expect(result2).assertEqual(undefined); - }); - - /** - * @tc.number: TEST_LRU_CACHE_CREATE_DEFAULT_006 - * @tc.name : testLruCacheCreateDefault006 - * @tc.desc : Executes subsequent operations if miss to compute a value for the specific key. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheCreateDefault006", 0, function () { - let that = new util.LRUCache(); - let un = undefined; - try { - that.createDefault(un); - expect(0).assertEqual(1); - } catch (e) { - expect(e.toString()).assertEqual("BusinessError: Parameter error.The type of undefined must be Object"); - expect(e.code).assertEqual(401); - expect(e.message).assertEqual("Parameter error.The type of undefined must be Object"); - } - }); - - /** - * @tc.number: TEST_LRU_CACHE_ENTRIES_001 - * @tc.name : testLruCacheEntries001 - * @tc.desc : Returns an array of key-value pairs of enumeratable properties of a given object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheEntries001", 0, function () { - let that = new util.LRUCache(); - that.put("string", "abc"); - let i = 0; - let arr = {}; - for (let entry of that.entries()) { - arr[i] = entry[0]; - i++; - arr[i] = entry[1]; - i++; - } - expect(arr[1]).assertEqual("abc"); - }); - - /** - * @tc.number: TEST_LRU_CACHE_ENTRIES_002 - * @tc.name : testLruCacheEntries002 - * @tc.desc : Returns an array of key-value pairs of enumeratable properties of a given object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheEntries002", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - that.put(3, 10); - that.put(5, 15); - that.put("abc", 20); - let i = 0; - let arr = {}; - for (let entry of that.entries()) { - arr[i] = entry[0]; - i++; - arr[i] = entry[1]; - i++; - } - expect(arr[1]).assertEqual(2); - }); - - /** - * @tc.number: TEST_LRU_CACHE_ENTRIES_003 - * @tc.name : testLruCacheEntries003 - * @tc.desc : Returns an array of key-value pairs of enumeratable properties of a given object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheEntries003", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - that.put(3, 10); - that.put(5, 15); - that.put("abc", 20); - that.get(3); - let i = 0; - let arr = {}; - for (let entry of that.entries()) { - arr[i] = entry[0]; - i++; - arr[i] = entry[1]; - i++; - } - expect(arr[0]).assertEqual(1); - }); - - /** - * @tc.number: TEST_LRU_CACHE_ENTRIES_004 - * @tc.name : testLruCacheEntries004 - * @tc.desc : Returns an array of key-value pairs of enumeratable properties of a given object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheEntries004", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - that.put(3, 10); - that.put(5, 15); - that.put("abc", 20); - that.get(3); - that.contains(1); - let i = 0; - let arr = {}; - for (let entry of that.entries()) { - arr[i] = entry[0]; - i++; - arr[i] = entry[1]; - i++; - } - expect(arr[1]).assertEqual(15); - expect(arr[3]).assertEqual(20); - }); - - /** - * @tc.number: TEST_LRU_CACHE_ENTRIES_005 - * @tc.name : testLruCacheEntries005 - * @tc.desc : Returns an array of key-value pairs of enumeratable properties of a given object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheEntries005", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - that.put(3, 10); - that.put(5, 15); - that.put("abc", 20); - that.get(3); - that.remove(5); - that.contains(3); - that.get(1); - that.contains("abc"); - let i = 0; - let arr = {}; - for (let entry of that.entries()) { - arr[i] = entry[0]; - i++; - arr[i] = entry[1]; - i++; - } - expect(arr[1]).assertEqual(10); - expect(arr[3]).assertEqual(2); - expect(arr[5]).assertEqual(20); - }); - - /** - * @tc.number: TEST_LRU_CACHE_SYMBOL_ITERATOR_001 - * @tc.name : testLruCacheSymbolIterator001 - * @tc.desc : Returns a two - dimensional array in the form of key - value pairs. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheSymbolIterator001", 0, function () { - let that = new util.LRUCache(); - that.put("string", "abc"); - that.put("abc", 20); - let i = 0; - let arr = {}; - for (let entry of that[Symbol.iterator]()) { - arr[i] = entry[0]; - i++; - arr[i] = entry[1]; - i++; - } - expect(arr[1]).assertEqual("abc"); - }); - - /** - * @tc.number: TEST_LRU_CACHE_SYMBOL_ITERATOR_002 - * @tc.name : testLruCacheSymbolIterator002 - * @tc.desc : Returns a two - dimensional array in the form of key - value pairs. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheSymbolIterator002", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - that.put(3, 10); - that.put(5, 15); - that.put("abc", 20); - let i = 0; - let arr = {}; - for (let entry of that[Symbol.iterator]()) { - arr[i] = entry[0]; - i++; - arr[i] = entry[1]; - i++; - } - expect(arr[1]).assertEqual(2); - }); - - /** - * @tc.number: TEST_LRU_CACHE_SYMBOL_ITERATOR_003 - * @tc.name : testLruCacheSymbolIterator003 - * @tc.desc : Returns a two - dimensional array in the form of key - value pairs. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheSymbolIterator003", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - that.put(3, 10); - that.put(5, 15); - that.put("abc", 20); - that.get(3); - let i = 0; - let arr = {}; - for (let entry of that[Symbol.iterator]()) { - arr[i] = entry[0]; - i++; - arr[i] = entry[1]; - i++; - } - expect(arr[0]).assertEqual(1); - }); - - /** - * @tc.number: TEST_LRU_CACHE_SYMBOL_ITERATOR_004 - * @tc.name : testLruCacheSymbolIterator004 - * @tc.desc : Returns a two - dimensional array in the form of key - value pairs. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheSymbolIterator004", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - that.put(3, 10); - that.put(5, 15); - that.put("abc", 20); - that.get(3); - that.contains(1); - let i = 0; - let arr = {}; - for (let entry of that[Symbol.iterator]()) { - arr[i] = entry[0]; - i++; - arr[i] = entry[1]; - i++; - } - expect(arr[1]).assertEqual(15); - expect(arr[3]).assertEqual(20); - }); - - /** - * @tc.number: TEST_LRU_CACHE_SYMBOL_ITERATOR_005 - * @tc.name : testLruCacheSymbolIterator005 - * @tc.desc : Returns a two - dimensional array in the form of key - value pairs. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testLruCacheSymbolIterator005", 0, function () { - let that = new util.LRUCache(); - that.put(1, 2); - that.put(3, 10); - that.put(5, 15); - that.put("abc", 20); - that.get(3); - that.remove(5); - that.contains(3); - that.get(1); - that.contains("abc"); - let i = 0; - let arr = {}; - for (let entry of that[Symbol.iterator]()) { - arr[i] = entry[0]; - i++; - arr[i] = entry[1]; - i++; - } - expect(arr[1]).assertEqual(10); - expect(arr[3]).assertEqual(2); - expect(arr[5]).assertEqual(20); - }); - - /** - * @tc.number: TEST_COMPARE_TO_001 - * @tc.name : testCompareTo001 - * @tc.desc : Compare the size of two values and return a Boolean value - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testCompareTo001", 0, function () { - let result1 = tempLower.compareTo(tempUpper); - let result2 = tempUpper.compareTo(tempLower); - let result3 = tempMiDF.compareTo(tempLess); - let result4 = tempMore.compareTo(tempMidS); - let result5 = tempLess.compareTo(tempMidS); - expect(result1).assertEqual(false); - expect(result2).assertEqual(true); - expect(result3).assertEqual(true); - expect(result4).assertEqual(true); - expect(result5).assertEqual(false); - }); - - /** - * @tc.number: TEST_CONSTRUCTOR_THROW_ERROR_001 - * @tc.name : testConstructorThrowError001 - * @tc.desc : A constructor used to create a Scope instance with the lower and upper bounds specified. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testConstructorThrowError001", 0, function () { - try { - let range = new util.ScopeHelper(1, 2); - expect(0).assertEqual(1); - } catch (e) { - expect(e.toString()).assertEqual("BusinessError: Parameter error.The type of 1 must be object"); - } - }); - - /** - * @tc.number: TEST_TO_STRING_001 - * @tc.name : testToString001 - * @tc.desc : Obtains a string representation of the current range. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testToString001", 0, function () { - let result = rangeHp.toString(); - expect(result.toString()).assertEqual("[30, 40]"); - }); - - /** - * @tc.number: TEST_TO_STRING_002 - * @tc.name : testToString002 - * @tc.desc : Obtains a string representation of the current range. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testToString002", 0, function () { - let result = rangeHpFir.toString(); - expect(result.toString()).assertEqual("[35, 39]"); - }); - - /** - * @tc.number: TEST_TO_STRING_003 - * @tc.name : testToString003 - * @tc.desc : Obtains a string representation of the current range. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testToString003", 0, function () { - let result = rangeHpSec.toString(); - expect(result.toString()).assertEqual("[20, 45]"); - }); - - /** - * @tc.number: TEST_TO_STRING_004 - * @tc.name : testToString004 - * @tc.desc : Obtains a string representation of the current range. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testToString004", 0, function () { - let result = rangeHpThi.toString(); - expect(result.toString()).assertEqual("[20, 35]"); - }); - - /** - * @tc.number: TEST_TO_STRING_005 - * @tc.name : testToString005 - * @tc.desc : Obtains a string representation of the current range. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testToString005", 0, function () { - let result = rangeHpFif.toString(); - expect(result.toString()).assertEqual("[35, 45]"); - }); - - /** - * @tc.number: TEST_INTERSECT_001 - * @tc.name : testIntersect001 - * @tc.desc : Returns the intersection of a given range and the current range. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIntersect001", 0, function () { - let result = rangeHp.intersect(rangeHpFir); - expect(result.toString()).assertEqual("[35, 39]"); - }); - - /** - * @tc.number: TEST_INTERSECT_002 - * @tc.name : testIntersect002 - * @tc.desc : Returns the intersection of a given range and the current range. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIntersect002", 0, function () { - let result = rangeHp.intersect(rangeHpSec); - expect(result.toString()).assertEqual("[30, 40]"); - }); - - /** - * @tc.number: TEST_INTERSECT_003 - * @tc.name : testIntersect003 - * @tc.desc : Returns the intersection of a given range and the current range. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIntersect003", 0, function () { - let result = rangeHp.intersect(rangeHpThi); - expect(result.toString()).assertEqual("[30, 35]"); - }); - - /** - * @tc.number: TEST_INTERSECT_004 - * @tc.name : testIntersect004 - * @tc.desc : Returns the intersection of a given range and the current range. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIntersect004", 0, function () { - let result = rangeHp.intersect(rangeHpFif); - expect(result.toString()).assertEqual("[35, 40]"); - }); - - /** - * @tc.number: TEST_INTERSECT_005 - * @tc.name : testIntersect005 - * @tc.desc : Returns the intersection of a given range and the current range. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIntersect005", 0, function () { - let result = rangeHp.intersect(rangeHp); - expect(result.toString()).assertEqual("[30, 40]"); - }); - - /** - * @tc.number: TEST_INTERSECT_006 - * @tc.name : testIntersect006 - * @tc.desc : Returns the intersection of the current range and the range specified by - the given lower and upper bounds. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIntersect006", 0, function () { - let result = rangeHp.intersect(tempMiDF, tempMidS); - expect(result.toString()).assertEqual("[35, 39]"); - }); - - /** - * @tc.number: TEST_INTERSECT_007 - * @tc.name : testIntersect007 - * @tc.desc : Returns the intersection of the current range and the range specified by - the given lower and upper bounds. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIntersect007", 0, function () { - let result = rangeHp.intersect(tempLess, tempMore); - expect(result.toString()).assertEqual("[30, 40]"); - }); - - /** - * @tc.number: TEST_INTERSECT_008 - * @tc.name : testIntersect008 - * @tc.desc : Returns the intersection of the current range and the range specified by - the given lower and upper bounds. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIntersect008", 0, function () { - let result = rangeHp.intersect(tempLess, tempMiDF); - expect(result.toString()).assertEqual("[30, 35]"); - }); - - /** - * @tc.number: TEST_INTERSECT_009 - * @tc.name : testIntersect009 - * @tc.desc : Returns the intersection of the current range and the range specified by - the given lower and upper bounds. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIntersect009", 0, function () { - let result = rangeHp.intersect(tempMiDF, tempMore); - expect(result.toString()).assertEqual("[35, 40]"); - }); - - /** - * @tc.number: TEST_INTERSECT_010 - * @tc.name : testIntersect010 - * @tc.desc : Returns the intersection of the current range and the range specified by - the given lower and upper bounds. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIntersect010", 0, function () { - let result = rangeHp.intersect(tempLower, tempUpper); - expect(result.toString()).assertEqual("[30, 40]"); - }); - - /** - * @tc.number: TEST_INTERSECT_THROE_ERROR_001 - * @tc.name : testIntersectThrowError001 - * @tc.desc : Returns the intersection of the current range and the range specified by - the given lower and upper bounds. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIntersectThrowError001", 0, function () { - try { - let result = rangeHp.intersect(tempMiDF, 123); - expect(result.toString()).assertEqual("[35, 39]"); - } catch (e) { - expect(e.toString()).assertEqual("BusinessError: Parameter error.The type of 123 must be ScopeType"); - } - }); - - /** - * @tc.number: TEST_GET_UPPER_001 - * @tc.name : testGetUpper001 - * @tc.desc : Obtains the upper bound of the current range. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetUpper001", 0, function () { - let result = rangeHp.getUpper(); - expect(result.toString()).assertEqual("40"); - }); - - /** - * @tc.number: TEST_GET_UPPER_002 - * @tc.name : testGetUpper002 - * @tc.desc : Obtains the upper bound of the current range. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetUpper002", 0, function () { - let result = rangeHpFir.getUpper(); - expect(result.toString()).assertEqual("39"); - }); - - /** - * @tc.number: TEST_GET_UPPER_003 - * @tc.name : testGetUpper003 - * @tc.desc : Obtains the upper bound of the current range. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetUpper003", 0, function () { - let result = rangeHpSec.getUpper(); - expect(result.toString()).assertEqual("45"); - }); - - /** - * @tc.number: TEST_GET_UPPER_004 - * @tc.name : testGetUpper004 - * @tc.desc : Obtains the upper bound of the current range. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetUpper004", 0, function () { - let result = rangeHpThi.getUpper(); - expect(result.toString()).assertEqual("35"); - }); - - /** - * @tc.number: TEST_GET_UPPER_005 - * @tc.name : testGetUpper005 - * @tc.desc : Obtains the upper bound of the current range. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetUpper005", 0, function () { - let result = rangeHpFif.getUpper(); - expect(result.toString()).assertEqual("45"); - }); - - /** - * @tc.number: TEST_EXPAND_001 - * @tc.name : testExpand001 - * @tc.desc : Creates the smallest range that includes the current range and a given range. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testExpand001", 0, function () { - let result = rangeHp.expand(rangeHpFir); - expect(result.toString()).assertEqual("[30, 40]"); - }); - - /** - * @tc.number: TEST_EXPAND_002 - * @tc.name : testExpand002 - * @tc.desc : Creates the smallest range that includes the current range and a given range. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testExpand002", 0, function () { - let result = rangeHp.expand(rangeHpSec); - expect(result.toString()).assertEqual("[20, 45]"); - }); - - /** - * @tc.number: TEST_EXPAND_003 - * @tc.name : testExpand003 - * @tc.desc : Creates the smallest range that includes the current range and a given range. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testExpand003", 0, function () { - let result = rangeHp.expand(rangeHpThi); - expect(result.toString()).assertEqual("[20, 40]"); - }); - - /** - * @tc.number: TEST_EXPAND_004 - * @tc.name : testExpand004 - * @tc.desc : Creates the smallest range that includes the current range and a given range. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testExpand004", 0, function () { - let result = rangeHp.expand(rangeHpFif); - expect(result.toString()).assertEqual("[30, 45]"); - }); - - /** - * @tc.number: TEST_EXPAND_005 - * @tc.name : testExpand005 - * @tc.desc : Creates the smallest range that includes the current range and a given range. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testExpand005", 0, function () { - let result = rangeHp.expand(rangeHp); - expect(result.toString()).assertEqual("[30, 40]"); - }); - - /** - * @tc.number: TEST_EXPAND_006 - * @tc.name : testExpand006 - * @tc.desc : Creates the smallest range that includes the current range and a given range. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testExpand006", 0, function () { - let result = rangeHp.expand(tempMiDF); - expect(result.toString()).assertEqual("[30, 40]"); - }); - - /** - * @tc.number: TEST_EXPAND_007 - * @tc.name : testExpand007 - * @tc.desc : Creates the smallest range that includes the current range and a given range. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testExpand007", 0, function () { - let result = rangeHp.expand(tempLess); - expect(result.toString()).assertEqual("[20, 40]"); - }); - - /** - * @tc.number: TEST_EXPAND_008 - * @tc.name : testExpand008 - * @tc.desc : Creates the smallest range that includes the current range and a given range. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testExpand008", 0, function () { - let result = rangeHp.expand(tempMore); - expect(result.toString()).assertEqual("[30, 45]"); - }); - - /** - * @tc.number: TEST_EXPAND_009 - * @tc.name : testExpand009 - * @tc.desc : Creates the smallest range that includes the current range and a given range. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testExpand009", 0, function () { - let result = rangeHp.expand(tempLower); - expect(result.toString()).assertEqual("[30, 40]"); - }); - - /** - * @tc.number: TEST_EXPAND_010 - * @tc.name : testExpand010 - * @tc.desc : Creates the smallest range that includes the current range and a given range. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testExpand010", 0, function () { - let result = rangeHp.expand(tempUpper); - expect(result.toString()).assertEqual("[30, 40]"); - }); - - /** - * @tc.number: TEST_CONTAINS_001 - * @tc.name : testContains001 - * @tc.desc : Checks whether a given value is within the current range. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testContains001", 0, function () { - let result = rangeHp.contains(tempLess); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_CONTAINS_002 - * @tc.name : testContains002 - * @tc.desc : Checks whether a given value is within the current range. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testContains002", 0, function () { - let result = rangeHp.contains(tempMiDF); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_CONTAINS_003 - * @tc.name : testContains003 - * @tc.desc : Checks whether a given value is within the current range. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testContains003", 0, function () { - let result = rangeHp.contains(tempMore); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_CONTAINS_004 - * @tc.name : testContains004 - * @tc.desc : Checks whether a given value is within the current range. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testContains004", 0, function () { - let result = rangeHp.contains(tempLower); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_CONTAINS_005 - * @tc.name : testContains005 - * @tc.desc : Checks whether a given value is within the current range. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testContains005", 0, function () { - let result = rangeHp.contains(tempUpper); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_CONTAINS_006 - * @tc.name : testContains006 - * @tc.desc : Checks whether a given value is within the current range. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testContains006", 0, function () { - let result = rangeHp.contains(rangeHpFir); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_CONTAINS_007 - * @tc.name : testContains007 - * @tc.desc : Checks whether a given value is within the current range. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testContains007", 0, function () { - let result = rangeHp.contains(rangeHpSec); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_CONTAINS_008 - * @tc.name : testContains008 - * @tc.desc : Checks whether a given value is within the current range. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testContains008", 0, function () { - let result = rangeHp.contains(rangeHpThi); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_CONTAINS_009 - * @tc.name : testContains009 - * @tc.desc : Checks whether a given value is within the current range. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testContains009", 0, function () { - let result = rangeHp.contains(rangeHpFif); - expect(result).assertEqual(false); - }); - - /** - * @tc.number: TEST_CONTAINS_010 - * @tc.name : testContains010 - * @tc.desc : Checks whether a given value is within the current range. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testContains010", 0, function () { - let result = rangeHp.contains(rangeHp); - expect(result).assertEqual(true); - }); - - /** - * @tc.number: TEST_CLAMP_001 - * @tc.name : testClamp001 - * @tc.desc : Clamps a given value to the current range. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testClamp001", 0, function () { - let result = rangeHp.clamp(tempLess); - expect(result.toString()).assertEqual("30"); - }); - - /** - * @tc.number: TEST_CLAMP_002 - * @tc.name : testClamp002 - * @tc.desc : Clamps a given value to the current range. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testClamp002", 0, function () { - let result = rangeHp.clamp(tempMiDF); - expect(result.toString()).assertEqual("35"); - }); - - /** - * @tc.number: TEST_CLAMP_003 - * @tc.name : testClamp003 - * @tc.desc : Clamps a given value to the current range. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testClamp003", 0, function () { - let result = rangeHp.clamp(tempMore); - expect(result.toString()).assertEqual("40"); - }); - - /** - * @tc.number: TEST_CLAMP_004 - * @tc.name : testClamp004 - * @tc.desc : Clamps a given value to the current range. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testClamp004", 0, function () { - let result = rangeHp.clamp(tempLower); - expect(result.toString()).assertEqual("30"); - }); - - /** - * @tc.number: TEST_CLAMP_005 - * @tc.name : testClamp005 - * @tc.desc : Clamps a given value to the current range. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testClamp005", 0, function () { - let result = rangeHp.clamp(tempUpper); - expect(result.toString()).assertEqual("40"); - }); - - /** - * @tc.number: TEST_CLAMP_THROW_ERROR_001 - * @tc.name : testClampThrowError001 - * @tc.desc : Clamps a given value to the current range. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testClampThrowError001", 0, function () { - try { - let result = rangeHp.clamp(123); - expect(result.toString()).assertEqual("30"); - } catch (e) { - expect(e.toString()).assertEqual("BusinessError: Parameter error.The type of 123 must be object"); - } - }); - - /** - * @tc.number: TEST_ENCODE_SYNC_BASE64_001 - * @tc.name : testEncodeSyncBase64001 - * @tc.desc : Encodes all bytes from the specified u8 array into a newly-allocated u8 - array using the Base64 encoding scheme. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEncodeSyncBase64001", 0, function () { - let that = new util.Base64Helper(); - expect(that != null).assertTrue(); - let array = new Uint8Array([115, 49, 51]); - let rarray = new Uint8Array([99, 122, 69, 122]); - let result = that.encodeSync(array); - for (let i = 0; i < 4; i++) { - expect(result[i]).assertEqual(rarray[i]); - } - }); - - /** - * @tc.number: TEST_ENCODE_SYNC_BASE64_002 - * @tc.name : testEncodeSyncBase64002 - * @tc.desc : Encodes all bytes from the specified u8 array into a newly-allocated u8 - array using the Base64 encoding scheme. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEncodeSyncBase64002", 0, function () { - let that = new util.Base64Helper(); - expect(that != null).assertTrue(); - let array = new Uint8Array([66, 97, 115, 101, 54, 52, 32, 78, 111, 100, 101, 46, 106, 115]); - let rarray = new Uint8Array([81, 109, 70, 122, 90, 84, 89, 48, 73, 69, 53, 118, 90, 71, 85, 117, 97, 110, 77, 61]); - let result = that.encodeSync(array); - for (let i = 0; i < 20; i++) { - expect(result[i]).assertEqual(rarray[i]); - } - }); - - /** - * @tc.number: TEST_ENCODE_SYNC_BASE64_003 - * @tc.name : testEncodeSyncBase64003 - * @tc.desc : Encodes all bytes from the specified u8 array into a newly-allocated u8 - array using the Base64 encoding scheme. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEncodeSyncBase64003", 0, function () { - let that = new util.Base64Helper(); - expect(that != null).assertTrue(); - let array = new Uint8Array([66, 97, 115, 101, 54, 52, 32, 69, 110, 99, 111, 100, 105, 110, 103, 32, 105, 110, 32, 78, 111, 100, 101, 46, 106, 115]); - let rarray = new Uint8Array([81, 109, 70, 122, 90, 84, 89, 48, 73, 69, 86, 117, 89, 50, 57, 107, 97, 87, 53, 110, 73, 71, 108, 117, 73, 69, 53, 118, 90, 71, 85, 117, 97, 110, 77, 61]); - let result = that.encodeSync(array); - for (let i = 0; i < 36; i++) { - expect(result[i]).assertEqual(rarray[i]); - } - }); - - /** - * @tc.number: TEST_ENCODE_SYNC_BASE64_004 - * @tc.name : testEncodeSyncBase64004 - * @tc.desc : Encodes all bytes from the specified u8 array into a newly-allocated u8 - array using the Base64 encoding scheme. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEncodeSyncBase64004", 0, function () { - let that = new util.Base64Helper(); - expect(that != null).assertTrue(); - let array = new Uint8Array([168, 174, 155, 255]); - let rarray = new Uint8Array([113, 75, 54, 98, 47, 119, 61, 61]); - let result = that.encodeSync(array); - for (let i = 0; i < 8; i++) { - expect(result[i]).assertEqual(rarray[i]); - } - }); - - /** - * @tc.number: TEST_ENCODE_SYNC_BASE64_005 - * @tc.name : testEncodeSyncBase64005 - * @tc.desc : Encodes all bytes from the specified u8 array into a newly-allocated u8 - array using the Base64 encoding scheme. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEncodeSyncBase64005", 0, function () { - let that = new util.Base64Helper(); - expect(that != null).assertTrue(); - let array = new Uint8Array([66, 97, 115, 101, 54, 52]); - let rarray = new Uint8Array([81, 109, 70, 122, 90, 84, 89, 48]); - let result = that.encodeSync(array); - for (let i = 0; i < 8; i++) { - expect(result[i]).assertEqual(rarray[i]); - } - }); - - /** - * @tc.number: TEST_ENCODE_TO_STRING_SYNC_BASE64_001 - * @tc.name : testEncodeToStringSyncBase64001 - * @tc.desc : Encodes the specified byte array into a String using the Base64 encoding scheme. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEncodeToStringSyncBase64001", 0, function () { - let that = new util.Base64Helper(); - let array = new Uint8Array([115, 49, 51]); - let result = that.encodeToStringSync(array); - expect(result).assertEqual("czEz"); - }); - - /** - * @tc.number: TEST_ENCODE_TO_STRING_SYNC_BASE64_002 - * @tc.name : testEncodeToStringSyncBase64002 - * @tc.desc : Encodes the specified byte array into a String using the Base64 encoding scheme. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEncodeToStringSyncBase64002", 0, function () { - let that = new util.Base64Helper(); - let array = new Uint8Array([66, 97, 115, 101, 54, 52, 32, 78, 111, 100, 101, 46, 106, 115]); - let result = that.encodeToStringSync(array); - expect(result).assertEqual("QmFzZTY0IE5vZGUuanM="); - }); - - /** - * @tc.number: TEST_ENCODE_TO_STRING_SYNC_BASE64_003 - * @tc.name : testEncodeToStringSyncBase64003 - * @tc.desc : Encodes the specified byte array into a String using the Base64 encoding scheme. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEncodeToStringSyncBase64003", 0, function () { - let that = new util.Base64Helper(); - let array = new Uint8Array([66, 97, 115, 101, 54, 52, 32, 69, 110, 99, 111, 100, 105, 110, 103, 32, 105, 110, 32, 78, 111, 100, 101, 46, 106, 115]); - let result = that.encodeToStringSync(array); - expect(result).assertEqual("QmFzZTY0IEVuY29kaW5nIGluIE5vZGUuanM="); - }); - - /** - * @tc.number: TEST_ENCODE_TO_STRING_SYNC_BASE64_004 - * @tc.name : testEncodeToStringSyncBase64004 - * @tc.desc : Encodes the specified byte array into a String using the Base64 encoding scheme. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEncodeToStringSyncBase64004", 0, function () { - let that = new util.Base64Helper(); - let array = new Uint8Array([168, 174, 155, 255]); - let result = that.encodeToStringSync(array); - expect(result).assertEqual("qK6b/w=="); - }); - - /** - * @tc.number: TEST_ENCODE_TO_STRING_SYNC_BASE64_005 - * @tc.name : testEncodeToStringSyncBase64005 - * @tc.desc : Encodes the specified byte array into a String using the Base64 encoding scheme. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEncodeToStringSyncBase64005", 0, function () { - let that = new util.Base64Helper(); - let array = new Uint8Array([66, 97, 115, 101, 54, 52]); - let result = that.encodeToStringSync(array); - expect(result).assertEqual("QmFzZTY0"); - }); - - /** - * @tc.number: TEST_DECODE_SYNC_BASE64_001 - * @tc.name : testDecodeSyncBase64001 - * @tc.desc : Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 - array using the Base64 encoding scheme. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testDecodeSyncBase64001", 0, function () { - let that = new util.Base64Helper(); - let buff = "czEz"; - let rarray = new Uint8Array([115, 49, 51]); - let result = that.decodeSync(buff); - for (let i = 0; i < 3; i++) { - expect(result[i]).assertEqual(rarray[i]); - } - }); - - /** - * @tc.number: TEST_DECODE_SYNC_BASE64_002 - * @tc.name : testDecodeSyncBase64002 - * @tc.desc : Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 - array using the Base64 encoding scheme. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testDecodeSyncBase64002", 0, function () { - let that = new util.Base64Helper(); - let buff = "QmFzZTY0IE5vZGUuanM="; - let rarray = new Uint8Array([66, 97, 115, 101, 54, 52, 32, 78, 111, 100, 101, 46, 106, 115]); - let result = that.decodeSync(buff); - for (let i = 0; i < 14; i++) { - expect(result[i]).assertEqual(rarray[i]); - } - }); - - /** - * @tc.number: TEST_DECODE_SYNC_BASE64_003 - * @tc.name : testDecodeSyncBase64003 - * @tc.desc : Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 - array using the Base64 encoding scheme. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testDecodeSyncBase64003", 0, function () { - let that = new util.Base64Helper(); - let buff = "QmFzZTY0IEVuY29kaW5nIGluIE5vZGUuanM="; - let rarray = new Uint8Array([66, 97, 115, 101, 54, 52, 32, 69, 110, 99, 111, 100, 105, 110, 103, 32, 105, 110, 32, 78, 111, 100, 101, 46, 106, 115]); - let result = that.decodeSync(buff); - for (let i = 0; i < 26; i++) { - expect(result[i]).assertEqual(rarray[i]); - } - }); - - /** - * @tc.number: TEST_DECODE_SYNC_BASE64_004 - * @tc.name : testDecodeSyncBase64004 - * @tc.desc : Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 - array using the Base64 encoding scheme. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testDecodeSyncBase64004", 0, function () { - let that = new util.Base64Helper(); - let buff = "qK6b/w=="; - let rarray = new Uint8Array([168, 174, 155, 255]); - let result = that.decodeSync(buff); - for (let i = 0; i < 4; i++) { - expect(result[i]).assertEqual(rarray[i]); - } - }); - - /** - * @tc.number: TEST_DECODE_SYNC_BASE64_005 - * @tc.name : testDecodeSyncBase64005 - * @tc.desc : Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 - array using the Base64 encoding scheme. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testDecodeSyncBase64005", 0, function () { - let that = new util.Base64Helper(); - let buff = "QmFzZTY0"; - let rarray = new Uint8Array([66, 97, 115, 101, 54, 52]); - let result = that.decodeSync(buff); - for (let i = 0; i < 6; i++) { - expect(result[i]).assertEqual(rarray[i]); - } - }); - - /** - * @tc.number: TEST_DECODE_SYNC_BASE64_006 - * @tc.name : testDecodeSyncBase64006 - * @tc.desc : Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 - array using the Base64 encoding scheme. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testDecodeSyncBase64006", 0, function () { - let that = new util.Base64Helper(); - let array = new Uint8Array([81, 109, 70, 122, 90, 84, 89, 48, 73, 69, 53, 118, 90, 71, 85, 117, 97, 110, 77, 61]); - let rarray = new Uint8Array([66, 97, 115, 101, 54, 52, 32, 78, 111, 100, 101, 46, 106, 115]); - let result = that.decodeSync(array); - for (let i = 0; i < 14; i++) { - expect(result[i]).assertEqual(rarray[i]); - } - }); - - /** - * @tc.number: TEST_DECODE_SYNC_BASE64_007 - * @tc.name : testDecodeSyncBase64007 - * @tc.desc : Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 - array using the Base64 encoding scheme. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testDecodeSyncBase64007", 0, function () { - let that = new util.Base64Helper(); - let array = new Uint8Array([81, 109, 70, 122, 90, 84, 89, 48, 73, 69, 86, 117, 89, 50, 57, 107, 97, 87, 53, 110, 73, 71, 108, 117, 73, 69, 53, 118, 90, 71, 85, 117, 97, 110, 77, 61]); - let rarray = new Uint8Array([66, 97, 115, 101, 54, 52, 32, 69, 110, 99, 111, 100, 105, 110, 103, 32, 105, 110, 32, 78, 111, 100, 101, 46, 106, 115]); - let result = that.decodeSync(array); - for (let i = 0; i < 26; i++) { - expect(result[i]).assertEqual(rarray[i]); - } - }); - - /** - * @tc.number: TEST_DECODE_SYNC_BASE64_008 - * @tc.name : testDecodeSyncBase64008 - * @tc.desc : Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 - array using the Base64 encoding scheme. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testDecodeSyncBase64008", 0, function () { - let that = new util.Base64Helper(); - let array = new Uint8Array([113, 75, 54, 98, 47, 119, 61, 61]); - let rarray = new Uint8Array([168, 174, 155, 255]); - let result = that.decodeSync(array); - for (let i = 0; i < 4; i++) { - expect(result[i]).assertEqual(rarray[i]); - } - }); - - /** - * @tc.number: TEST_DECODE_SYNC_BASE64_009 - * @tc.name : testDecodeSyncBase64009 - * @tc.desc : Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 - array using the Base64 encoding scheme. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testDecodeSyncBase64009", 0, function () { - let that = new util.Base64Helper(); - let array = new Uint8Array([81, 109, 70, 122, 90, 84, 89, 48]); - let rarray = new Uint8Array([66, 97, 115, 101, 54, 52]); - let result = that.decodeSync(array); - for (let i = 0; i < 6; i++) { - expect(result[i]).assertEqual(rarray[i]); - } - }); - - /** - * @tc.number: TEST_ENCODE_SYNC_BASE64_001 - * @tc.name : testEncodeSyncBase64001 - * @tc.desc : Asynchronously encodes all bytes in the specified u8 array into the newly - allocated u8 array using the Base64 encoding scheme. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEncodeSyncBase64001", 0, async function () { - let that = await new util.Base64Helper(); - let array = new Uint8Array([115, 49, 51]); - let rarray = new Uint8Array([99, 122, 69, 122]); - that.encode(array).then((val) => { - for (let i = 0; i < rarray.length; i++) { - expect(val[i]).assertEqual(rarray[i]); - } - }); - }); - - /** - * @tc.number: TEST_ENCODE_SYNC_BASE64_002 - * @tc.name : testEncodeSyncBase64002 - * @tc.desc : Asynchronously encodes all bytes in the specified u8 array into the newly - allocated u8 array using the Base64 encoding scheme. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEncodeSyncBase64002", 0, async function () { - let that = new util.Base64Helper(); - let array = new Uint8Array([66, 97, 115, 101, 54, 52, 32, 78, 111, 100, 101, 46, 106, 115]); - let rarray = new Uint8Array([81, 109, 70, 122, 90, 84, 89, 48, 73, 69, 53, 118, 90, 71, 85, 117, 97, 110, 77, 61]); - that.encode(array).then((val) => { - for (let i = 0; i < rarray.length; i++) { - expect(val[i]).assertEqual(rarray[i]); - } - }); - }); - - /** - * @tc.number: TEST_ENCODE_SYNC_BASE64_003 - * @tc.name : testEncodeSyncBase64003 - * @tc.desc : Asynchronously encodes all bytes in the specified u8 array into the newly - allocated u8 array using the Base64 encoding scheme. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEncodeSyncBase64003", 0, async function () { - let that = new util.Base64Helper(); - let array = new Uint8Array([66, 97, 115, 101, 54, 52, 32, 69, 110, 99, 111, 100, 105, 110, 103, 32, 105, 110, 32, 78, 111, 100, 101, 46, 106, 115]); - let rarray = new Uint8Array([81, 109, 70, 122, 90, 84, 89, 48, 73, 69, 86, 117, 89, 50, 57, 107, 97, 87, 53, 110, 73, 71, 108, 117, 73, 69, 53, 118, 90, 71, 85, 117, 97, 110, 77, 61]); - that.encode(array).then((val) => { - for (let i = 0; i < rarray.length; i++) { - expect(val[i]).assertEqual(rarray[i]); - } - }); - }); - - /** - * @tc.number: TEST_ENCODE_SYNC_BASE64_004 - * @tc.name : testEncodeSyncBase64004 - * @tc.desc : Asynchronously encodes all bytes in the specified u8 array into the newly - allocated u8 array using the Base64 encoding scheme. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEncodeSyncBase64004", 0, async function () { - let that = new util.Base64Helper(); - let array = new Uint8Array([168, 174, 155, 255]); - let rarray = new Uint8Array([113, 75, 54, 98, 47, 119, 61, 61]); - that.encode(array).then((val) => { - for (let i = 0; i < rarray.length; i++) { - expect(val[i]).assertEqual(rarray[i]); - } - }); - }); - - /** - * @tc.number: TEST_ENCODE_SYNC_BASE64_005 - * @tc.name : testEncodeSyncBase64005 - * @tc.desc : Asynchronously encodes all bytes in the specified u8 array into the newly - allocated u8 array using the Base64 encoding scheme. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEncodeSyncBase64005", 0, async function () { - let that = new util.Base64Helper(); - let array = new Uint8Array([66, 97, 115, 101, 54, 52]); - let rarray = new Uint8Array([81, 109, 70, 122, 90, 84, 89, 48]); - that.encode(array).then((val) => { - for (let i = 0; i < rarray.length; i++) { - expect(val[i]).assertEqual(rarray[i]); - } - }); - }); - - /** - * @tc.number: TEST_ENCODE_TO_STRING_BASE64_001 - * @tc.name : testEncodeToStringBase64001 - * @tc.desc : Asynchronously encodes the specified byte array into a String using the Base64 encoding scheme. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEncodeToStringBase64001", 0, async function () { - let that = new util.Base64Helper(); - let array = new Uint8Array([115, 49, 51]); - that.encodeToString(array).then((val) => { - expect(val).assertEqual("czEz"); - }); - }); - - /** - * @tc.number: TEST_ENCODE_TO_STRING_BASE64_002 - * @tc.name : testEncodeToStringBase64002 - * @tc.desc : Asynchronously encodes the specified byte array into a String using the Base64 encoding scheme. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEncodeToStringBase64002", 0, async function () { - let that = new util.Base64Helper(); - let array = new Uint8Array([66, 97, 115, 101, 54, 52, 32, 78, 111, 100, 101, 46, 106, 115]); - that.encodeToString(array).then((val) => { - expect(val).assertEqual("QmFzZTY0IE5vZGUuanM="); - }); - }); - - /** - * @tc.number: TEST_ENCODE_TO_STRING_BASE64_003 - * @tc.name : testEncodeToStringBase64003 - * @tc.desc : Asynchronously encodes the specified byte array into a String using the Base64 encoding scheme. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEncodeToStringBase64003", 0, async function () { - let that = new util.Base64Helper(); - let array = new Uint8Array([81, 109, 70, 122, 90, 84, 89, 48, 73, 69, 86, 117, 89, 50, 57, 107, 97, 87, 53, 110, 73, 71, 108, 117, 73, 69, 53, 118, 90, 71, 85, 117, 97, 110, 77, 61]); - that.encodeToString(array).then((val) => { - expect(val).assertEqual("QmFzZTY0IEVuY29kaW5nIGluIE5vZGUuanM="); - }); - }); - - /** - * @tc.number: TEST_ENCODE_TO_STRING_BASE64_004 - * @tc.name : testEncodeToStringBase64004 - * @tc.desc : Asynchronously encodes the specified byte array into a String using the Base64 encoding scheme. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEncodeToStringBase64004", 0, async function () { - let that = new util.Base64Helper(); - let array = new Uint8Array([168, 174, 155, 255]); - that.encodeToString(array).then((val) => { - expect(val).assertEqual("qK6b/w=="); - }); - }); - - /** - * @tc.number: TEST_ENCODE_TO_STRING_BASE64_005 - * @tc.name : testEncodeToStringBase64005 - * @tc.desc : Asynchronously encodes the specified byte array into a String using the Base64 encoding scheme. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEncodeToStringBase64005", 0, async function () { - let that = new util.Base64Helper(); - let array = new Uint8Array([66, 97, 115, 101, 54, 52]); - that.encodeToString(array).then((val) => { - expect(val).assertEqual("QmFzZTY0"); - }); - }); - - /** - * @tc.number: TEST_DECODE_BASE64_001 - * @tc.name : testDecodeBase64001 - * @tc.desc : Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or input u8 - array into a newly allocated u8 array. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testDecodeBase64001", 0, async function () { - let that = new util.Base64Helper(); - let buff = "czEz"; - let array = new Uint8Array([115, 49, 51]); - that.decode(buff).then((val) => { - for (let i = 0; i < array.length; i++) { - expect(val[i]).assertEqual(array[i]); - } - }); - }); - - /** - * @tc.number: TEST_DECODE_BASE64_002 - * @tc.name : testDecodeBase64002 - * @tc.desc : Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or input u8 - array into a newly allocated u8 array. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testDecodeBase64002", 0, async function () { - let that = new util.Base64Helper(); - let buff = "QmFzZTY0IE5vZGUuanM="; - let array = new Uint8Array([66, 97, 115, 101, 54, 52, 32, 78, 111, 100, 101, 46, 106, 115]); - that.decode(buff).then((val) => { - for (let i = 0; i < array.length; i++) { - expect(val[i]).assertEqual(array[i]); - } - }); - }); - - /** - * @tc.number: TEST_DECODE_BASE64_003 - * @tc.name : testDecodeBase64003 - * @tc.desc : Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or input u8 - array into a newly allocated u8 array. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testDecodeBase64003", 0, async function () { - let that = new util.Base64Helper(); - let buff = "QmFzZTY0IEVuY29kaW5nIGluIE5vZGUuanM="; - let array = new Uint8Array([66, 97, 115, 101, 54, 52, 32, 69, 110, 99, 111, 100, 105, 110, 103, 32, 105, 110, 32, 78, 111, 100, 101, 46, 106, 115]); - that.decode(buff).then((val) => { - for (let i = 0; i < array.length; i++) { - expect(val[i]).assertEqual(array[i]); - } - }); - }); - - /** - * @tc.number: TEST_DECODE_BASE64_004 - * @tc.name : testDecodeBase64004 - * @tc.desc : Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or input u8 - array into a newly allocated u8 array. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testDecodeBase64004", 0, async function () { - let that = new util.Base64Helper(); - let buff = "qK6b/w=="; - let array = new Uint8Array([168, 174, 155, 255]); - that.decode(buff).then((val) => { - for (let i = 0; i < array.length; i++) { - expect(val[i]).assertEqual(array[i]); - } - }); - }); - - /** - * @tc.number: TEST_DECODE_BASE64_005 - * @tc.name : testDecodeBase64005 - * @tc.desc : Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or input u8 - array into a newly allocated u8 array. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testDecodeBase64005", 0, async function () { - let that = new util.Base64Helper(); - let buff = "QmFzZTY0"; - let rarray = new Uint8Array([66, 97, 115, 101, 54, 52]); - that.decode(buff).then((val) => { - for (let i = 0; i < rarray.length; i++) { - expect(val[i]).assertEqual(rarray[i]); - } - }); - }); - - /** - * @tc.number: TEST_DECODE_BASE64_006 - * @tc.name : testDecodeBase64006 - * @tc.desc : Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or input u8 - array into a newly allocated u8 array. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testDecodeBase64006", 0, async function () { - let that = new util.Base64Helper(); - let array = new Uint8Array([99, 122, 69, 122]); - let rarray = new Uint8Array([115, 49, 51]); - that.decode(array).then((val) => { - for (let i = 0; i < rarray.length; i++) { - expect(val[i]).assertEqual(rarray[i]); - } - }); - }); - - /** - * @tc.number: TEST_DECODE_BASE64_007 - * @tc.name : testDecodeBase64007 - * @tc.desc : Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or input u8 - array into a newly allocated u8 array. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testDecodeBase64007", 0, async function () { - let that = new util.Base64Helper(); - let array = new Uint8Array([81, 109, 70, 122, 90, 84, 89, 48, 73, 69, 53, 118, 90, 71, 85, 117, 97, 110, 77, 61]); - let rarray = new Uint8Array([66, 97, 115, 101, 54, 52, 32, 78, 111, 100, 101, 46, 106, 115]); - that.decode(array).then((val) => { - for (let i = 0; i < rarray.length; i++) { - expect(val[i]).assertEqual(rarray[i]); - } - }); - }); - - /** - * @tc.number: TEST_DECODE_BASE64_008 - * @tc.name : testDecodeBase64008 - * @tc.desc : Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or input u8 - array into a newly allocated u8 array. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testDecodeBase64008", 0, async function () { - let that = new util.Base64Helper(); - let array = new Uint8Array([81, 109, 70, 122, 90, 84, 89, 48, 73, 69, 86, 117, 89, 50, 57, 107, 97, 87, 53, 110, 73, 71, 108, 117, 73, 69, 53, 118, 90, 71, 85, 117, 97, 110, 77, 61]); - let rarray = new Uint8Array([66, 97, 115, 101, 54, 52, 32, 69, 110, 99, 111, 100, 105, 110, 103, 32, 105, 110, 32, 78, 111, 100, 101, 46, 106, 115]); - that.decode(array).then((val) => { - for (let i = 0; i < rarray.length; i++) { - expect(val[i]).assertEqual(rarray[i]); - } - }); - }); - - /** - * @tc.number: TEST_DECODE_BASE64_009 - * @tc.name : testDecodeBase64009 - * @tc.desc : Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or input u8 - array into a newly allocated u8 array. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testDecodeBase64009", 0, async function () { - let that = new util.Base64Helper(); - let array = new Uint8Array([113, 75, 54, 98, 47, 119, 61, 61]); - let rarray = new Uint8Array([168, 174, 155, 255]); - that.decode(array).then((val) => { - for (let i = 0; i < rarray.length; i++) { - expect(val[i]).assertEqual(rarray[i]); - } - }); - }); - - /** - * @tc.number: TEST_DECODE_BASE64_010 - * @tc.name : testDecodeBase64010 - * @tc.desc : Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or input u8 - array into a newly allocated u8 array. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testDecodeBase64010", 0, async function () { - let that = new util.Base64Helper(); - let array = new Uint8Array([81, 109, 70, 122, 90, 84, 89, 48]); - let rarray = new Uint8Array([66, 97, 115, 101, 54, 52]); - that.decode(array).then((val) => { - for (let i = 0; i < rarray.length; i++) { - expect(val[i]).assertEqual(rarray[i]); - } - }); - }); - }); -} diff --git a/commonlibrary/crossplatform/commonlibraryutiletstest/src/main/module.json b/commonlibrary/crossplatform/commonlibraryutiletstest/src/main/module.json deleted file mode 100644 index a4443e713..000000000 --- a/commonlibrary/crossplatform/commonlibraryutiletstest/src/main/module.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "module": { - "name": "entry_test", - "type": "feature", - "description": "$string:module_test_desc", - "mainElement": "TestAbility", - "deviceTypes": [ - "phone" - ], - "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", - "skills": [ - { - "actions": [ - "action.system.home" - ], - "entities": [ - "entity.system.home" - ] - } - ] - } - ] - } -} diff --git a/commonlibrary/crossplatform/commonlibraryutiletstest/src/main/resources/base/element/color.json b/commonlibrary/crossplatform/commonlibraryutiletstest/src/main/resources/base/element/color.json deleted file mode 100644 index 3c712962d..000000000 --- a/commonlibrary/crossplatform/commonlibraryutiletstest/src/main/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/commonlibrary/crossplatform/commonlibraryutiletstest/src/main/resources/base/element/string.json b/commonlibrary/crossplatform/commonlibraryutiletstest/src/main/resources/base/element/string.json deleted file mode 100644 index 65d8fa5a7..000000000 --- a/commonlibrary/crossplatform/commonlibraryutiletstest/src/main/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/commonlibrary/crossplatform/commonlibraryutiletstest/src/main/resources/base/media/icon.png b/commonlibrary/crossplatform/commonlibraryutiletstest/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6BLrPFWk?s;$LOP{GmJpBl$qoSA!PUg~PA65-S00{{S`XKG6NkG0RgjEntPrmV+?0|00mu7;+5 zrdpa{2QLqPJ4Y{j7=Mrl{BaxrkdY69+c~(w{Fv-v&aR%aEI&JYSeRTLWm!zbv;?)_ ziZB;fwGbbeL5Q}YLx`J$lp~A09KK8t_z}PZ=4ZzgdeKtgoc+o5EvN9A1K1_<>M?MBqb#!ASf&# zEX?<)!RH(7>1P+j=jqG(58}TVN-$psA6K}atCuI!KTJD&FMmH-78ZejBm)0qc{ESp z|LuG1{QnBUJRg_E=h1#XMWt2%fcoN@l7eAS!Es?Q+;XsRNPhiiE=@AqlLkJzF`O18 zbsbSmKN=aaq8k3NFYZfDWpKmM!coBU0(X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?Qb&vn(+W9f8Se+O_F?%XQTg~0m#dqJT-}~PB^;yULb9!?UlkP3M zXjmQUTZ3N-+UV7u_oc7T`J@C&aA1~X&$9Oh(EL=|IQT^!dPV8Ft4WRU4ln;sc1?q)SvhB0#GjHtT5~rHBeDEdb@-+bE7N&f8EUGWMl~s6rN2b8rl0BW0%=-PQ6|Y`i_3|jy s0sH(b+ycC1!;8IrbFNN17O^l#vc`Tc-C*zIDDE>O=l)mteffz00l6(*hyVZp diff --git a/commonlibrary/crossplatform/commonlibraryxmletstest/src/main/ets/TestAbility/TestAbility.ets b/commonlibrary/crossplatform/commonlibraryxmletstest/src/main/ets/TestAbility/TestAbility.ets deleted file mode 100644 index a535e83f7..000000000 --- a/commonlibrary/crossplatform/commonlibraryxmletstest/src/main/ets/TestAbility/TestAbility.ets +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import UIAbility from '@ohos.app.ability.UIAbility'; -import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; -import hilog from '@ohos.hilog'; -import { Hypium } from '@ohos/hypium'; -import testsuite from '../test/List.test'; -import window from '@ohos.window'; - -export default class TestAbility extends UIAbility { - onCreate(want, 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) ?? ''); - var abilityDelegator: any - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var abilityDelegatorArguments: any - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - hilog.info(0x0000, 'testTag', '%{public}s', 'start run testcase!!!'); - Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) - } - - onDestroy() { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onDestroy'); - } - - onWindowStageCreate(windowStage: window.WindowStage) { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageCreate'); - windowStage.loadContent('TestAbility/pages/Index', (err, data) => { - 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. Data: %{public}s', - JSON.stringify(data) ?? ''); - }); - } - - 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/commonlibrary/crossplatform/commonlibraryxmletstest/src/main/ets/TestAbility/pages/Index.ets b/commonlibrary/crossplatform/commonlibraryxmletstest/src/main/ets/TestAbility/pages/Index.ets deleted file mode 100644 index dbc536ca8..000000000 --- a/commonlibrary/crossplatform/commonlibraryxmletstest/src/main/ets/TestAbility/pages/Index.ets +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import hilog from '@ohos.hilog'; - -@Entry -@Component -struct Index { - aboutToAppear() { - hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility index aboutToAppear'); - } - @State message: string = 'Hello World' - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Button() { - Text('next page') - .fontSize(20) - .fontWeight(FontWeight.Bold) - }.type(ButtonType.Capsule) - .margin({ - top: 20 - }) - .backgroundColor('#0D9FFB') - .width('35%') - .height('5%') - .onClick(()=>{ - }) - } - .width('100%') - } - .height('100%') - } - } \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryxmletstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/commonlibrary/crossplatform/commonlibraryxmletstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts deleted file mode 100644 index 92a16d84e..000000000 --- a/commonlibrary/crossplatform/commonlibraryxmletstest/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts +++ /dev/null @@ -1,49 +0,0 @@ -import hilog from '@ohos.hilog'; -import TestRunner from '@ohos.application.testRunner'; -import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; - -var abilityDelegator = undefined -var abilityDelegatorArguments = undefined - -async function onAbilityCreateCallback() { - hilog.info(0x0000, 'testTag', '%{public}s', 'onAbilityCreateCallback'); -} - -async function addAbilityMonitorCallback(err: any) { - 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() { - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun run'); - abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() - var testAbilityName = abilityDelegatorArguments.bundleName + '.TestAbility' - let lMonitor = { - abilityName: testAbilityName, - onAbilityCreate: onAbilityCreateCallback, - }; - abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) - var cmd = 'aa start -d 0 -a TestAbility' + ' -b ' + abilityDelegatorArguments.bundleName - var debug = abilityDelegatorArguments.parameters['-D'] - if (debug == 'true') - { - cmd += ' -D' - } - hilog.info(0x0000, 'testTag', 'cmd : %{public}s', cmd); - abilityDelegator.executeShellCommand(cmd, - (err: any, d: any) => { - hilog.info(0x0000, 'testTag', 'executeShellCommand : err : %{public}s', JSON.stringify(err) ?? ''); - hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.stdResult ?? ''); - hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.exitCode ?? ''); - }) - hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun end'); - } -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryxmletstest/src/main/ets/test/List.test.ets b/commonlibrary/crossplatform/commonlibraryxmletstest/src/main/ets/test/List.test.ets deleted file mode 100644 index 09c4f9aa1..000000000 --- a/commonlibrary/crossplatform/commonlibraryxmletstest/src/main/ets/test/List.test.ets +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import xmlTest from './xml.test' -import xmlParseOptionTest from './xmlEventType.test' -import xmlEventTypeTest from './xmlParseOption.test' - -export default function testsuite() { - xmlTest(); - xmlParseOptionTest(); - xmlEventTypeTest(); -} \ No newline at end of file diff --git a/commonlibrary/crossplatform/commonlibraryxmletstest/src/main/ets/test/xml.test.ets b/commonlibrary/crossplatform/commonlibraryxmletstest/src/main/ets/test/xml.test.ets deleted file mode 100644 index 6aebddc1d..000000000 --- a/commonlibrary/crossplatform/commonlibraryxmletstest/src/main/ets/test/xml.test.ets +++ /dev/null @@ -1,1667 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import { - describe, - beforeAll, - beforeEach, - afterEach, - afterAll, - it, - expect, -} from "@ohos/hypium"; -import xml from "@ohos.xml"; -import util from "@ohos.util"; -export default function XmlSerializerXmlPullParserTest() { - describe("XmlSerializerXmlPullParserTest", function () { - /** - * @tc.number: TEST_CONSTRUCTOR_001 - * @tc.name : testConstructor001 - * @tc.desc : Create an xml instance. For example: let xml = new xml.XmlSerializer(arrayBuffer). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testConstructor001", 0, function () { - try { - const myMAX = 2048; - var arrayBuffer = new ArrayBuffer(myMAX); - var thatSer = new xml.XmlSerializer(arrayBuffer); - expect(thatSer != null).assertEqual(true); - } catch (err) { - console.log("testConstructor001 meet error: " + err); - } - }); - - /** - * @tc.number: TEST_CONSTRUCTOR_002 - * @tc.name : testConstructor002 - * @tc.desc : Create an xml instance. For example: let xml = new xml.XmlSerializer(arrayBuffer, encoding). - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testConstructor002", 0, function () { - try { - const myMAX = 2048; - var arrayBuffer = new ArrayBuffer(myMAX); - var thatSer = new xml.XmlSerializer(arrayBuffer, "utf-8"); - expect(thatSer != null).assertEqual(true); - } catch (err) { - console.log("testConstructor001 meet error: " + err); - } - }); - - /** - * @tc.number: TEST_SET_ATTRIBUTES_001 - * @tc.name : testsetAttributes001 - * @tc.desc : Write an attribute. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSetAttributes001", 0, function () { - const myMAX = 2048; - var arrayBuffer = new ArrayBuffer(myMAX); - var thatSer = new xml.XmlSerializer(arrayBuffer); - thatSer.startElement("note"); - thatSer.setAttributes("importance1", "high1"); - thatSer.endElement(); - var result = ''; - var view = new Uint8Array(arrayBuffer); - var view1 = ""; - for (var i = 0; i < result.length; ++i) { - view1 = view1 + String.fromCodePoint(view[i]); - } - expect(view1).assertEqual(result); - }); - - /** - * @tc.number: TEST_SET_ATTRIBUTES_002 - * @tc.name : testsetAttributes002 - * @tc.desc : Write an attribute. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSetAttributes002", 0, function () { - const myMAX = 2048; - var arrayBuffer = new ArrayBuffer(myMAX); - var thatSer = new xml.XmlSerializer(arrayBuffer); - thatSer.startElement("note"); - thatSer.setAttributes("importance1", "high1"); - thatSer.setAttributes("importance2", "high2"); - thatSer.endElement(); - var result = ''; - var view = new Uint8Array(arrayBuffer); - var view1 = ""; - for (var i = 0; i < result.length; ++i) { - view1 = view1 + String.fromCodePoint(view[i]); - } - expect(view1).assertEqual(result); - }); - - /** - * @tc.number: TEST_SET_ATTRIBUTES_003 - * @tc.name : testsetAttributes003 - * @tc.desc : Write an attribute. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSetAttributes003", 0, function () { - const myMAX = 2048; - var arrayBuffer = new ArrayBuffer(myMAX); - var thatSer = new xml.XmlSerializer(arrayBuffer); - thatSer.startElement("note"); - thatSer.setAttributes("importance1", "high1"); - thatSer.setAttributes("importance2", "high2"); - thatSer.setAttributes("importance3", "high3"); - thatSer.endElement(); - var result = - ''; - var view = new Uint8Array(arrayBuffer); - var view1 = ""; - for (var i = 0; i < result.length; ++i) { - view1 = view1 + String.fromCodePoint(view[i]); - } - expect(view1).assertEqual(result); - }); - - /** - * @tc.number: TEST_SET_ATTRIBUTES_004 - * @tc.name : testsetAttributes004 - * @tc.desc : Write an attribute. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSetAttributes004", 0, function () { - const myMAX = 2048; - var arrayBuffer = new ArrayBuffer(myMAX); - var thatSer = new xml.XmlSerializer(arrayBuffer); - thatSer.startElement("note"); - thatSer.setAttributes("importance1", "high1"); - thatSer.setAttributes("importance2", "high2"); - thatSer.setAttributes("importance3", "high3"); - thatSer.setAttributes("importance4", "high4"); - thatSer.endElement(); - var result = - ''; - var view = new Uint8Array(arrayBuffer); - var view1 = ""; - for (var i = 0; i < result.length; ++i) { - view1 = view1 + String.fromCodePoint(view[i]); - } - expect(view1).assertEqual(result); - }); - - /** - * @tc.number: TEST_ADD_EMPTY_ELEMENT_001 - * @tc.name : testAddEmptyElement001 - * @tc.desc : Add an empty element. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAddEmptyElement001", 0, function () { - const myMAX = 2048; - var arrayBuffer = new ArrayBuffer(myMAX); - var thatSer = new xml.XmlSerializer(arrayBuffer); - thatSer.startElement("note"); - thatSer.addEmptyElement("a"); - thatSer.endElement(); - var result = "\r\n \r\n"; - var view = new Uint8Array(arrayBuffer); - var view1 = ""; - for (var i = 0; i < result.length; ++i) { - view1 = view1 + String.fromCodePoint(view[i]); - } - expect(view1).assertEqual(result); - }); - - /** - * @tc.number: TEST_ADD_EMPTY_ELEMENT_002 - * @tc.name : testAddEmptyElement002 - * @tc.desc : Add an empty element. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAddEmptyElement002", 0, function () { - const myMAX = 2048; - var arrayBuffer = new ArrayBuffer(myMAX); - var thatSer = new xml.XmlSerializer(arrayBuffer); - thatSer.startElement("note"); - thatSer.endElement(); - thatSer.addEmptyElement("b"); - var result = "\r\n"; - var view = new Uint8Array(arrayBuffer); - var view1 = ""; - for (var i = 0; i < result.length; ++i) { - view1 = view1 + String.fromCodePoint(view[i]); - } - expect(view1).assertEqual(result); - }); - - /** - * @tc.number: TEST_ADD_EMPTY_ELEMENT_003 - * @tc.name : testAddEmptyElement003 - * @tc.desc : Add an empty element. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAddEmptyElement003", 0, function () { - const myMAX = 2048; - var arrayBuffer = new ArrayBuffer(myMAX); - var thatSer = new xml.XmlSerializer(arrayBuffer); - thatSer.addEmptyElement("c"); - thatSer.startElement("note"); - thatSer.endElement(); - var result = "\r\n"; - var view = new Uint8Array(arrayBuffer); - var view1 = ""; - for (var i = 0; i < result.length; ++i) { - view1 = view1 + String.fromCodePoint(view[i]); - } - expect(view1).assertEqual(result); - }); - - /** - * @tc.number: TEST_ADD_EMPTY_ELEMENT_004 - * @tc.name : testAddEmptyElement004 - * @tc.desc : Add an empty element. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAddEmptyElement004", 0, function () { - const myMAX = 2048; - var arrayBuffer = new ArrayBuffer(myMAX); - var thatSer = new xml.XmlSerializer(arrayBuffer); - thatSer.addEmptyElement("d"); - var result = ""; - var view = new Uint8Array(arrayBuffer); - var view1 = ""; - for (var i = 0; i < result.length; ++i) { - view1 = view1 + String.fromCodePoint(view[i]); - } - expect(view1).assertEqual(result); - }); - - /** - * @tc.number: TEST_ADD_EMPTY_ELEMENT_005 - * @tc.name : testAddEmptyElement005 - * @tc.desc : Add an empty element. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testAddEmptyElement005", 0, function () { - const myMAX = 2048; - var arrayBuffer = new ArrayBuffer(myMAX); - var thatSer = new xml.XmlSerializer(arrayBuffer); - thatSer.startElement("note"); - thatSer.addEmptyElement("c"); - thatSer.addEmptyElement("d"); - thatSer.endElement(); - var result = "\r\n \r\n \r\n"; - var view = new Uint8Array(arrayBuffer); - var view1 = ""; - for (var i = 0; i < result.length; ++i) { - view1 = view1 + String.fromCodePoint(view[i]); - } - expect(view1).assertEqual(result); - }); - - /** - * @tc.number: TEST_SET_DECLARATION_001 - * @tc.name : testSetDeclaration001 - * @tc.desc : Writes xml declaration with encoding. For example: . - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSetDeclaration001", 0, function () { - var arrayBuffer = new ArrayBuffer(2048); - var thatSer = new xml.XmlSerializer(arrayBuffer, "utf-8"); - thatSer.setDeclaration(); - var result = ''; - var view = new Uint8Array(arrayBuffer); - var view1 = ""; - for (var i = 0; i < result.length; ++i) { - view1 = view1 + String.fromCodePoint(view[i]); - } - expect(view1).assertEqual(result); - }); - - /** - * @tc.number: TEST_START_ELEMENT_001 - * @tc.name : testStartElement001 - * @tc.desc : Writes an elemnet start tag with the given name. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testStartElement001", 0, function () { - const myMAX = 2048; - var arrayBuffer = new ArrayBuffer(myMAX); - var thatSer = new xml.XmlSerializer(arrayBuffer); - thatSer.startElement("note1"); - thatSer.endElement(); - var result = ""; - var view = new Uint8Array(arrayBuffer); - var view1 = ""; - for (var i = 0; i < result.length; ++i) { - view1 = view1 + String.fromCodePoint(view[i]); - } - expect(view1).assertEqual(result); - }); - - /** - * @tc.number: TEST_START_ELEMENT_002 - * @tc.name : testStartElement002 - * @tc.desc : Writes an elemnet start tag with the given name. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testStartElement002", 0, function () { - const myMAX = 2048; - var arrayBuffer = new ArrayBuffer(myMAX); - var thatSer = new xml.XmlSerializer(arrayBuffer); - thatSer.startElement("note1"); - thatSer.endElement(); - thatSer.startElement("note2"); - thatSer.endElement(); - var result = "\r\n"; - var view = new Uint8Array(arrayBuffer); - var view1 = ""; - for (var i = 0; i < result.length; ++i) { - view1 = view1 + String.fromCodePoint(view[i]); - } - expect(view1).assertEqual(result); - }); - - /** - * @tc.number: TEST_START_ELEMENT_003 - * @tc.name : testStartElement003 - * @tc.desc : Writes an elemnet start tag with the given name. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testStartElement003", 0, function () { - const myMAX = 2048; - var arrayBuffer = new ArrayBuffer(myMAX); - var thatSer = new xml.XmlSerializer(arrayBuffer); - thatSer.startElement("note1"); - thatSer.startElement("note2"); - thatSer.endElement(); - thatSer.endElement(); - var result = "\r\n \r\n"; - var view = new Uint8Array(arrayBuffer); - var view1 = ""; - for (var i = 0; i < result.length; ++i) { - view1 = view1 + String.fromCodePoint(view[i]); - } - expect(view1).assertEqual(result); - }); - - /** - * @tc.number: TEST_START_ELEMENT_004 - * @tc.name : testStartElement004 - * @tc.desc : Writes an elemnet start tag with the given name. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testStartElement004", 0, function () { - const myMAX = 2048; - var arrayBuffer = new ArrayBuffer(myMAX); - var thatSer = new xml.XmlSerializer(arrayBuffer); - thatSer.startElement("note1"); - thatSer.startElement("note2"); - thatSer.startElement("note3"); - thatSer.endElement(); - thatSer.endElement(); - thatSer.endElement(); - var result = - "\r\n \r\n \r\n \r\n"; - var view = new Uint8Array(arrayBuffer); - var view1 = ""; - for (var i = 0; i < result.length; ++i) { - view1 = view1 + String.fromCodePoint(view[i]); - } - expect(view1).assertEqual(result); - }); - - /** - * @tc.number: TEST_START_ELEMENT_005 - * @tc.name : testStartElement005 - * @tc.desc : Writes an elemnet start tag with the given name. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testStartElement005", 0, function () { - const myMAX = 2048; - var arrayBuffer = new ArrayBuffer(myMAX); - var thatSer = new xml.XmlSerializer(arrayBuffer); - thatSer.startElement("note1"); - thatSer.startElement("note2"); - thatSer.endElement(); - thatSer.startElement("note3"); - thatSer.endElement(); - thatSer.endElement(); - var result = "\r\n \r\n \r\n"; - var view = new Uint8Array(arrayBuffer); - var view1 = ""; - for (var i = 0; i < result.length; ++i) { - view1 = view1 + String.fromCodePoint(view[i]); - } - expect(view1).assertEqual(result); - }); - - /** - * @tc.number: TEST_END_ELEMENT_001 - * @tc.name : testEndElement001 - * @tc.desc : Writes end tag of the element. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEndElement001", 0, function () { - const myMAX = 2048; - var arrayBuffer = new ArrayBuffer(myMAX); - var thatSer = new xml.XmlSerializer(arrayBuffer); - thatSer.startElement("note"); - thatSer.endElement(); - var result = ""; - var view = new Uint8Array(arrayBuffer); - var view1 = ""; - for (var i = 0; i < result.length; ++i) { - view1 = view1 + String.fromCodePoint(view[i]); - } - expect(view1).assertEqual(result); - }); - - /** - * @tc.number: TEST_END_ELEMENT_002 - * @tc.name : testEndElement002 - * @tc.desc : Writes end tag of the element. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEndElement002", 0, function () { - const myMAX = 2048; - var arrayBuffer = new ArrayBuffer(myMAX); - var thatSer = new xml.XmlSerializer(arrayBuffer); - thatSer.startElement("note"); - thatSer.setAttributes("importance", "high"); - thatSer.endElement(); - var result = ''; - var view = new Uint8Array(arrayBuffer); - var view1 = ""; - for (var i = 0; i < result.length; ++i) { - view1 = view1 + String.fromCodePoint(view[i]); - } - expect(view1).assertEqual(result); - }); - - /** - * @tc.number: TEST_END_ELEMENT_003 - * @tc.name : testEndElement003 - * @tc.desc : Writes end tag of the element. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEndElement003", 0, function () { - const myMAX = 2048; - var arrayBuffer = new ArrayBuffer(myMAX); - var thatSer = new xml.XmlSerializer(arrayBuffer); - thatSer.startElement("note"); - thatSer.setAttributes("impo", "hi"); - thatSer.endElement(); - var result = ''; - var view = new Uint8Array(arrayBuffer); - var view1 = ""; - for (var i = 0; i < result.length; ++i) { - view1 = view1 + String.fromCodePoint(view[i]); - } - expect(view1).assertEqual(result); - }); - - /** - * @tc.number: TEST_END_ELEMENT_004 - * @tc.name : testEndElement004 - * @tc.desc : Writes end tag of the element. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEndElement004", 0, function () { - const myMAX = 2048; - var arrayBuffer = new ArrayBuffer(myMAX); - var thatSer = new xml.XmlSerializer(arrayBuffer); - thatSer.startElement("note1"); - thatSer.startElement("note2"); - thatSer.endElement(); - thatSer.endElement(); - var result = "\r\n \r\n"; - var view = new Uint8Array(arrayBuffer); - var view1 = ""; - for (var i = 0; i < result.length; ++i) { - view1 = view1 + String.fromCodePoint(view[i]); - } - expect(view1).assertEqual(result); - }); - - /** - * @tc.number: TEST_END_ELEMENT_005 - * @tc.name : testEndElement005 - * @tc.desc : Writes end tag of the element. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testEndElement005", 0, function () { - const myMAX = 2048; - var arrayBuffer = new ArrayBuffer(myMAX); - var thatSer = new xml.XmlSerializer(arrayBuffer); - thatSer.startElement("note2"); - thatSer.setAttributes("importance", "high"); - thatSer.endElement(); - var result = ''; - var view = new Uint8Array(arrayBuffer); - var view1 = ""; - for (var i = 0; i < result.length; ++i) { - view1 = view1 + String.fromCodePoint(view[i]); - } - expect(view1).assertEqual(result); - }); - - /** - * @tc.number: TEST_SET_NAMESPECE_001 - * @tc.name : testSetNamespace001 - * @tc.desc : Writes the namespace of the current element tag. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSetNamespace001", 0, function () { - const myMAX = 2048; - var arrayBuffer = new ArrayBuffer(myMAX); - var thatSer = new xml.XmlSerializer(arrayBuffer); - thatSer.setDeclaration(); - thatSer.setNamespace("h", "http://www.w3.org/TR/html4/"); - thatSer.startElement("note"); - thatSer.endElement(); - var result = - '\r\n'; - var view = new Uint8Array(arrayBuffer); - var view1 = ""; - for (var i = 0; i < result.length; ++i) { - view1 = view1 + String.fromCodePoint(view[i]); - } - expect(view1).assertEqual(result); - }); - - /** - * @tc.number: TEST_SET_NAMESPECE_002 - * @tc.name : testSetNamespace002 - * @tc.desc : Writes the namespace of the current element tag. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSetNamespace002", 0, function () { - const myMAX = 2048; - var arrayBuffer = new ArrayBuffer(myMAX); - var thatSer = new xml.XmlSerializer(arrayBuffer); - thatSer.setDeclaration(); - thatSer.setNamespace("b", "http://www.w3.org/TR/html4/"); - thatSer.startElement("note"); - thatSer.endElement(); - var result = - '\r\n'; - var view = new Uint8Array(arrayBuffer); - var view1 = ""; - for (var i = 0; i < result.length; ++i) { - view1 = view1 + String.fromCodePoint(view[i]); - } - expect(view1).assertEqual(result); - }); - - /** - * @tc.number: TEST_SET_NAMESPECE_003 - * @tc.name : testSetNamespace003 - * @tc.desc : Writes the namespace of the current element tag. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSetNamespace003", 0, function () { - const myMAX = 2048; - var arrayBuffer = new ArrayBuffer(myMAX); - var thatSer = new xml.XmlSerializer(arrayBuffer); - thatSer.setDeclaration(); - thatSer.setNamespace("h", "http://www.111/"); - thatSer.startElement("note"); - thatSer.endElement(); - var result = - '\r\n'; - var view = new Uint8Array(arrayBuffer); - var view1 = ""; - for (var i = 0; i < result.length; ++i) { - view1 = view1 + String.fromCodePoint(view[i]); - } - expect(view1).assertEqual(result); - }); - - /** - * @tc.number: TEST_SET_NAMESPECE_004 - * @tc.name : testSetNamespace004 - * @tc.desc : Writes the namespace of the current element tag. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSetNamespace004", 0, function () { - const myMAX = 2048; - var arrayBuffer = new ArrayBuffer(myMAX); - var thatSer = new xml.XmlSerializer(arrayBuffer); - thatSer.setDeclaration(); - thatSer.setNamespace("h", "http://www.w3.org/TR/html4/"); - thatSer.startElement("note1"); - thatSer.startElement("note2"); - thatSer.endElement(); - thatSer.endElement(); - var result = - '\r\n' + - "\r\n \r\n"; - var view = new Uint8Array(arrayBuffer); - var view1 = ""; - for (var i = 0; i < result.length; ++i) { - view1 = view1 + String.fromCodePoint(view[i]); - } - expect(view1).assertEqual(result); - }); - - /** - * @tc.number: TEST_SET_COMMENT_001 - * @tc.name : testSetComment001 - * @tc.desc : Writes the comment. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSetComment001", 0, function () { - const myMAX = 2048; - var arrayBuffer = new ArrayBuffer(myMAX); - var thatSer = new xml.XmlSerializer(arrayBuffer); - thatSer.startElement("note"); - thatSer.setComment("Hi!"); - thatSer.endElement(); - var result = "\r\n \r\n"; - var view = new Uint8Array(arrayBuffer); - var view1 = ""; - for (var i = 0; i < result.length; ++i) { - view1 = view1 + String.fromCodePoint(view[i]); - } - expect(view1).assertEqual(result); - }); - - /** - * @tc.number: TEST_SET_COMMENT_002 - * @tc.name : testSetComment002 - * @tc.desc : Writes the comment. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSetComment002", 0, function () { - const myMAX = 2048; - var arrayBuffer = new ArrayBuffer(myMAX); - var thatSer = new xml.XmlSerializer(arrayBuffer); - thatSer.startElement("note"); - thatSer.setComment("Hello, World!"); - thatSer.endElement(); - var result = "\r\n \r\n"; - var view = new Uint8Array(arrayBuffer); - var view1 = ""; - for (var i = 0; i < result.length; ++i) { - view1 = view1 + String.fromCodePoint(view[i]); - } - expect(view1).assertEqual(result); - }); - - /** - * @tc.number: TEST_SET_COMMENT_003 - * @tc.name : testSetComment003 - * @tc.desc : Writes the comment. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSetComment003", 0, function () { - const myMAX = 2048; - var arrayBuffer = new ArrayBuffer(myMAX); - var thatSer = new xml.XmlSerializer(arrayBuffer); - thatSer.setComment("Hello, World!"); - var result = ""; - var view = new Uint8Array(arrayBuffer); - var view1 = ""; - for (var i = 0; i < result.length; ++i) { - view1 = view1 + String.fromCodePoint(view[i]); - } - expect(view1).assertEqual(result); - }); - - /** - * @tc.number: TEST_SET_COMMENT_005 - * @tc.name : testSetComment005 - * @tc.desc : Writes the comment. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSetComment004", 0, function () { - const myMAX = 2048; - var arrayBuffer = new ArrayBuffer(myMAX); - var thatSer = new xml.XmlSerializer(arrayBuffer); - thatSer.setComment("Hello, World!"); - thatSer.startElement("note"); - thatSer.endElement(); - var result = "\r\n"; - var view = new Uint8Array(arrayBuffer); - var view1 = ""; - for (var i = 0; i < result.length; ++i) { - view1 = view1 + String.fromCodePoint(view[i]); - } - expect(view1).assertEqual(result); - }); - - /** - * @tc.number: TEST_SET_CDATA_001 - * @tc.name : testSetCDATA001 - * @tc.desc : Writes the CDATA. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSetCDATA001", 0, function () { - const myMAX = 2048; - var arrayBuffer = new ArrayBuffer(myMAX); - var thatSer = new xml.XmlSerializer(arrayBuffer); - thatSer.setCDATA("root SYSTEM"); - var result = ""; - var view = new Uint8Array(arrayBuffer); - var view1 = ""; - for (var i = 0; i < result.length; ++i) { - view1 = view1 + String.fromCodePoint(view[i]); - } - expect(view1).assertEqual(result); - }); - - /** - * @tc.number: TEST_SET_CDATA_002 - * @tc.name : testSetCDATA002 - * @tc.desc : Writes the CDATA. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSetCDATA002", 0, function () { - const myMAX = 2048; - var arrayBuffer = new ArrayBuffer(myMAX); - var thatSer = new xml.XmlSerializer(arrayBuffer); - thatSer.setCDATA('root SYSTEM "http://www.test.org/test.dtd"'); - var result = ''; - var view = new Uint8Array(arrayBuffer); - var view1 = ""; - for (var i = 0; i < result.length; ++i) { - view1 = view1 + String.fromCodePoint(view[i]); - } - expect(view1).assertEqual(result); - }); - - /** - * @tc.number: TEST_SET_CDATA_003 - * @tc.name : testSetCDATA003 - * @tc.desc : Writes the CDATA. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSetCDATA003", 0, function () { - const myMAX = 2048; - var arrayBuffer = new ArrayBuffer(myMAX); - var thatSer = new xml.XmlSerializer(arrayBuffer); - thatSer.startElement("note"); - thatSer.endElement(); - thatSer.setCDATA('root SYSTEM "http://www.test.org/test.dtd"'); - var result = - '\r\n'; - var view = new Uint8Array(arrayBuffer); - var view1 = ""; - for (var i = 0; i < result.length; ++i) { - view1 = view1 + String.fromCodePoint(view[i]); - } - expect(view1).assertEqual(result); - }); - - /** - * @tc.number: TEST_SET_CDATA_004 - * @tc.name : testSetCDATA004 - * @tc.desc : Writes the CDATA. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSetCDATA004", 0, function () { - const myMAX = 2048; - var arrayBuffer = new ArrayBuffer(myMAX); - var thatSer = new xml.XmlSerializer(arrayBuffer); - thatSer.setCDATA('root SYSTEM "http://www.test.org/test.dtd"'); - thatSer.startElement("note"); - thatSer.endElement(); - var result = - '\r\n'; - var view = new Uint8Array(arrayBuffer); - var view1 = ""; - for (var i = 0; i < result.length; ++i) { - view1 = view1 + String.fromCodePoint(view[i]); - } - expect(view1).assertEqual(result); - }); - - /** - * @tc.number: TEST_SET_CDATA_005 - * @tc.name : testSetCDATA005 - * @tc.desc : Writes the CDATA. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSetCDATA005", 0, function () { - const myMAX = 2048; - var arrayBuffer = new ArrayBuffer(myMAX); - var thatSer = new xml.XmlSerializer(arrayBuffer); - thatSer.startElement("note"); - thatSer.setCDATA('root SYSTEM "http://www.test.org/test.dtd"'); - thatSer.endElement(); - var result = - '\r\n \r\n'; - var view = new Uint8Array(arrayBuffer); - var view1 = ""; - for (var i = 0; i < result.length; ++i) { - view1 = view1 + String.fromCodePoint(view[i]); - } - expect(view1).assertEqual(result); - }); - - /** - * @tc.number: TEST_SET_TEXT_001 - * @tc.name : testSetText001 - * @tc.desc : Writes the CDATA. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSetText001", 0, function () { - const myMAX = 2048; - var arrayBuffer = new ArrayBuffer(myMAX); - var thatSer = new xml.XmlSerializer(arrayBuffer); - thatSer.startElement("note"); - thatSer.setAttributes("importance", "high"); - thatSer.setText("Happy1"); - thatSer.endElement(); - var result = 'Happy1'; - var view = new Uint8Array(arrayBuffer); - var view1 = ""; - for (var i = 0; i < result.length; ++i) { - view1 = view1 + String.fromCodePoint(view[i]); - } - expect(view1).assertEqual(result); - }); - - /** - * @tc.number: TEST_SET_TEXT_002 - * @tc.name : testSetText002 - * @tc.desc : Writes the CDATA. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSetText002", 0, function () { - const myMAX = 2048; - var arrayBuffer = new ArrayBuffer(myMAX); - var thatSer = new xml.XmlSerializer(arrayBuffer); - thatSer.startElement("note"); - thatSer.setAttributes("importance", "high"); - thatSer.setText("Happy2"); - thatSer.endElement(); - var result = 'Happy2'; - var view = new Uint8Array(arrayBuffer); - var view1 = ""; - for (var i = 0; i < result.length; ++i) { - view1 = view1 + String.fromCodePoint(view[i]); - } - expect(view1).assertEqual(result); - }); - - /** - * @tc.number: TEST_SET_DOC_TYPE_001 - * @tc.name : testSetDocType001 - * @tc.desc : Writes the DOCTYPE. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSetDocType001", 0, function () { - const myMAX = 2048; - var arrayBuffer = new ArrayBuffer(myMAX); - var thatSer = new xml.XmlSerializer(arrayBuffer); - thatSer.setDocType("root SYSTEM"); - var result = ""; - var view = new Uint8Array(arrayBuffer); - var view1 = ""; - for (var i = 0; i < result.length; ++i) { - view1 = view1 + String.fromCodePoint(view[i]); - } - expect(view1).assertEqual(result); - }); - - /** - * @tc.number: TEST_SET_DOC_TYPE_002 - * @tc.name : testSetDocType002 - * @tc.desc : Writes the DOCTYPE. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSetDocType002", 0, function () { - const myMAX = 2048; - var arrayBuffer = new ArrayBuffer(myMAX); - var thatSer = new xml.XmlSerializer(arrayBuffer); - thatSer.setDocType('root SYSTEM "http://www.test.org/test.dtd"'); - var result = ''; - var view = new Uint8Array(arrayBuffer); - var view1 = ""; - for (var i = 0; i < result.length; ++i) { - view1 = view1 + String.fromCodePoint(view[i]); - } - expect(view1).assertEqual(result); - }); - - /** - * @tc.number: TEST_SET_DOC_TYPE_003 - * @tc.name : testSetDocType003 - * @tc.desc : Writes the DOCTYPE. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSetDocType003", 0, function () { - const myMAX = 2048; - var arrayBuffer = new ArrayBuffer(myMAX); - var thatSer = new xml.XmlSerializer(arrayBuffer); - thatSer.startElement("note"); - thatSer.endElement(); - thatSer.setDocType('root SYSTEM "http://www.test.org/test.dtd"'); - var result = - '\r\n'; - var view = new Uint8Array(arrayBuffer); - var view1 = ""; - for (var i = 0; i < result.length; ++i) { - view1 = view1 + String.fromCodePoint(view[i]); - } - expect(view1).assertEqual(result); - }); - - /** - * @tc.number: TEST_SET_DOC_TYPE_004 - * @tc.name : testSetDocType004 - * @tc.desc : Writes the DOCTYPE. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSetDocType004", 0, function () { - const myMAX = 2048; - var arrayBuffer = new ArrayBuffer(myMAX); - var thatSer = new xml.XmlSerializer(arrayBuffer); - thatSer.setDocType('root SYSTEM "http://www.test.org/test.dtd"'); - thatSer.startElement("note"); - thatSer.endElement(); - var result = - '\r\n'; - var view = new Uint8Array(arrayBuffer); - var view1 = ""; - for (var i = 0; i < result.length; ++i) { - view1 = view1 + String.fromCodePoint(view[i]); - } - expect(view1).assertEqual(result); - }); - - /** - * @tc.number: TEST_SET_DOC_TYPE_005 - * @tc.name : testSetDocType005 - * @tc.desc : Writes the DOCTYPE. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testSetDocType005", 0, function () { - const myMAX = 2048; - var arrayBuffer = new ArrayBuffer(myMAX); - var thatSer = new xml.XmlSerializer(arrayBuffer); - thatSer.startElement("note"); - thatSer.setDocType('root SYSTEM "http://www.test.org/test.dtd"'); - thatSer.endElement(); - var result = - '\r\n \r\n'; - var view = new Uint8Array(arrayBuffer); - var view1 = ""; - for (var i = 0; i < result.length; ++i) { - view1 = view1 + String.fromCodePoint(view[i]); - } - expect(view1).assertEqual(result); - }); - - /** - * @tc.number: TEST_GET_COLUMN_NUMBER_001 - * @tc.name : testGetColumnNumber001 - * @tc.desc : Get the current column number, starting from 1. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetColumnNumber001", 0, function () { - let strXml = - '' + - '' + - " Happy" + - ""; - let textEncoder = new util.TextEncoder(); - let arrbuffer = textEncoder.encodeInto(strXml); - let that = new xml.XmlPullParser(arrbuffer.buffer); - let arrTag = {}; - let str = ""; - let i = 0; - function func(key, value) { - arrTag[i] = "key:" + key + " value:" + value.getColumnNumber(); - str += arrTag[i]; - i++; - return true; - } - let options = { - supportDoctype: true, - ignoreNameSpace: true, - tokenValueCallbackFunction: func, - }; - that.parse(options); - const expectResult = - "key:0 value:1key:2 value:77key:10 value:81key:2 value:88key:4 value:93key:3 value:101" + - "key:3 value:108key:1 value:215"; - expect(expectResult == str).assertTrue(); - }); - - /** - * @tc.number: TEST_GET_DEPTH_001 - * @tc.name : testGetDepth001 - * @tc.desc : Gets the current depth of the element. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetDepth001", 0, function () { - let strXml = - '' + - '' + - " Happy" + - ""; - let textEncoder = new util.TextEncoder(); - let arrbuffer = textEncoder.encodeInto(strXml); - let that = new xml.XmlPullParser(arrbuffer.buffer); - let arrTag = {}; - let str = ""; - let i = 0; - function func(key, value) { - arrTag[i] = "key:" + key + " value:" + value.getDepth(); - str += arrTag[i]; - i++; - return true; - } - let options = { - supportDoctype: true, - ignoreNameSpace: true, - tokenValueCallbackFunction: func, - }; - that.parse(options); - const expectResult = - "key:0 value:0key:2 value:1key:10 value:1key:2 value:2key:4 value:2key:3 value:2key:3 value:1key:1 value:0"; - expect(expectResult == str).assertTrue(); - }); - - /** - * @tc.number: TEST_GET_LINE_NUMBER_001 - * @tc.name : testGetLineNumber001 - * @tc.desc : Get the current line number, starting from 1. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetLineNumber001", 0, function () { - let strXml = - '' + - '' + - " Happy" + - ""; - let textEncoder = new util.TextEncoder(); - let arrbuffer = textEncoder.encodeInto(strXml); - let that = new xml.XmlPullParser(arrbuffer.buffer); - let arrTag = {}; - let str = ""; - let i = 0; - - function func(key, value) { - arrTag[i] = "key:" + key + " value:" + value.getLineNumber(); - str += arrTag[i]; - i++; - return true; - } - - let options = { - supportDoctype: true, - ignoreNameSpace: true, - tokenValueCallbackFunction: func, - }; - that.parse(options); - const expectResult = - "key:0 value:1key:2 value:1key:10 value:1key:2 value:1key:4 value:1key:3 value:1key:3 value:1key:1 value:1"; - expect(expectResult == str).assertTrue(); - }); - - /** - * @tc.number: TEST_GET_NAME_001 - * @tc.name : testGetName001 - * @tc.desc : Gets the current element name. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetName001", 0, function () { - let strXml = - '' + - '' + - " Happy" + - ""; - let textEncoder = new util.TextEncoder(); - let arrbuffer = textEncoder.encodeInto(strXml); - let that = new xml.XmlPullParser(arrbuffer.buffer); - let arrTag = {}; - let str = ""; - let i = 0; - function func(key, value) { - arrTag[i] = "key:" + key + " value:" + value.getName(); - str += arrTag[i]; - i++; - return true; - } - let options = { - supportDoctype: true, - ignoreNameSpace: true, - tokenValueCallbackFunction: func, - }; - that.parse(options); - const expectResult = - "key:0 value:key:2 value:notekey:10 value:key:2 value:titlekey:4 value:key:3 value:titlekey:3 value:notekey:1 value:"; - expect(expectResult == str).assertTrue(); - }); - - /** - * @tc.number: TEST_GET_NAME_SPACE_001 - * @tc.name : testGetNamespace001 - * @tc.desc : Gets the namespace of the current element. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetNamespace001", 0, function () { - let strXml = - '' + - '' + - " Happy" + - ""; - let textEncoder = new util.TextEncoder(); - let arrbuffer = textEncoder.encodeInto(strXml); - let that = new xml.XmlPullParser(arrbuffer.buffer); - let arrTag = {}; - let str = ""; - let i = 0; - function func(key, value) { - arrTag[i] = "key:" + key + " value:" + value.getNamespace(); - str += arrTag[i]; - i++; - return true; - } - let options = { - supportDoctype: true, - ignoreNameSpace: true, - tokenValueCallbackFunction: func, - }; - that.parse(options); - const expectResult = - "key:0 value:key:2 value:key:10 value:key:2 value:key:4 value:key:3 value:key:3 value:key:1 value:"; - expect(expectResult == str).assertTrue(); - }); - - /** - * @tc.number: TEST_GET_PREFIX_001 - * @tc.name : testGetPrefix001 - * @tc.desc : Gets the namespace of the current element. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetPrefix001", 0, function () { - let strXml = - '' + - '' + - " Happy" + - ""; - let textEncoder = new util.TextEncoder(); - let arrbuffer = textEncoder.encodeInto(strXml); - let that = new xml.XmlPullParser(arrbuffer.buffer); - let arrTag = {}; - let str = ""; - let i = 0; - function func(key, value) { - arrTag[i] = "key:" + key + " value:" + value.getPrefix(); - str += arrTag[i]; - i++; - return true; - } - let options = { - supportDoctype: true, - ignoreNameSpace: true, - tokenValueCallbackFunction: func, - }; - that.parse(options); - const expectResult = - "key:0 value:key:2 value:key:10 value:key:2 value:key:4 value:key:3 value:key:3 value:key:1 value:"; - expect(expectResult == str).assertTrue(); - }); - - /** - * @tc.number: TEST_GET_TEXT_001 - * @tc.name : testGetText001 - * @tc.desc : Gets the text content of the current event. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetText001", 0, function () { - let strXml = - '' + - '' + - " Happy" + - ""; - let textEncoder = new util.TextEncoder(); - let arrbuffer = textEncoder.encodeInto(strXml); - let that = new xml.XmlPullParser(arrbuffer.buffer); - let arrTag = {}; - let str = ""; - let i = 0; - function func(key, value) { - arrTag[i] = "key:" + key + " value:" + value.getText(); - str += arrTag[i]; - i++; - return true; - } - let options = { - supportDoctype: true, - ignoreNameSpace: true, - tokenValueCallbackFunction: func, - }; - that.parse(options); - const expectResult = - "key:0 value:key:2 value:key:10 value: key:2 value:key:4 value:Happykey:3 value:key:3 value:key:1 value:"; - expect(expectResult == str).assertTrue(); - }); - - /** - * @tc.number: TEST_IS_EMPTY_ELEMENT_001 - * @tc.name : testIsEmptyElementTag001 - * @tc.desc : Determine whether the current element is an empty element. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsEmptyElementTag001", 0, function () { - let strXml = - '' + - '' + - " Happy" + - ""; - let textEncoder = new util.TextEncoder(); - let arrbuffer = textEncoder.encodeInto(strXml); - let that = new xml.XmlPullParser(arrbuffer.buffer); - let arrTag = {}; - let str = ""; - let i = 0; - function func(key, value) { - arrTag[i] = "key:" + key + " value:" + value.isEmptyElementTag(); - str += arrTag[i]; - i++; - return true; - } - let options = { - supportDoctype: true, - ignoreNameSpace: true, - tokenValueCallbackFunction: func, - }; - that.parse(options); - const expectResult = - "key:0 value:falsekey:2 value:falsekey:10 value:falsekey:2 value:falsekey:4 value:falsekey:3 value:falsekey:3 value:falsekey:1 value:false"; - expect(expectResult == str).assertTrue(); - }); - - /** - * @tc.number: TEST_IS_WHITE_SPACE_001 - * @tc.name : testIsWhitespace001 - * @tc.desc : Determine whether the current element is an empty element. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testIsWhitespace001", 0, function () { - let strXml = - '' + - '' + - " Happy" + - ""; - let textEncoder = new util.TextEncoder(); - let arrbuffer = textEncoder.encodeInto(strXml); - let that = new xml.XmlPullParser(arrbuffer.buffer); - let arrTag = {}; - let str = ""; - let i = 0; - function func(key, value) { - arrTag[i] = "key:" + key + " value:" + value.isWhitespace(); - str += arrTag[i]; - i++; - return true; - } - let options = { - supportDoctype: true, - ignoreNameSpace: true, - tokenValueCallbackFunction: func, - }; - that.parse(options); - const expectResult = - "key:0 value:truekey:2 value:falsekey:10 value:truekey:2 value:truekey:4 value:falsekey:3 value:truekey:3 value:truekey:1 value:true"; - expect(expectResult == str).assertTrue(); - }); - - /** - * @tc.number: TEST_GET_ATTRIBUTE_COUNT_001 - * @tc.name : testGetAttributeCount001 - * @tc.desc : Gets the number of attributes for the current start tag. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testGetAttributeCount001", 0, function () { - let strXml = - '' + - '' + - " Happy" + - ""; - let textEncoder = new util.TextEncoder(); - let arrbuffer = textEncoder.encodeInto(strXml); - let that = new xml.XmlPullParser(arrbuffer.buffer); - let arrTag = {}; - let str = ""; - let i = 0; - function func(key, value) { - arrTag[i] = "key:" + key + " value:" + value.getAttributeCount(); - str += arrTag[i]; - i++; - return true; - } - let options = { - supportDoctype: true, - ignoreNameSpace: true, - tokenValueCallbackFunction: func, - }; - that.parse(options); - const expectResult = - "key:0 value:0key:2 value:2key:10 value:0key:2 value:0key:4 value:0key:3 value:0key:3 value:0key:1 value:0"; - expect(expectResult == str).assertTrue(); - }); - - /** - * @tc.number: TEST_CONSTRUCTOR_001 - * @tc.name : testConstructor001 - * @tc.desc : Construct and return an XmlPullParser object. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testConstructor001", 0, function () { - let strXml = - '' + - ']>' + - '' + - " " + - " " + - " John & Hans" + - " Happy" + - ""; - let textEncoder = new util.TextEncoder(); - let arrbuffer = textEncoder.encodeInto(strXml); - let that = new xml.XmlPullParser(arrbuffer.buffer, "UTF-8"); - let str = ""; - function func1(name, value) { - str += name + ":" + value; - return true; - } - let options = { - supportDoctype: true, - ignoreNameSpace: true, - tagValueCallbackFunction: func1, - }; - that.parse(options); - const expectResult = - ':: note []note:: :funcrion matchwo(a,6){return 1;}: :Hello, World!: company::John amp;:amp;: Hanscompany:: title::Happytitle:note::'; - expect(expectResult == str).assertTrue(); - }); - /** - * @tc.number: TEST_PARSE_001 - * @tc.name : testParse001 - * @tc.desc : Starts parsing the XML file. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParse001", 0, function () { - var strXml = - '' + - ']>' + - '' + - " " + - " " + - " John & Hans" + - " Happy" + - " Happy" + - " Work" + - " Play" + - " " + - " " + - ' ' + - " " + - " Apples" + - " Bananas" + - " " + - " " + - ""; - let textEncoder = new util.TextEncoder(); - let arrbuffer = textEncoder.encodeInto(strXml); - let that = new xml.XmlPullParser(arrbuffer.buffer, "UTF-8"); - var str = ""; - function func2(name, value) { - str += name + ":" + value; - return true; - } - var options = { - supportDoctype: true, - ignoreNameSpace: true, - attributeValueCallbackFunction: func2, - }; - that.parse(options); - var str1 = - "importance:highlogged:truexmlns:h:http://www.w3.org/TR/html4/"; - expect(str).assertEqual(str1); - }); - - /** - * @tc.number: TEST_PARSE_002 - * @tc.name : testParse002 - * @tc.desc : Starts parsing the XML file. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParse002", 0, function () { - var strXml = - '' + - ']>' + - '' + - " " + - " " + - " John & Hans" + - " Happy" + - " Happy" + - " Work" + - " Play" + - " " + - " " + - ' ' + - " " + - " Apples" + - " Bananas" + - " " + - " " + - ""; - let textEncoder = new util.TextEncoder(); - let arrbuffer = textEncoder.encodeInto(strXml); - let that = new xml.XmlPullParser(arrbuffer.buffer); - var str1 = ""; - function func1(name, value) { - str1 += name + value + " "; - return true; - } - var options = { - supportDoctype: true, - ignoreNameSpace: true, - tagValueCallbackFunction: func1, - }; - that.parse(options); - var str3 = - ' note [] note funcrion matchwo(a,6){return 1;} Hello, World! ' + - "company John amp;amp; Hans company title Happy title title Happy title " + - "lens Work lens lens Play lens go there a b b a h:table " + - "h:tr h:td Apples h:td h:td Bananas h:td h:tr " + - "h:table note "; - expect(str1).assertEqual(str3); - }); - - /** - * @tc.number: TEST_PARSE_003 - * @tc.name : testParse003 - * @tc.desc : Starts parsing the XML file. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParse003", 0, function () { - let strXml = - '' + - '' + - " Happy" + - " Work" + - " Play" + - ""; - let textEncoder = new util.TextEncoder(); - let arrbuffer = textEncoder.encodeInto(strXml); - let that = new xml.XmlPullParser(arrbuffer.buffer); - let str = ""; - function func(key, value) { - str += "key:" + key + " value:" + value.getColumnNumber() + " "; - return true; - } - let options = { - supportDoctype: true, - ignoreNameSpace: true, - tokenValueCallbackFunction: func, - }; - that.parse(options); - let result = - "key:0 value:1 key:2 value:77 key:10 value:81 key:2 value:88 key:4 value:93 " + - "key:3 value:101 key:10 value:105 key:2 value:111 key:4 value:115 key:3 value:122 key:10 value:126 " + - "key:2 value:132 key:4 value:136 key:3 value:143 key:3 value:150 key:1 value:299 "; - expect(str).assertEqual(result); - }); - - /** - * @tc.number: TEST_PARSE_004 - * @tc.name : testParse004 - * @tc.desc : Starts parsing the XML file. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParse004", 0, function () { - let strXml = - '' + - '' + - " Happy" + - " Work" + - " Play" + - ""; - let textEncoder = new util.TextEncoder(); - let arrbuffer = textEncoder.encodeInto(strXml); - let that = new xml.XmlPullParser(arrbuffer.buffer); - let str = ""; - function func(key, value) { - str += "key:" + key + " value:" + value.getDepth() + " "; - return true; - } - let options = { - supportDoctype: true, - ignoreNameSpace: true, - tokenValueCallbackFunction: func, - }; - that.parse(options); - let result = - "key:0 value:0 key:2 value:1 key:10 value:1 key:2 value:2 key:4 value:2 key:3 value:2 " + - "key:10 value:1 key:2 value:2 key:4 value:2 key:3 value:2 key:10 value:1 key:2 value:2 " + - "key:4 value:2 key:3 value:2 key:3 value:1 key:1 value:0 "; - expect(str).assertEqual(result); - }); - - /** - * @tc.number: TEST_PARSE_005 - * @tc.name : testParse005 - * @tc.desc : Starts parsing the XML file. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParse005", 0, function () { - let strXml = - '' + - '' + - " Happy" + - " Work" + - " Play" + - ""; - let textEncoder = new util.TextEncoder(); - let arrbuffer = textEncoder.encodeInto(strXml); - let that = new xml.XmlPullParser(arrbuffer.buffer); - let str = ""; - function func(key, value) { - str += "key:" + key + " value:" + value.getLineNumber() + " "; - return true; - } - let options = { - supportDoctype: true, - ignoreNameSpace: true, - tokenValueCallbackFunction: func, - }; - that.parse(options); - let result = - "key:0 value:1 key:2 value:1 key:10 value:1 key:2 value:1 key:4 value:1 key:3 value:1 " + - "key:10 value:1 key:2 value:1 key:4 value:1 key:3 value:1 key:10 value:1 key:2 value:1 " + - "key:4 value:1 key:3 value:1 key:3 value:1 key:1 value:1 "; - expect(str).assertEqual(result); - }); - }); -} diff --git a/commonlibrary/crossplatform/commonlibraryxmletstest/src/main/ets/test/xmlEventType.test.ets b/commonlibrary/crossplatform/commonlibraryxmletstest/src/main/ets/test/xmlEventType.test.ets deleted file mode 100644 index 50e011231..000000000 --- a/commonlibrary/crossplatform/commonlibraryxmletstest/src/main/ets/test/xmlEventType.test.ets +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import { - describe, - beforeAll, - beforeEach, - afterEach, - afterAll, - it, - expect, -} from "@ohos/hypium"; -import xml from "@ohos.xml"; -import util from "@ohos.util"; -export default function XmlSerializerXmlPullParserTest() { - describe("XmlEventTypeTest", function () { - /** - * @tc.number: TEST_START_DOCUMENT_001 - * @tc.name : testSTART_DOCUMENT001 - * @tc.desc : Start file event. - * @tc.size : MediumTest - * @tc.type : Enum - * @tc.level : Level 0 - */ - it("testSTART_DOCUMENT001", 0, function () { - var event = xml.EventType.START_DOCUMENT; - expect(event).assertEqual(0); - }); - - /** - * @tc.number: TEST_END_DOCUMENT_001 - * @tc.name : testEND_DOCUMENT001 - * @tc.desc : End file event. - * @tc.size : MediumTest - * @tc.type : Enum - * @tc.level : Level 0 - */ - it("testEND_DOCUMENT001", 0, function () { - var event = xml.EventType.END_DOCUMENT; - expect(event).assertEqual(1); - }); - - /** - * @tc.number: TEST_START_TAG_001 - * @tc.name : testSTART_TAG001 - * @tc.desc : Start the tag event. - * @tc.size : MediumTest - * @tc.type : Enum - * @tc.level : Level 0 - */ - it("testSTART_TAG001", 0, function () { - var event = xml.EventType.START_TAG; - expect(event).assertEqual(2); - }); - - /** - * @tc.number: TEST_END_TAG_001 - * @tc.name : testEND_TAG001 - * @tc.desc : End tag event. - * @tc.size : MediumTest - * @tc.type : Enum - * @tc.level : Level 0 - */ - it("testEND_TAG001", 0, function () { - var event = xml.EventType.END_TAG; - expect(event).assertEqual(3); - }); - - /** - * @tc.number: TEST_TEXT_001 - * @tc.name : testTEXT001 - * @tc.desc : Text event. - * @tc.size : MediumTest - * @tc.type : Enum - * @tc.level : Level 0 - */ - it("testTEXT001", 0, function () { - var event = xml.EventType.TEXT; - expect(event).assertEqual(4); - }); - - /** - * @tc.number: TEST_CDSECT_001 - * @tc.name : testCDSECT001 - * @tc.desc : CDATA Event. - * @tc.size : MediumTest - * @tc.type : Enum - * @tc.level : Level 0 - */ - it("testCDSECT001", 0, function () { - var event = xml.EventType.CDSECT; - expect(event).assertEqual(5); - }); - - /** - * @tc.number: TEST_COMMENT_001 - * @tc.name : testCOMMENT001 - * @tc.desc : XML comment event. - * @tc.size : MediumTest - * @tc.type : Enum - * @tc.level : Level 0 - */ - it("testCOMMENT001", 0, function () { - var event = xml.EventType.COMMENT; - expect(event).assertEqual(6); - }); - - /** - * @tc.number: TEST_DOCDECL_001 - * @tc.name : testDOCDECL001 - * @tc.desc : XML document type declaration event. - * @tc.size : MediumTest - * @tc.type : Enum - * @tc.level : Level 0 - */ - it("testDOCDECL001", 0, function () { - var event = xml.EventType.DOCDECL; - expect(event).assertEqual(7); - }); - - /** - * @tc.number: TEST_INSTRUCTION_001 - * @tc.name : testINSTRUCTION001 - * @tc.desc : XML processing instruction declaration event. - * @tc.size : MediumTest - * @tc.type : Enum - * @tc.level : Level 0 - */ - it("testINSTRUCTION001", 0, function () { - var event = xml.EventType.INSTRUCTION; - expect(event).assertEqual(8); - }); - - /** - * @tc.number: TEST_ENTITY_REFERENCE_001 - * @tc.name : testENTITY_REFERENCE001 - * @tc.desc : Entity reference event. - * @tc.size : MediumTest - * @tc.type : Enum - * @tc.level : Level 0 - */ - it("testENTITY_REFERENCE001", 0, function () { - var event = xml.EventType.ENTITY_REFERENCE; - expect(event).assertEqual(9); - }); - - /** - * @tc.number: TEST_WHITESPACE_001 - * @tc.name : testWHITESPACE001 - * @tc.desc : Blank event. - * @tc.size : MediumTest - * @tc.type : Enum - * @tc.level : Level 0 - */ - it("testWHITESPACE001", 0, function () { - var event = xml.EventType.WHITESPACE; - expect(event).assertEqual(10); - }); - }); -} diff --git a/commonlibrary/crossplatform/commonlibraryxmletstest/src/main/ets/test/xmlParseOption.test.ets b/commonlibrary/crossplatform/commonlibraryxmletstest/src/main/ets/test/xmlParseOption.test.ets deleted file mode 100644 index 54b7a7045..000000000 --- a/commonlibrary/crossplatform/commonlibraryxmletstest/src/main/ets/test/xmlParseOption.test.ets +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright (C) 2023 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. - */ -import { - describe, - beforeAll, - beforeEach, - afterEach, - afterAll, - it, - expect, -} from "@ohos/hypium"; -import xml from "@ohos.xml"; -import util from "@ohos.util"; -export default function XmlSerializerXmlPullParserTest() { - describe("XmlParseOptionTest", function () { - /** - * @tc.number: TEST_PARSE_OPTION_001 - * @tc.name : testParseOptions001 - * @tc.desc : Starts parsing the XML file. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParseOptions001", 0, function () { - var strXml = - '' + - ']>' + - '' + - " " + - " " + - " John & Hans" + - " Happy" + - " Happy" + - " Work" + - " Play" + - " " + - " " + - ' ' + - " " + - " Apples" + - " Bananas" + - " " + - " " + - ""; - let textEncoder = new util.TextEncoder(); - let arrbuffer = textEncoder.encodeInto(strXml); - let that = new xml.XmlPullParser(arrbuffer.buffer, "UTF-8"); - var str = ""; - function func2(name, value) { - str += name + ":" + value; - return true; - } - var options = { - supportDoctype: true, - ignoreNameSpace: true, - attributeValueCallbackFunction: func2, - }; - that.parse(options); - var str1 = - "importance:highlogged:truexmlns:h:http://www.w3.org/TR/html4/"; - expect(str).assertEqual(str1); - }); - - /** - * @tc.number: TEST_PARSE_OPTION_002 - * @tc.name : testParseOptions002 - * @tc.desc : Starts parsing the XML file. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParseOptions002", 0, function () { - var strXml = - '' + - ']>' + - '' + - " " + - " " + - " John & Hans" + - " Happy" + - " Happy" + - " Work" + - " Play" + - " " + - " " + - ' ' + - " " + - " Apples" + - " Bananas" + - " " + - " " + - ""; - let textEncoder = new util.TextEncoder(); - let arrbuffer = textEncoder.encodeInto(strXml); - let that = new xml.XmlPullParser(arrbuffer.buffer); - var str1 = ""; - function func1(name, value) { - str1 += name + value + " "; - return true; - } - var options = { - supportDoctype: true, - ignoreNameSpace: true, - tagValueCallbackFunction: func1, - }; - that.parse(options); - var str3 = - ' note [] note funcrion matchwo(a,6){return 1;} Hello, World! ' + - "company John amp;amp; Hans company title Happy title title Happy title " + - "lens Work lens lens Play lens go there a b b a h:table " + - "h:tr h:td Apples h:td h:td Bananas h:td h:tr " + - "h:table note "; - expect(str1).assertEqual(str3); - }); - - /** - * @tc.number: TEST_PARSE_OPTION_002 - * @tc.name : testParseOptions002 - * @tc.desc : Starts parsing the XML file. - * @tc.size : MediumTest - * @tc.type : Method - * @tc.level : Level 2 - */ - it("testParseOptions003", 0, function () { - let strXml = - '' + - '' + - " Happy" + - " Work" + - " Play" + - ""; - let textEncoder = new util.TextEncoder(); - let arrbuffer = textEncoder.encodeInto(strXml); - let that = new xml.XmlPullParser(arrbuffer.buffer); - let str = ""; - function func(key, value) { - str += "key:" + key + " value:" + value.getColumnNumber() + " "; - return true; - } - let options = { - supportDoctype: true, - ignoreNameSpace: true, - tokenValueCallbackFunction: func, - }; - that.parse(options); - let result = - "key:0 value:1 key:2 value:77 key:10 value:81 key:2 value:88 key:4 value:93 " + - "key:3 value:101 key:10 value:105 key:2 value:111 key:4 value:115 key:3 value:122 key:10 value:126 " + - "key:2 value:132 key:4 value:136 key:3 value:143 key:3 value:150 key:1 value:299 "; - expect(str).assertEqual(result); - }); - }); -} diff --git a/commonlibrary/crossplatform/commonlibraryxmletstest/src/main/module.json b/commonlibrary/crossplatform/commonlibraryxmletstest/src/main/module.json deleted file mode 100644 index a4443e713..000000000 --- a/commonlibrary/crossplatform/commonlibraryxmletstest/src/main/module.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "module": { - "name": "entry_test", - "type": "feature", - "description": "$string:module_test_desc", - "mainElement": "TestAbility", - "deviceTypes": [ - "phone" - ], - "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", - "skills": [ - { - "actions": [ - "action.system.home" - ], - "entities": [ - "entity.system.home" - ] - } - ] - } - ] - } -} diff --git a/commonlibrary/crossplatform/commonlibraryxmletstest/src/main/resources/base/element/color.json b/commonlibrary/crossplatform/commonlibraryxmletstest/src/main/resources/base/element/color.json deleted file mode 100644 index 3c712962d..000000000 --- a/commonlibrary/crossplatform/commonlibraryxmletstest/src/main/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/commonlibrary/crossplatform/commonlibraryxmletstest/src/main/resources/base/element/string.json b/commonlibrary/crossplatform/commonlibraryxmletstest/src/main/resources/base/element/string.json deleted file mode 100644 index 65d8fa5a7..000000000 --- a/commonlibrary/crossplatform/commonlibraryxmletstest/src/main/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/commonlibrary/crossplatform/commonlibraryxmletstest/src/main/resources/base/media/icon.png b/commonlibrary/crossplatform/commonlibraryxmletstest/src/main/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6BLrPFWk?s;$LOP{GmJpBl$qoSA!PUg~PA65-S00{{S`XKG6NkG0RgjEntPrmV+?0|00mu7;+5 zrdpa{2QLqPJ4Y{j7=Mrl{BaxrkdY69+c~(w{Fv-v&aR%aEI&JYSeRTLWm!zbv;?)_ ziZB;fwGbbeL5Q}YLx`J$lp~A09KK8t_z}PZ=4ZzgdeKtgoc+o5EvN9A1K1_<>M?MBqb#!ASf&# zEX?<)!RH(7>1P+j=jqG(58}TVN-$psA6K}atCuI!KTJD&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