1e0857b17Sopenharmony_ci/* 2e0857b17Sopenharmony_ci * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 3e0857b17Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 4e0857b17Sopenharmony_ci * you may not use this file except in compliance with the License. 5e0857b17Sopenharmony_ci * You may obtain a copy of the License at 6e0857b17Sopenharmony_ci * 7e0857b17Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 8e0857b17Sopenharmony_ci * 9e0857b17Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 10e0857b17Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 11e0857b17Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12e0857b17Sopenharmony_ci * See the License for the specific language governing permissions and 13e0857b17Sopenharmony_ci * limitations under the License. 14e0857b17Sopenharmony_ci */ 15e0857b17Sopenharmony_ci 16e0857b17Sopenharmony_ci#include <gtest/gtest.h> 17e0857b17Sopenharmony_ci 18e0857b17Sopenharmony_ci#define private public 19e0857b17Sopenharmony_ci#define protected public 20e0857b17Sopenharmony_ci#include "array_wrapper.h" 21e0857b17Sopenharmony_ci#undef private 22e0857b17Sopenharmony_ci#undef protected 23e0857b17Sopenharmony_ci 24e0857b17Sopenharmony_ciusing namespace testing::ext; 25e0857b17Sopenharmony_ci 26e0857b17Sopenharmony_cinamespace OHOS { 27e0857b17Sopenharmony_cinamespace AAFwk { 28e0857b17Sopenharmony_ciclass ArrayWrapperBaseTest : public testing::Test { 29e0857b17Sopenharmony_cipublic: 30e0857b17Sopenharmony_ci static void SetUpTestCase() {}; 31e0857b17Sopenharmony_ci static void TearDownTestCase() {}; 32e0857b17Sopenharmony_ci void SetUp() {}; 33e0857b17Sopenharmony_ci void TearDown() {}; 34e0857b17Sopenharmony_ci}; 35e0857b17Sopenharmony_ci 36e0857b17Sopenharmony_ci/** 37e0857b17Sopenharmony_ci * @tc.number: AaFwk_Array_Wrapper_Get_0100 38e0857b17Sopenharmony_ci * @tc.name: Get 39e0857b17Sopenharmony_ci * @tc.desc: 40e0857b17Sopenharmony_ci */ 41e0857b17Sopenharmony_ciHWTEST_F(ArrayWrapperBaseTest, AaFwk_Array_Wrapper_Get_0100, Function | MediumTest | Level1) 42e0857b17Sopenharmony_ci{ 43e0857b17Sopenharmony_ci long index = 5; 44e0857b17Sopenharmony_ci InterfaceID typeId; 45e0857b17Sopenharmony_ci sptr<IArray> arr = new Array(index, typeId); 46e0857b17Sopenharmony_ci sptr<IInterface> value; 47e0857b17Sopenharmony_ci ErrCode result = arr->Get(index, value); 48e0857b17Sopenharmony_ci EXPECT_EQ(result, ERR_INVALID_VALUE); 49e0857b17Sopenharmony_ci} 50e0857b17Sopenharmony_ci 51e0857b17Sopenharmony_ci/** 52e0857b17Sopenharmony_ci * @tc.number: AaFwk_Array_Wrapper_Get_0200 53e0857b17Sopenharmony_ci * @tc.name: Get 54e0857b17Sopenharmony_ci * @tc.desc: 55e0857b17Sopenharmony_ci */ 56e0857b17Sopenharmony_ciHWTEST_F(ArrayWrapperBaseTest, AaFwk_Array_Wrapper_Get_0200, Function | MediumTest | Level1) 57e0857b17Sopenharmony_ci{ 58e0857b17Sopenharmony_ci long index = 5; 59e0857b17Sopenharmony_ci InterfaceID typeId; 60e0857b17Sopenharmony_ci sptr<IArray> arr = new Array(index, typeId); 61e0857b17Sopenharmony_ci sptr<IInterface> value; 62e0857b17Sopenharmony_ci long key = 1; 63e0857b17Sopenharmony_ci ErrCode result = arr->Get(key, value); 64e0857b17Sopenharmony_ci EXPECT_EQ(result, ERR_OK); 65e0857b17Sopenharmony_ci} 66e0857b17Sopenharmony_ci 67e0857b17Sopenharmony_ci/** 68e0857b17Sopenharmony_ci * @tc.number: AaFwk_Array_Wrapper_GetLength_0100 69e0857b17Sopenharmony_ci * @tc.name: GetLength 70e0857b17Sopenharmony_ci * @tc.desc: 71e0857b17Sopenharmony_ci */ 72e0857b17Sopenharmony_ciHWTEST_F(ArrayWrapperBaseTest, AaFwk_Array_Wrapper_GetLength_0100, Function | MediumTest | Level1) 73e0857b17Sopenharmony_ci{ 74e0857b17Sopenharmony_ci long size = 1; 75e0857b17Sopenharmony_ci InterfaceID typeId; 76e0857b17Sopenharmony_ci sptr<IArray> arr = new Array(size, typeId); 77e0857b17Sopenharmony_ci ErrCode result = arr->GetLength(size); 78e0857b17Sopenharmony_ci EXPECT_EQ(result, ERR_OK); 79e0857b17Sopenharmony_ci} 80e0857b17Sopenharmony_ci 81e0857b17Sopenharmony_ci/** 82e0857b17Sopenharmony_ci * @tc.number: AaFwk_Array_Wrapper_GetType_0100 83e0857b17Sopenharmony_ci * @tc.name: GetType 84e0857b17Sopenharmony_ci * @tc.desc: 85e0857b17Sopenharmony_ci */ 86e0857b17Sopenharmony_ciHWTEST_F(ArrayWrapperBaseTest, AaFwk_Array_Wrapper_GetType_0100, Function | MediumTest | Level1) 87e0857b17Sopenharmony_ci{ 88e0857b17Sopenharmony_ci long size = 1; 89e0857b17Sopenharmony_ci InterfaceID typeId = g_IID_IString; 90e0857b17Sopenharmony_ci sptr<IArray> arr = new Array(size, typeId); 91e0857b17Sopenharmony_ci ErrCode result = arr->GetType(typeId); 92e0857b17Sopenharmony_ci EXPECT_EQ(result, ERR_OK); 93e0857b17Sopenharmony_ci} 94e0857b17Sopenharmony_ci 95e0857b17Sopenharmony_ci/** 96e0857b17Sopenharmony_ci * @tc.number: AaFwk_Array_Wrapper_Set_0100 97e0857b17Sopenharmony_ci * @tc.name: Set 98e0857b17Sopenharmony_ci * @tc.desc: 99e0857b17Sopenharmony_ci */ 100e0857b17Sopenharmony_ciHWTEST_F(ArrayWrapperBaseTest, AaFwk_Array_Wrapper_Set_0100, Function | MediumTest | Level1) 101e0857b17Sopenharmony_ci{ 102e0857b17Sopenharmony_ci long index = 5; 103e0857b17Sopenharmony_ci InterfaceID typeId; 104e0857b17Sopenharmony_ci sptr<IArray> arr = new Array(index, typeId); 105e0857b17Sopenharmony_ci sptr<IInterface> value; 106e0857b17Sopenharmony_ci long key = 1; 107e0857b17Sopenharmony_ci ErrCode result = arr->Set(key, value); 108e0857b17Sopenharmony_ci EXPECT_EQ(result, ERR_OK); 109e0857b17Sopenharmony_ci} 110e0857b17Sopenharmony_ci 111e0857b17Sopenharmony_ci/** 112e0857b17Sopenharmony_ci * @tc.number: AaFwk_Array_Wrapper_Set_0200 113e0857b17Sopenharmony_ci * @tc.name: Set 114e0857b17Sopenharmony_ci * @tc.desc: 115e0857b17Sopenharmony_ci */ 116e0857b17Sopenharmony_ciHWTEST_F(ArrayWrapperBaseTest, AaFwk_Array_Wrapper_Set_0200, Function | MediumTest | Level1) 117e0857b17Sopenharmony_ci{ 118e0857b17Sopenharmony_ci long index = 5; 119e0857b17Sopenharmony_ci InterfaceID typeId; 120e0857b17Sopenharmony_ci sptr<IArray> arr = new Array(index, typeId); 121e0857b17Sopenharmony_ci sptr<IInterface> value; 122e0857b17Sopenharmony_ci long key = -1; 123e0857b17Sopenharmony_ci ErrCode result = arr->Set(key, value); 124e0857b17Sopenharmony_ci EXPECT_EQ(result, ERR_INVALID_VALUE); 125e0857b17Sopenharmony_ci} 126e0857b17Sopenharmony_ci 127e0857b17Sopenharmony_ci/** 128e0857b17Sopenharmony_ci * @tc.number: AaFwk_Array_Wrapper_IsBooleanArray_0100 129e0857b17Sopenharmony_ci * @tc.name: IsBooleanArray 130e0857b17Sopenharmony_ci * @tc.desc: 131e0857b17Sopenharmony_ci */ 132e0857b17Sopenharmony_ciHWTEST_F(ArrayWrapperBaseTest, AaFwk_Array_Wrapper_IsBooleanArray_0100, Function | MediumTest | Level1) 133e0857b17Sopenharmony_ci{ 134e0857b17Sopenharmony_ci long index = 5; 135e0857b17Sopenharmony_ci InterfaceID typeId; 136e0857b17Sopenharmony_ci sptr<IArray> arr = new Array(index, typeId); 137e0857b17Sopenharmony_ci bool result = Array::IsBooleanArray(arr); 138e0857b17Sopenharmony_ci EXPECT_EQ(result, false); 139e0857b17Sopenharmony_ci} 140e0857b17Sopenharmony_ci 141e0857b17Sopenharmony_ci/** 142e0857b17Sopenharmony_ci * @tc.number: AaFwk_Array_Wrapper_IsBooleanArray_0200 143e0857b17Sopenharmony_ci * @tc.name: IsBooleanArray 144e0857b17Sopenharmony_ci * @tc.desc: 145e0857b17Sopenharmony_ci */ 146e0857b17Sopenharmony_ciHWTEST_F(ArrayWrapperBaseTest, AaFwk_Array_Wrapper_IsBooleanArray_0200, Function | MediumTest | Level1) 147e0857b17Sopenharmony_ci{ 148e0857b17Sopenharmony_ci long index = 5; 149e0857b17Sopenharmony_ci InterfaceID typeId = g_IID_IBoolean; 150e0857b17Sopenharmony_ci sptr<IArray> arr = new Array(index, typeId); 151e0857b17Sopenharmony_ci bool result = Array::IsBooleanArray(arr); 152e0857b17Sopenharmony_ci EXPECT_EQ(result, true); 153e0857b17Sopenharmony_ci} 154e0857b17Sopenharmony_ci 155e0857b17Sopenharmony_ci/** 156e0857b17Sopenharmony_ci * @tc.number: AaFwk_Array_Wrapper_IsCharArray_0100 157e0857b17Sopenharmony_ci * @tc.name: IsCharArray 158e0857b17Sopenharmony_ci * @tc.desc: 159e0857b17Sopenharmony_ci */ 160e0857b17Sopenharmony_ciHWTEST_F(ArrayWrapperBaseTest, AaFwk_Array_Wrapper_IsCharArray_0100, Function | MediumTest | Level1) 161e0857b17Sopenharmony_ci{ 162e0857b17Sopenharmony_ci long index = 5; 163e0857b17Sopenharmony_ci InterfaceID typeId; 164e0857b17Sopenharmony_ci sptr<IArray> arr = new Array(index, typeId); 165e0857b17Sopenharmony_ci bool result = Array::IsCharArray(arr); 166e0857b17Sopenharmony_ci EXPECT_EQ(result, false); 167e0857b17Sopenharmony_ci} 168e0857b17Sopenharmony_ci 169e0857b17Sopenharmony_ci/** 170e0857b17Sopenharmony_ci * @tc.number: AaFwk_Array_Wrapper_IsCharArray_0200 171e0857b17Sopenharmony_ci * @tc.name: IsCharArray 172e0857b17Sopenharmony_ci * @tc.desc: 173e0857b17Sopenharmony_ci */ 174e0857b17Sopenharmony_ciHWTEST_F(ArrayWrapperBaseTest, AaFwk_Array_Wrapper_IsCharArray_0200, Function | MediumTest | Level1) 175e0857b17Sopenharmony_ci{ 176e0857b17Sopenharmony_ci long index = 5; 177e0857b17Sopenharmony_ci InterfaceID typeId = g_IID_IChar; 178e0857b17Sopenharmony_ci sptr<IArray> arr = new Array(index, typeId); 179e0857b17Sopenharmony_ci bool result = Array::IsCharArray(arr); 180e0857b17Sopenharmony_ci EXPECT_EQ(result, true); 181e0857b17Sopenharmony_ci} 182e0857b17Sopenharmony_ci 183e0857b17Sopenharmony_ci/** 184e0857b17Sopenharmony_ci * @tc.number: AaFwk_Array_Wrapper_IsByteArray_0100 185e0857b17Sopenharmony_ci * @tc.name: IsByteArray 186e0857b17Sopenharmony_ci * @tc.desc: 187e0857b17Sopenharmony_ci */ 188e0857b17Sopenharmony_ciHWTEST_F(ArrayWrapperBaseTest, AaFwk_Array_Wrapper_IsByteArray_0100, Function | MediumTest | Level1) 189e0857b17Sopenharmony_ci{ 190e0857b17Sopenharmony_ci long index = 5; 191e0857b17Sopenharmony_ci InterfaceID typeId; 192e0857b17Sopenharmony_ci sptr<IArray> arr = new Array(index, typeId); 193e0857b17Sopenharmony_ci bool result = Array::IsByteArray(arr); 194e0857b17Sopenharmony_ci EXPECT_EQ(result, false); 195e0857b17Sopenharmony_ci} 196e0857b17Sopenharmony_ci 197e0857b17Sopenharmony_ci/** 198e0857b17Sopenharmony_ci * @tc.number: AaFwk_Array_Wrapper_IsByteArray_0200 199e0857b17Sopenharmony_ci * @tc.name: IsByteArray 200e0857b17Sopenharmony_ci * @tc.desc: 201e0857b17Sopenharmony_ci */ 202e0857b17Sopenharmony_ciHWTEST_F(ArrayWrapperBaseTest, AaFwk_Array_Wrapper_IsByteArray_0200, Function | MediumTest | Level1) 203e0857b17Sopenharmony_ci{ 204e0857b17Sopenharmony_ci long index = 5; 205e0857b17Sopenharmony_ci InterfaceID typeId = g_IID_IByte; 206e0857b17Sopenharmony_ci sptr<IArray> arr = new Array(index, typeId); 207e0857b17Sopenharmony_ci bool result = Array::IsByteArray(arr); 208e0857b17Sopenharmony_ci EXPECT_EQ(result, true); 209e0857b17Sopenharmony_ci} 210e0857b17Sopenharmony_ci 211e0857b17Sopenharmony_ci/** 212e0857b17Sopenharmony_ci * @tc.number: AaFwk_Array_Wrapper_IsShortArray_0100 213e0857b17Sopenharmony_ci * @tc.name: IsShortArray 214e0857b17Sopenharmony_ci * @tc.desc: 215e0857b17Sopenharmony_ci */ 216e0857b17Sopenharmony_ciHWTEST_F(ArrayWrapperBaseTest, AaFwk_Array_Wrapper_IsShortArray_0100, Function | MediumTest | Level1) 217e0857b17Sopenharmony_ci{ 218e0857b17Sopenharmony_ci long index = 5; 219e0857b17Sopenharmony_ci InterfaceID typeId; 220e0857b17Sopenharmony_ci sptr<IArray> arr = new Array(index, typeId); 221e0857b17Sopenharmony_ci bool result = Array::IsShortArray(arr); 222e0857b17Sopenharmony_ci EXPECT_EQ(result, false); 223e0857b17Sopenharmony_ci} 224e0857b17Sopenharmony_ci 225e0857b17Sopenharmony_ci/** 226e0857b17Sopenharmony_ci * @tc.number: AaFwk_Array_Wrapper_IsShortArray_0200 227e0857b17Sopenharmony_ci * @tc.name: IsShortArray 228e0857b17Sopenharmony_ci * @tc.desc: 229e0857b17Sopenharmony_ci */ 230e0857b17Sopenharmony_ciHWTEST_F(ArrayWrapperBaseTest, AaFwk_Array_Wrapper_IsShortArray_0200, Function | MediumTest | Level1) 231e0857b17Sopenharmony_ci{ 232e0857b17Sopenharmony_ci long index = 5; 233e0857b17Sopenharmony_ci InterfaceID typeId = g_IID_IShort; 234e0857b17Sopenharmony_ci sptr<IArray> arr = new Array(index, typeId); 235e0857b17Sopenharmony_ci bool result = Array::IsShortArray(arr); 236e0857b17Sopenharmony_ci EXPECT_EQ(result, true); 237e0857b17Sopenharmony_ci} 238e0857b17Sopenharmony_ci 239e0857b17Sopenharmony_ci/** 240e0857b17Sopenharmony_ci * @tc.number: AaFwk_Array_Wrapper_IsIntegerArray_0100 241e0857b17Sopenharmony_ci * @tc.name: IsIntegerArray 242e0857b17Sopenharmony_ci * @tc.desc: 243e0857b17Sopenharmony_ci */ 244e0857b17Sopenharmony_ciHWTEST_F(ArrayWrapperBaseTest, AaFwk_Array_Wrapper_IsIntegerArray_0100, Function | MediumTest | Level1) 245e0857b17Sopenharmony_ci{ 246e0857b17Sopenharmony_ci long index = 5; 247e0857b17Sopenharmony_ci InterfaceID typeId; 248e0857b17Sopenharmony_ci sptr<IArray> arr = new Array(index, typeId); 249e0857b17Sopenharmony_ci bool result = Array::IsIntegerArray(arr); 250e0857b17Sopenharmony_ci EXPECT_EQ(result, false); 251e0857b17Sopenharmony_ci} 252e0857b17Sopenharmony_ci 253e0857b17Sopenharmony_ci/** 254e0857b17Sopenharmony_ci * @tc.number: AaFwk_Array_Wrapper_IsIntegerArray_0200 255e0857b17Sopenharmony_ci * @tc.name: IsIntegerArray 256e0857b17Sopenharmony_ci * @tc.desc: 257e0857b17Sopenharmony_ci */ 258e0857b17Sopenharmony_ciHWTEST_F(ArrayWrapperBaseTest, AaFwk_Array_Wrapper_IsIntegerArray_0200, Function | MediumTest | Level1) 259e0857b17Sopenharmony_ci{ 260e0857b17Sopenharmony_ci long index = 5; 261e0857b17Sopenharmony_ci InterfaceID typeId = g_IID_IInteger; 262e0857b17Sopenharmony_ci sptr<IArray> arr = new Array(index, typeId); 263e0857b17Sopenharmony_ci bool result = Array::IsIntegerArray(arr); 264e0857b17Sopenharmony_ci EXPECT_EQ(result, true); 265e0857b17Sopenharmony_ci} 266e0857b17Sopenharmony_ci 267e0857b17Sopenharmony_ci/** 268e0857b17Sopenharmony_ci * @tc.number: AaFwk_Array_Wrapper_IsLongArray_0100 269e0857b17Sopenharmony_ci * @tc.name: IsLongArray 270e0857b17Sopenharmony_ci * @tc.desc: 271e0857b17Sopenharmony_ci */ 272e0857b17Sopenharmony_ciHWTEST_F(ArrayWrapperBaseTest, AaFwk_Array_Wrapper_IsLongArray_0100, Function | MediumTest | Level1) 273e0857b17Sopenharmony_ci{ 274e0857b17Sopenharmony_ci long index = 5; 275e0857b17Sopenharmony_ci InterfaceID typeId; 276e0857b17Sopenharmony_ci sptr<IArray> arr = new Array(index, typeId); 277e0857b17Sopenharmony_ci bool result = Array::IsLongArray(arr); 278e0857b17Sopenharmony_ci EXPECT_EQ(result, false); 279e0857b17Sopenharmony_ci} 280e0857b17Sopenharmony_ci 281e0857b17Sopenharmony_ci/** 282e0857b17Sopenharmony_ci * @tc.number: AaFwk_Array_Wrapper_IsLongArray_0200 283e0857b17Sopenharmony_ci * @tc.name: IsLongArray 284e0857b17Sopenharmony_ci * @tc.desc: 285e0857b17Sopenharmony_ci */ 286e0857b17Sopenharmony_ciHWTEST_F(ArrayWrapperBaseTest, AaFwk_Array_Wrapper_IsLongArray_0200, Function | MediumTest | Level1) 287e0857b17Sopenharmony_ci{ 288e0857b17Sopenharmony_ci long index = 5; 289e0857b17Sopenharmony_ci InterfaceID typeId = g_IID_ILong; 290e0857b17Sopenharmony_ci sptr<IArray> arr = new Array(index, typeId); 291e0857b17Sopenharmony_ci bool result = Array::IsLongArray(arr); 292e0857b17Sopenharmony_ci EXPECT_EQ(result, true); 293e0857b17Sopenharmony_ci} 294e0857b17Sopenharmony_ci 295e0857b17Sopenharmony_ci/** 296e0857b17Sopenharmony_ci * @tc.number: AaFwk_Array_Wrapper_IsFloatArray_0100 297e0857b17Sopenharmony_ci * @tc.name: IsFloatArray 298e0857b17Sopenharmony_ci * @tc.desc: 299e0857b17Sopenharmony_ci */ 300e0857b17Sopenharmony_ciHWTEST_F(ArrayWrapperBaseTest, AaFwk_Array_Wrapper_IsFloatArray_0100, Function | MediumTest | Level1) 301e0857b17Sopenharmony_ci{ 302e0857b17Sopenharmony_ci long index = 5; 303e0857b17Sopenharmony_ci InterfaceID typeId; 304e0857b17Sopenharmony_ci sptr<IArray> arr = new Array(index, typeId); 305e0857b17Sopenharmony_ci bool result = Array::IsFloatArray(arr); 306e0857b17Sopenharmony_ci EXPECT_EQ(result, false); 307e0857b17Sopenharmony_ci} 308e0857b17Sopenharmony_ci 309e0857b17Sopenharmony_ci/** 310e0857b17Sopenharmony_ci * @tc.number: AaFwk_Array_Wrapper_IsFloatArray_0200 311e0857b17Sopenharmony_ci * @tc.name: IsFloatArray 312e0857b17Sopenharmony_ci * @tc.desc: 313e0857b17Sopenharmony_ci */ 314e0857b17Sopenharmony_ciHWTEST_F(ArrayWrapperBaseTest, AaFwk_Array_Wrapper_IsFloatArray_0200, Function | MediumTest | Level1) 315e0857b17Sopenharmony_ci{ 316e0857b17Sopenharmony_ci long index = 5; 317e0857b17Sopenharmony_ci InterfaceID typeId = g_IID_IFloat; 318e0857b17Sopenharmony_ci sptr<IArray> arr = new Array(index, typeId); 319e0857b17Sopenharmony_ci bool result = Array::IsFloatArray(arr); 320e0857b17Sopenharmony_ci EXPECT_EQ(result, true); 321e0857b17Sopenharmony_ci} 322e0857b17Sopenharmony_ci 323e0857b17Sopenharmony_ci/** 324e0857b17Sopenharmony_ci * @tc.number: AaFwk_Array_Wrapper_IsDoubleArray_0100 325e0857b17Sopenharmony_ci * @tc.name: IsDoubleArray 326e0857b17Sopenharmony_ci * @tc.desc: 327e0857b17Sopenharmony_ci */ 328e0857b17Sopenharmony_ciHWTEST_F(ArrayWrapperBaseTest, AaFwk_Array_Wrapper_IsDoubleArray_0100, Function | MediumTest | Level1) 329e0857b17Sopenharmony_ci{ 330e0857b17Sopenharmony_ci long index = 5; 331e0857b17Sopenharmony_ci InterfaceID typeId; 332e0857b17Sopenharmony_ci sptr<IArray> arr = new Array(index, typeId); 333e0857b17Sopenharmony_ci bool result = Array::IsDoubleArray(arr); 334e0857b17Sopenharmony_ci EXPECT_EQ(result, false); 335e0857b17Sopenharmony_ci} 336e0857b17Sopenharmony_ci 337e0857b17Sopenharmony_ci/** 338e0857b17Sopenharmony_ci * @tc.number: AaFwk_Array_Wrapper_IsDoubleArray_0200 339e0857b17Sopenharmony_ci * @tc.name: IsDoubleArray 340e0857b17Sopenharmony_ci * @tc.desc: 341e0857b17Sopenharmony_ci */ 342e0857b17Sopenharmony_ciHWTEST_F(ArrayWrapperBaseTest, AaFwk_Array_Wrapper_IsDoubleArray_0200, Function | MediumTest | Level1) 343e0857b17Sopenharmony_ci{ 344e0857b17Sopenharmony_ci long index = 5; 345e0857b17Sopenharmony_ci InterfaceID typeId = g_IID_IDouble; 346e0857b17Sopenharmony_ci sptr<IArray> arr = new Array(index, typeId); 347e0857b17Sopenharmony_ci bool result = Array::IsDoubleArray(arr); 348e0857b17Sopenharmony_ci EXPECT_EQ(result, true); 349e0857b17Sopenharmony_ci} 350e0857b17Sopenharmony_ci 351e0857b17Sopenharmony_ci/** 352e0857b17Sopenharmony_ci * @tc.number: AaFwk_Array_Wrapper_IsStringArray_0100 353e0857b17Sopenharmony_ci * @tc.name: IsStringArray 354e0857b17Sopenharmony_ci * @tc.desc: 355e0857b17Sopenharmony_ci */ 356e0857b17Sopenharmony_ciHWTEST_F(ArrayWrapperBaseTest, AaFwk_Array_Wrapper_IsStringArray_0100, Function | MediumTest | Level1) 357e0857b17Sopenharmony_ci{ 358e0857b17Sopenharmony_ci long index = 5; 359e0857b17Sopenharmony_ci InterfaceID typeId; 360e0857b17Sopenharmony_ci sptr<IArray> arr = new Array(index, typeId); 361e0857b17Sopenharmony_ci bool result = Array::IsStringArray(arr); 362e0857b17Sopenharmony_ci EXPECT_EQ(result, false); 363e0857b17Sopenharmony_ci} 364e0857b17Sopenharmony_ci 365e0857b17Sopenharmony_ci/** 366e0857b17Sopenharmony_ci * @tc.number: AaFwk_Array_Wrapper_IsStringArray_0200 367e0857b17Sopenharmony_ci * @tc.name: IsStringArray 368e0857b17Sopenharmony_ci * @tc.desc: 369e0857b17Sopenharmony_ci */ 370e0857b17Sopenharmony_ciHWTEST_F(ArrayWrapperBaseTest, AaFwk_Array_Wrapper_IsStringArray_0200, Function | MediumTest | Level1) 371e0857b17Sopenharmony_ci{ 372e0857b17Sopenharmony_ci long index = 5; 373e0857b17Sopenharmony_ci InterfaceID typeId = g_IID_IString; 374e0857b17Sopenharmony_ci sptr<IArray> arr = new Array(index, typeId); 375e0857b17Sopenharmony_ci bool result = Array::IsStringArray(arr); 376e0857b17Sopenharmony_ci EXPECT_EQ(result, true); 377e0857b17Sopenharmony_ci} 378e0857b17Sopenharmony_ci 379e0857b17Sopenharmony_ci/** 380e0857b17Sopenharmony_ci * @tc.number: AaFwk_Array_Wrapper_IsWantParamsArray_0100 381e0857b17Sopenharmony_ci * @tc.name: IsWantParamsArray 382e0857b17Sopenharmony_ci * @tc.desc: 383e0857b17Sopenharmony_ci */ 384e0857b17Sopenharmony_ciHWTEST_F(ArrayWrapperBaseTest, AaFwk_Array_Wrapper_IsWantParamsArray_0100, Function | MediumTest | Level1) 385e0857b17Sopenharmony_ci{ 386e0857b17Sopenharmony_ci long index = 5; 387e0857b17Sopenharmony_ci InterfaceID typeId; 388e0857b17Sopenharmony_ci sptr<IArray> arr = new Array(index, typeId); 389e0857b17Sopenharmony_ci bool result = Array::IsWantParamsArray(arr); 390e0857b17Sopenharmony_ci EXPECT_EQ(result, false); 391e0857b17Sopenharmony_ci} 392e0857b17Sopenharmony_ci} 393e0857b17Sopenharmony_ci}