14514f5e3Sopenharmony_ci# Copyright (c) 2024 Huawei Device Co., Ltd.
24514f5e3Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
34514f5e3Sopenharmony_ci# you may not use this file except in compliance with the License.
44514f5e3Sopenharmony_ci# You may obtain a copy of the License at
54514f5e3Sopenharmony_ci#
64514f5e3Sopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
74514f5e3Sopenharmony_ci#
84514f5e3Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
94514f5e3Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
104514f5e3Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
114514f5e3Sopenharmony_ci# See the License for the specific language governing permissions and
124514f5e3Sopenharmony_ci# limitations under the License.
134514f5e3Sopenharmony_ci
144514f5e3Sopenharmony_ci===Basic test begin===
154514f5e3Sopenharmony_cimap size is 5
164514f5e3Sopenharmony_citrue
174514f5e3Sopenharmony_citrue
184514f5e3Sopenharmony_cifalse
194514f5e3Sopenharmony_cikeys next:0, done: false
204514f5e3Sopenharmony_cikeys next:1, done: false
214514f5e3Sopenharmony_cikeys next:2, done: false
224514f5e3Sopenharmony_cikeys next:3, done: false
234514f5e3Sopenharmony_cikeys next:4, done: false
244514f5e3Sopenharmony_cikeys next:undefined, done: true
254514f5e3Sopenharmony_civalues next:value0, done: false
264514f5e3Sopenharmony_civalues next:value1, done: false
274514f5e3Sopenharmony_civalues next:value2, done: false
284514f5e3Sopenharmony_civalues next:value3, done: false
294514f5e3Sopenharmony_civalues next:value4, done: false
304514f5e3Sopenharmony_civalues next:undefined, done: true
314514f5e3Sopenharmony_cimap key[forEach]:key:0, value:value0
324514f5e3Sopenharmony_cimap key[forEach]:key:1, value:value1
334514f5e3Sopenharmony_cimap key[forEach]:key:2, value:value2
344514f5e3Sopenharmony_cimap key[forEach]:key:3, value:value3
354514f5e3Sopenharmony_cimap key[forEach]:key:4, value:value4
364514f5e3Sopenharmony_citrue
374514f5e3Sopenharmony_cimap key[Symbol.iterator]:0,value0
384514f5e3Sopenharmony_cimap key[Symbol.iterator]:1,value1
394514f5e3Sopenharmony_cimap key[Symbol.iterator]:2,value2
404514f5e3Sopenharmony_cimap key[Symbol.iterator]:3,value3
414514f5e3Sopenharmony_cimap key[Symbol.iterator]:4,value4
424514f5e3Sopenharmony_cimap entries:[0, value0]
434514f5e3Sopenharmony_cimap entries:[1, value1]
444514f5e3Sopenharmony_cimap entries:[2, value2]
454514f5e3Sopenharmony_cimap entries:[3, value3]
464514f5e3Sopenharmony_cimap entries:[4, value4]
474514f5e3Sopenharmony_citrue
484514f5e3Sopenharmony_cifalse
494514f5e3Sopenharmony_cifalse
504514f5e3Sopenharmony_citrue
514514f5e3Sopenharmony_citrue
524514f5e3Sopenharmony_cifalse
534514f5e3Sopenharmony_citrue
544514f5e3Sopenharmony_citrue
554514f5e3Sopenharmony_citrue
564514f5e3Sopenharmony_cifalse
574514f5e3Sopenharmony_citrue
584514f5e3Sopenharmony_citrue
594514f5e3Sopenharmony_ci===Basic test end===
604514f5e3Sopenharmony_ci===Concurrent modification during iteration Test(iterator) begin===
614514f5e3Sopenharmony_cimap size is 5
624514f5e3Sopenharmony_cimap key[for-of]: 0
634514f5e3Sopenharmony_cimap key[for-of]: 1
644514f5e3Sopenharmony_cimap key[for-of]: 2
654514f5e3Sopenharmony_cimap key[for-of]: 3
664514f5e3Sopenharmony_cimap key[for-of]: 4
674514f5e3Sopenharmony_ciSet Scenario[for-of] updated size: 6
684514f5e3Sopenharmony_ciDelete Scenario[for-of] updated size: 2
694514f5e3Sopenharmony_ciClear Scenario[for-of] updated size: 0
704514f5e3Sopenharmony_cimap size is 5
714514f5e3Sopenharmony_ciSet Scenario[next()] updated size: 6
724514f5e3Sopenharmony_ciDelete Scenario[next()] updated size: 5
734514f5e3Sopenharmony_ciClear Scenario[next()] updated size: 0
744514f5e3Sopenharmony_ci===Concurrent modification during iteration Test(iterator) end===
754514f5e3Sopenharmony_ci===Concurrent modification during iteration Test(forEach) begin===
764514f5e3Sopenharmony_cimap size is 5
774514f5e3Sopenharmony_cimap key[forEach]: 0
784514f5e3Sopenharmony_cimap key[forEach]: 1
794514f5e3Sopenharmony_cimap key[forEach]: 2
804514f5e3Sopenharmony_cimap key[forEach]: 3
814514f5e3Sopenharmony_cimap key[forEach]: 4
824514f5e3Sopenharmony_ciSet Scenario[forEach]: BusinessError: Concurrent modification exception, errCode: 10200201
834514f5e3Sopenharmony_ciDelete Scenario[forEach]: BusinessError: Concurrent modification exception, errCode: 10200201
844514f5e3Sopenharmony_ciClear Scenario[forEach]: BusinessError: Concurrent modification exception, errCode: 10200201
854514f5e3Sopenharmony_ci===Concurrent modification during iteration Test(forEach) end===
864514f5e3Sopenharmony_ci===Type check begin===
874514f5e3Sopenharmony_cisharedMap set[shared] element success
884514f5e3Sopenharmony_cisharedMap set[unshared]: BusinessError: Parameter error. Only accept sendable value., errCode: 401
894514f5e3Sopenharmony_cisharedMap set[unshared]: BusinessError: Parameter error. Only accept sendable value., errCode: 401
904514f5e3Sopenharmony_ci===Type check end===
914514f5e3Sopenharmony_ci===Class inheritance test begin ===
924514f5e3Sopenharmony_citrue
934514f5e3Sopenharmony_ci1
944514f5e3Sopenharmony_ciadd extension(.): TypeError: Cannot add property in prevent extensions
954514f5e3Sopenharmony_ciadd extension([]): TypeError: Cannot add property in prevent extensions
964514f5e3Sopenharmony_ciSubSendableMap set[unshared]: BusinessError: Parameter error. Only accept sendable value., errCode: 401
974514f5e3Sopenharmony_ci3
984514f5e3Sopenharmony_ciSubSendableMap [key, value][for-of]: [1, one]
994514f5e3Sopenharmony_ciSubSendableMap [key, value][for-of]: [2, two]
1004514f5e3Sopenharmony_ciSubSendableMap [key, value][for-of]: [3, three]
1014514f5e3Sopenharmony_ciSubSendableMap Delete Scenario[forEach]: BusinessError: Concurrent modification exception, errCode: 10200201
1024514f5e3Sopenharmony_citrue
1034514f5e3Sopenharmony_ci1
1044514f5e3Sopenharmony_ciSubSubSendableMap set[unshared]: BusinessError: Parameter error. Only accept sendable value., errCode: 401
1054514f5e3Sopenharmony_ci3
1064514f5e3Sopenharmony_ciSubSubSendableMap [key, value][for-of]: [1, one]
1074514f5e3Sopenharmony_ciSubSubSendableMap [key, value][for-of]: [2, two]
1084514f5e3Sopenharmony_ciSubSubSendableMap [key, value][for-of]: [3, three]
1094514f5e3Sopenharmony_ciSubSubSendableMap Delete Scenario[forEach]: BusinessError: Concurrent modification exception, errCode: 10200201
1104514f5e3Sopenharmony_ci=== An iterable object to convert to an ArkTS Map begin===
1114514f5e3Sopenharmony_cimap size is 5
1124514f5e3Sopenharmony_cimap key[forEach]:key:0, value:value0
1134514f5e3Sopenharmony_cimap key[forEach]:key:1, value:value1
1144514f5e3Sopenharmony_cimap key[forEach]:key:2, value:value2
1154514f5e3Sopenharmony_cimap key[forEach]:key:3, value:value3
1164514f5e3Sopenharmony_cimap key[forEach]:key:4, value:value4
1174514f5e3Sopenharmony_ci===Class inheritance test end ===
118