1/* 2 * Copyright (c) 2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16/* 17 * @tc.name:storeicbyvalue 18 * @tc.desc:test storeicbyvalue 19 * @tc.type: FUNC 20 * @tc.require: issueI8EX0Z 21 */ 22 23let obj = { 24 "prop1" : "val1", 25 "prop2" : "val2", 26 "prop3" : "val3", 27 "prop4" : "val4", 28 "prop5" : "val5", 29 1 : 2, 30 2 : 3, 31 3 : 4, 32 5 : 6, 33}; 34 35function ICTest() { 36 delete obj["prop1"]; 37 38 for (let i = 0; i < 1024; i++) { 39 obj[2] = 0x76543210; 40 } 41 42 delete obj[5]; 43} 44 45ICTest(); 46ICTest(); 47 48print("test successful !!!"); 49 50let obj2 = {}; 51for(let i=0; i<100; i++){ 52 obj2[Uint16Array] = 1; 53} 54print("store obj by value successful!!!")