1 /* 2 * Copyright (c) 2022 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 #ifndef OHOS_IDL_MODULE_TEST_IDL_FILE_H 17 #define OHOS_IDL_MODULE_TEST_IDL_FILE_H 18 19 #include <string> 20 21 namespace OHOS { 22 namespace Idl { 23 namespace TestCommon { 24 const std::string LICENSE_CONTENT = 25 "/*\n" 26 " * Copyright (C) 2022 Device Co., Ltd.\n" 27 " * Licensed under the Apache License, Version 2.0 (the \"License\");\n" 28 " * you may not use this file except in compliance with the License.\n" 29 " * You may obtain a copy of the License at\n" 30 " *\n" 31 " * http://www.apache.org/licenses/LICENSE-2.0\n" 32 " *\n" 33 " * Unless required by applicable law or agreed to in writing, software\n" 34 " * distributed under the License is distributed on an \"AS IS\" BASIS,\n" 35 " * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n" 36 " * See the License for the specific language governing permissions and\n" 37 " * limitations under the License.\n" 38 " */\n" 39 "\n"; 40 const std::string UNKNOW_TYPE_IDL_NAME = "IIdlTest.idl"; 41 42 const std::string UNKNOW_TYPE_CASE1_IDL_CONTENT = 43 "interface idl.systemtest.IIdlTest {\n" 44 " void voidOrderOutChar([in] char param1, [out] char param2);\n" 45 "}"; 46 47 const std::string UNKNOW_TYPE_CASE2_IDL_CONTENT = 48 "interface idl.systemtest.IIdlTest {\n" 49 " void voidOrderOutList([in] List<int> param1, [out] List<int> param2);\n" 50 "}"; 51 52 const std::string UNKNOW_TYPE_CASE3_IDL_CONTENT = 53 "interface idl.systemtest.IIdlTest {\n" 54 " void voidOrderOutMapChar([in] Map<int, char> param1, [out] Map<int, char> param2);\n" 55 "}"; 56 57 const std::string UNKNOW_TYPE_CASE4_IDL_CONTENT = 58 "interface idl.systemtest.IIdlTest {\n" 59 " void voidOrderOutMapList([in] Map<int, List<int>> param1, [out] Map<int, List<int>> param2);\n" 60 "}"; 61 62 const std::string UNKNOW_TYPE_CASE5_IDL_CONTENT = 63 "interface idl.systemtest.IIdlTest {\n" 64 " char voidOrderReturnChar();\n" 65 "}"; 66 67 const std::string UNKNOW_TYPE_CASE6_IDL_CONTENT = 68 "interface idl.systemtest.IIdlTest {\n" 69 " List<int> voidOrderReturnList();\n" 70 "}"; 71 72 const std::string UNKNOW_TYPE_CASE7_IDL_CONTENT = 73 "interface idl.systemtest.IIdlTest {\n" 74 " Map<int, char> voidOrderReturnMapChar();\n" 75 "}"; 76 77 const std::string UNKNOW_TYPE_CASE8_IDL_CONTENT = 78 "interface idl.systemtest.IIdlTest {\n" 79 " Map<int, List<int>> voidOrderReturnMapList();\n" 80 "}"; 81 82 const std::string NORMAL_TYPE_IDL_CONTENT = 83 "interface idl.systemtest.IInterfaceDeclare;\n" 84 "sequenceable idl.systemtest.MySequenceable;\n" 85 "interface idl.systemtest.IIdlTest {\n" 86 " int voidOrderOutInt([in] int param1, [out] int param2);\n" 87 "}"; 88 89 const std::string NO_RETURN_IDL_CONTENT = 90 "interface idl.systemtest.IIdlTest {\n" 91 " voidOrderNoReturn();\n" 92 "}"; 93 94 const std::string NO_FUNCTION_NAME_IDL_CONTENT = 95 "interface idl.systemtest.IIdlTest {\n" 96 " int ([in] int param1, [out] int param2);\n" 97 "}"; 98 99 const std::string SAME_FUNCTION_NAME_IDL_CONTENT = 100 "interface idl.systemtest.IIdlTest {\n" 101 " int voidOrderOutInt([in] int param1, [out] int param2);\n" 102 " int voidOrderOutInt([in] int param1);\n" 103 "}"; 104 105 const std::string UNSIGNED_CHAR_TYPE_IDL_CONTENT = 106 "interface idl.systemtest.IIdlTest {\n" 107 " unsigned char voidOrderOutUnsignedChar([in] unsigned char param1, [out] unsigned char param2);\n" 108 "}"; 109 110 const std::string UNSIGNED_SHORT_TYPE_IDL_CONTENT = 111 "interface idl.systemtest.IIdlTest {\n" 112 " unsigned short voidOrderOutUnsignedShort([in] unsigned short param1, [out] unsigned short param2);\n" 113 "}"; 114 115 const std::string UNSIGNED_INT_TYPE_IDL_CONTENT = 116 "interface idl.systemtest.IIdlTest {\n" 117 " unsigned int voidOrderOutUnsignedInt([in] unsigned int param1, [out] unsigned int param2);\n" 118 "}"; 119 120 const std::string MULTIPLE_NAMESPACES_IDL_CONTENT = 121 "interface idl.systemtest.namespace3.namespace4.IIdlTest {\n" 122 " void voidParameterTypeVoid([in] int param1);\n" 123 "}"; 124 125 const std::string INOUT_SEPARATE_IDL_CONTENT = 126 "interface idl.systemtest.IIdlTest {\n" 127 " void voidParameterTypeVoid([inout] int param1);\n" 128 "}"; 129 130 const std::string INTERFACE_NO_CONTENT_IDL_CONTENT = 131 "interface idl.systemtest.IIdlTest {\n" 132 "}"; 133 134 const std::string PARAM_NO_INOUT_IDL_CONTENT = 135 "interface idl.systemtest.IIdlTest {\n" 136 " void voidParameterTypeVoid(int param1);\n" 137 "}"; 138 139 const std::string INOUT_NO_BIGPARANTHESES_IDL_CONTENT = 140 "interface idl.systemtest.IIdlTest {\n" 141 " void voidParameterTypeVoid(in int param1);\n" 142 "}"; 143 144 const std::string NORMAL_TYPE_IN_IDL_CONTENT = 145 "interface idl.systemtest.IInterfaceDeclare;\n" 146 "sequenceable idl.systemtest.MySequenceable;\n" 147 "interface idl.systemtest.IIdlTest {\n" 148 " void voidParameterTypeVoid([in] void param1);\n" 149 " void voidParameterTypeShort([in] short param1);\n" 150 " void voidParameterTypeByte([in] byte param2);\n" 151 " void voidParameterTypeInt([in] int param1);\n" 152 " void voidParameterTypeLong([in] long param1);\n" 153 " void voidParameterTypeFloat([in] float param1);\n" 154 " void voidParameterTypeString([in] String param1);\n" 155 " void voidParameterTypeDouble([in] double param1);\n" 156 " void voidParameterTypeBoolean([in] boolean param1);\n" 157 " void voidParameterTypeShortArray([in] short[] param1);\n" 158 " void voidParameterTypeByteArray([in] byte[] param2);\n" 159 " void voidParameterTypeIntArray([in] int[] param1);\n" 160 " void voidParameterTypeLongArray([in] long[] param1);\n" 161 " void voidParameterTypeFloatArray([in] float[] param1);\n" 162 " void voidParameterTypeStringArray([in] String[] param1);\n" 163 " void voidParameterTypeDoubleArray([in] double[] param1);\n" 164 " void voidParameterTypeBooleanArray([in] boolean[] param1);\n" 165 " void voidParameterTypeMySequenceable([in] MySequenceable mysequenceable);\n" 166 " void voidParameterTypeMySequenceableArray([in] MySequenceable[] mysequenceable);\n" 167 " void voidParameterTypeInterface([in] IInterfaceDeclare myInterface);\n" 168 " void voidMap([in] Map<String, MySequenceable> data);\n" 169 "}"; 170 171 const std::string NORMAL_TYPE_OUT_IDL_CONTENT = 172 "interface idl.systemtest.IInterfaceDeclare;\n" 173 "sequenceable idl.systemtest.MySequenceable;\n" 174 "interface idl.systemtest.IIdlTest {\n" 175 " void voidParameterTypeVoid([out] void param2);\n" 176 " void voidParameterTypeShort([out] short param2);\n" 177 " void voidParameterTypeByte([out] byte param2);\n" 178 " void voidParameterTypeInt([out] int param2);\n" 179 " void voidParameterTypeLong([out] long param2);\n" 180 " void voidParameterTypeFloat([out] float param2);\n" 181 " void voidParameterTypeString([out] String param2);\n" 182 " void voidParameterTypeDouble([out] double param2);\n" 183 " void voidParameterTypeBoolean([out] boolean param2);\n" 184 " void voidParameterTypeShortArray([out] short[] param2);\n" 185 " void voidParameterTypeByteArray([out] byte[] param2);\n" 186 " void voidParameterTypeIntArray([out] int[] param2);\n" 187 " void voidParameterTypeLongArray([out] long[] param2);\n" 188 " void voidParameterTypeFloatArray([out] float[] param2);\n" 189 " void voidParameterTypeStringArray([out] String[] param2);\n" 190 " void voidParameterTypeDoubleArray([out] double[] param2);\n" 191 " void voidParameterTypeBooleanArray([out] boolean[] param2);\n" 192 " void voidParameterTypeMySequenceable([out] MySequenceable mysequenceable);\n" 193 " void voidParameterTypeMySequenceableArray([out] MySequenceable[] mysequenceable);\n" 194 " void voidParameterTypeInterface([out] IInterfaceDeclare myInterface);\n" 195 " void voidMap([out] Map<String, MySequenceable> data);\n" 196 "}"; 197 198 const std::string NORMAL_TYPE_IN_AND_OUT_IDL_CONTENT = 199 "interface idl.systemtest.IInterfaceDeclare;\n" 200 "sequenceable idl.systemtest.MySequenceable;\n" 201 "interface idl.systemtest.IIdlTest {\n" 202 " void voidParameterTypeVoid([inout] void param2);\n" 203 " void voidParameterTypeShort([inout] short param2);\n" 204 " void voidParameterTypeByte([inout] byte param2);\n" 205 " void voidParameterTypeInt([inout] int param2);\n" 206 " void voidParameterTypeLong([inout] long param2);\n" 207 " void voidParameterTypeFloat([inout] float param2);\n" 208 " void voidParameterTypeString([inout] String param2);\n" 209 " void voidParameterTypeDouble([inout] double param2);\n" 210 " void voidParameterTypeBoolean([inout] boolean param2);\n" 211 " void voidParameterTypeShortArray([inout] short[] param2);\n" 212 " void voidParameterTypeByteArray([inout] byte[] param2);\n" 213 " void voidParameterTypeIntArray([inout] int[] param2);\n" 214 " void voidParameterTypeLongArray([inout] long[] param2);\n" 215 " void voidParameterTypeFloatArray([inout] float[] param2);\n" 216 " void voidParameterTypeStringArray([inout] String[] param2);\n" 217 " void voidParameterTypeDoubleArray([inout] double[] param2);\n" 218 " void voidParameterTypeBooleanArray([inout] boolean[] param2);\n" 219 " void voidParameterTypeMySequenceable([inout] MySequenceable mysequenceable);\n" 220 " void voidParameterTypeMySequenceableArray([inout] MySequenceable[] mysequenceable);\n" 221 " void voidParameterTypeInterface([inout] IInterfaceDeclare myInterface);\n" 222 " void voidMap([inout] Map<String, MySequenceable> data);\n" 223 "}"; 224 225 const std::string NORMAL_TYPE_RETURN_IDL_CONTENT = 226 "interface idl.systemtest.IInterfaceDeclare;\n" 227 "sequenceable idl.systemtest.MySequenceable;\n" 228 "interface idl.systemtest.IIdlTest {\n" 229 " void voidParameterTypeVoid();\n" 230 " short voidParameterTypeShort();\n" 231 " byte voidParameterTypeByte();\n" 232 " int voidParameterTypeInt();\n" 233 " long voidParameterTypeLong();\n" 234 " float voidParameterTypeFloat();\n" 235 " String voidParameterTypeString();\n" 236 " double voidParameterTypeDouble();\n" 237 " boolean voidParameterTypeBoolean();\n" 238 " short[] voidParameterTypeShortArray();\n" 239 " byte[] voidParameterTypeByteArray();\n" 240 " int[] voidParameterTypeIntArray();\n" 241 " long[] voidParameterTypeLongArray();\n" 242 " float[] voidParameterTypeFloatArray();\n" 243 " String[] voidParameterTypeStringArray();\n" 244 " double[] voidParameterTypeDoubleArray();\n" 245 " boolean[] voidParameterTypeBooleanArray();\n" 246 " MySequenceable voidParameterTypeMySequenceable();\n" 247 " MySequenceable[] voidParameterTypeMySequenceableArray();\n" 248 " Map<String, MySequenceable> voidMap();\n" 249 "}"; 250 251 const std::string NORMAL_TYPE_COMBINATION_IDL_CONTENT = 252 "interface idl.systemtest.IInterfaceDeclare;\n" 253 "sequenceable idl.systemtest.MySequenceable;\n" 254 "interface idl.systemtest.IIdlTest {\n" 255 " short voidParameterTypeShort([in] short param1, [out] short param2, [inout] short param3);\n" 256 " byte voidParameterTypeByte([in] byte param1, [out] byte param2, [inout] byte param3);\n" 257 " short[] voidParameterTypeShortArray([in] short[] param1, [out] short[] param2, [inout] short[] param3);\n" 258 " int[] voidParameterTypeIntArray([in] int[] param1, [inout] int[] param2 , [out] int[] param3);\n" 259 " long[] voidParameterTypeLongArray([in] long[] param1, [inout] long[] param2, [out] long[] param3);\n" 260 " float[] voidParameterTypeFloatArray([in] float[] param1, [inout] float[] param2, [out] float[] param3);\n" 261 " String[] voidParameterTypeStringArray([in] String[] param1, [inout] String[] param2, [out] String[] param3);\n" 262 " double[] voidParameterTypeDoubleArray([in] double[] param1, [inout] double[] param2, [out] double[] param3);\n" 263 " boolean[] voidParameterTypeBooleanArray([in] boolean[] param1," 264 "[inout] boolean[] param2, [out] boolean[] param3);\n" 265 " byte[] voidParameterTypeByteArray([in] byte[] param1, [out] byte[] param2, [inout] byte[] param3);\n" 266 " MySequenceable TestIntTransaction([in] MySequenceable mysequenceable1," 267 "[in, out] MySequenceable mysequenceable2, [out] MySequenceable mysequenceable3);\n" 268 " MySequenceable[] voidParameterTypeMySequenceableArray([in] MySequenceable[] mysequenceable1," 269 "[inout] MySequenceable[] mysequenceable2, [out] MySequenceable[] mysequenceable3);\n" 270 " void InOutMap([inout] Map<String, MySequenceable> data);\n" 271 " void InOutMapArray([inout] Map<String, MySequenceable[]> data);\n" 272 "}"; 273 274 275 const std::string NORMAL_TYPE_COMBINATION_IDL_CONTENT2 = 276 "interface idl.systemtest.IInterfaceDeclare;\n" 277 "sequenceable idl.systemtest.MySequenceable;\n" 278 "interface idl.systemtest.IIdlTest {\n" 279 " short voidParameterTypeShort([in] short param1, [out] short param2, [inout] short param3);\n" 280 " byte voidParameterTypeByte([in] float param1, [out] byte param2, [inout] byte param3);\n" 281 " short[] voidParameterTypeShortArray([in] short[] param1," 282 "[out] short[] param2, [inout] MySequenceable[] param3);\n" 283 " int[] voidParameterTypeIntArray([in] int[] param1," 284 "[inout] int[] param2 , [out] int[] param3);\n" 285 " long[] voidParameterTypeLongArray([in] short[] param1," 286 "[inout] MySequenceable[] param2, [out] long[] param3);\n" 287 " float[] voidParameterTypeFloatArray([in] float[] param1," 288 "[inout] float[] param2, [out] float[] param3);\n" 289 " String[] voidParameterTypeStringArray([in] MySequenceable[] param1," 290 "[inout] short[] param2, [out] String[] param3);\n" 291 "}"; 292 293 const std::string CAPITALIZATION_IDL_NAME = "CapitalizationIdlTest.idl"; 294 295 const std::string CAPITALIZATION_VOID_TYPE_IDL_CONTENT = 296 "interface idl.systemtest.CapitalizationIdlTest {\n" 297 " VOID voidOrderReturnVoid();\n" 298 "}"; 299 300 const std::string CAPITALIZATION_BOOL_TYPE_IDL_CONTENT = 301 "interface idl.systemtest.CapitalizationIdlTest {\n" 302 " BOOLEAN voidOrderReturnBOOLEAN();\n" 303 "}"; 304 305 const std::string CAPITALIZATION_INT_TYPE_IDL_CONTENT = 306 "interface idl.systemtest.CapitalizationIdlTest {\n" 307 " INT voidOrderReturnINT();\n" 308 "}"; 309 310 const std::string CAPITALIZATION_STRING_TYPE_IDL_CONTENT = 311 "interface idl.systemtest.CapitalizationIdlTest {\n" 312 " STRING voidOrderReturnSTRING();\n" 313 "}"; 314 315 const std::string CAPITALIZATION_INTERFACE_TYPE_IDL_CONTENT = 316 "INTERFACE idl.systemtest.CapitalizationIdlTest {\n" 317 " int voidOrderReturnInt();\n" 318 "}"; 319 320 const std::string CAPITALIZATION_IN_TYPE_IDL_CONTENT = 321 "interface idl.systemtest.CapitalizationIdlTest {\n" 322 " int voidOrderReturnInt([IN] int param1);\n" 323 "}"; 324 325 const std::string CAPITALIZATION_OUT_TYPE_IDL_CONTENT = 326 "interface idl.systemtest.CapitalizationIdlTest {\n" 327 " void voidOrderReturnVoid([OUT] int param1);\n" 328 "}"; 329 330 const std::string CAPITALIZATION_ONEWAY_TYPE_IDL_CONTENT = 331 "interface idl.systemtest.CapitalizationIdlTest {\n" 332 " [ONEWAY] void voidOrderReturnVoid();\n" 333 "}"; 334 335 const std::string CAPITALIZATION_SEQUENCEABLE_TYPE_IDL_CONTENT = 336 "interface idl.systemtest.IInterfaceDeclare;\n" 337 "SEQUENCEABLE idl.systemtest.MySequenceable;\n" 338 "interface idl.systemtest.CapitalizationIdlTest {\n" 339 " void voidOrderReturnVoid([in] MySequenceable mysequenceable);\n" 340 "}"; 341 342 const std::string CAPITALIZATION_MAP_TYPE_IDL_CONTENT = 343 "interface idl.systemtest.CapitalizationIdlTest {\n" 344 " MAP<int, int> voidOrderReturnMap();\n" 345 "}"; 346 347 const std::string NO_LICENSE_IDL_NAME = "NoLicenseIdlTest.idl"; 348 349 const std::string NO_LICENSE_VOID_TYPE_IDL_CONTENT = 350 "interface idl.systemtest.NoLicenseIdlTest {\n" 351 " void voidOrderReturnVoid();\n" 352 "}"; 353 354 const std::string NO_LICENSE_BOOL_TYPE_IDL_CONTENT = 355 "interface idl.systemtest.NoLicenseIdlTest {\n" 356 " boolean voidOrderReturnBOOLEAN();\n" 357 "}"; 358 359 const std::string NO_LICENSE_INT_TYPE_IDL_CONTENT = 360 "interface idl.systemtest.NoLicenseIdlTest {\n" 361 " int voidOrderReturnINT();\n" 362 "}"; 363 364 const std::string NO_LICENSE_STRING_TYPE_IDL_CONTENT = 365 "interface idl.systemtest.NoLicenseIdlTest {\n" 366 " String voidOrderReturnSTRING();\n" 367 "}"; 368 369 const std::string NO_LICENSE_INTERFACE_TYPE_IDL_CONTENT = 370 "interface idl.systemtest.IInterfaceDeclare;\n" 371 "interface idl.systemtest.NoLicenseIdlTest {\n" 372 " void inInterface([in] IInterfaceDeclare obj);\n" 373 "}"; 374 375 const std::string NO_LICENSE_IN_TYPE_IDL_CONTENT = 376 "interface idl.systemtest.NoLicenseIdlTest {\n" 377 " int voidOrderReturnInt([in] int param1);\n" 378 "}"; 379 380 const std::string NO_LICENSE_OUT_TYPE_IDL_CONTENT = 381 "interface idl.systemtest.NoLicenseIdlTest {\n" 382 " void voidOrderReturnVoid([out] int param1);\n" 383 "}"; 384 385 const std::string NO_LICENSE_ONEWAY_TYPE_IDL_CONTENT = 386 "interface idl.systemtest.NoLicenseIdlTest {\n" 387 " [oneway] void voidOrderReturnVoid();\n" 388 "}"; 389 390 const std::string NO_LICENSE_SEQUENCEABLE_TYPE_IDL_CONTENT = 391 "sequenceable idl.systemtest.MySequenceable;\n" 392 "interface idl.systemtest.NoLicenseIdlTest {\n" 393 " void voidOrderReturnVoid([in] MySequenceable mysequenceable);\n" 394 "}"; 395 396 const std::string NO_LICENSE_MAP_TYPE_IDL_CONTENT = 397 "interface idl.systemtest.NoLicenseIdlTest {\n" 398 " Map<int, int> voidOrderReturnMap();\n" 399 "}"; 400 401 const std::string NO_INTERFACE_IDL_NAME = "NoInterfaceIdlTest.idl"; 402 403 const std::string NO_INTERFACE_VOID_TYPE_IDL_CONTENT = 404 "idl.systemtest.NoInterfaceIdlTest {\n" 405 " void voidOrderReturnVoid();\n" 406 "}"; 407 408 const std::string NO_INTERFACE_BOOL_TYPE_IDL_CONTENT = 409 "idl.systemtest.NoInterfaceIdlTest {\n" 410 " boolean voidOrderReturnBOOLEAN();\n" 411 "}"; 412 413 const std::string NO_INTERFACE_INT_TYPE_IDL_CONTENT = 414 "idl.systemtest.NoInterfaceIdlTest {\n" 415 " int voidOrderReturnINT();\n" 416 "}"; 417 418 const std::string NO_INTERFACE_STRING_TYPE_IDL_CONTENT = 419 "idl.systemtest.NoInterfaceIdlTest {\n" 420 " String voidOrderReturnSTRING();\n" 421 "}"; 422 423 const std::string NO_INTERFACE_INTERFACE_TYPE_IDL_CONTENT = 424 "interface idl.systemtest.IInterfaceDeclare;\n" 425 "idl.systemtest.NoInterfaceIdlTest {\n" 426 " int voidOrderReturnInt([in] IInterfaceDeclare obj);\n" 427 "}"; 428 429 const std::string NO_INTERFACE_IN_TYPE_IDL_CONTENT = 430 "idl.systemtest.NoInterfaceIdlTest {\n" 431 " int voidOrderReturnInt([in] int param1);\n" 432 "}"; 433 434 const std::string NO_INTERFACE_OUT_TYPE_IDL_CONTENT = 435 "idl.systemtest.NoInterfaceIdlTest {\n" 436 " void voidOrderReturnVoid([out] int param1);\n" 437 "}"; 438 439 const std::string NO_INTERFACE_ONEWAY_TYPE_IDL_CONTENT = 440 "idl.systemtest.NoInterfaceIdlTest {\n" 441 " [oneway] void voidOrderReturnVoid();\n" 442 "}"; 443 444 const std::string NO_INTERFACE_SEQUENCEABLE_TYPE_IDL_CONTENT = 445 "sequenceable idl.systemtest.MySequenceable;\n" 446 "idl.systemtest.NoInterfaceIdlTest {\n" 447 " void voidOrderReturnVoid([in] MySequenceable mysequenceable);\n" 448 "}"; 449 450 const std::string NO_INTERFACE_MAP_TYPE_IDL_CONTENT = 451 "idl.systemtest.NoInterfaceIdlTest {\n" 452 " Map<int, int> voidOrderReturnMap();\n" 453 "}"; 454 455 const std::string I_ABNORMAL_IDL_NAME = "IAbnormalIdlTest.idl"; 456 457 const std::string IN_KEYWORD_AFTER_TYPE_IDL_CONTENT = 458 "interface idl.IAbnormalIdlTest {\n" 459 " void voidReturn(int [in] data);\n" 460 "}"; 461 462 const std::string NOT_EQUAL_TO_FILENAME_IDL_CONTENT = 463 "interface idl.NotEqualToFileNameTest {\n" 464 " void voidReturn([in] int data);\n" 465 "}"; 466 467 const std::string I_ABNORMAL_SCENE_IDL_NAME = "IAbnormalIdlTest.abc"; 468 469 const std::string ABNORMAL_SCENE_IDL_CONTENT = 470 "interface idl.IAbnormalIdlTest {\n" 471 " void voidReturn([in] int data);\n" 472 "}"; 473 474 const std::string UNSIGNED_CHAR_IDL_CONTENT = 475 "interface idl.IAbnormalIdlTest {\n" 476 " void voidReturn([in] unsigned char data);\n" 477 "}"; 478 479 const std::string UNSIGNED_SHORT_IDL_CONTENT = 480 "interface idl.IAbnormalIdlTest {\n" 481 " void voidReturn([in] unsigned short data);\n" 482 "}"; 483 484 const std::string UNSIGNED_INT_IDL_CONTENT = 485 "interface idl.IAbnormalIdlTest {\n" 486 " void voidReturn([in] unsigned int data);\n" 487 "}"; 488 489 const std::string UNSIGNED_LONG_IDL_CONTENT = 490 "interface idl.IAbnormalIdlTest {\n" 491 " void voidReturn([in] unsigned long data);\n" 492 "}"; 493 494 const std::string EMPTY_IDL_CONTENT = ""; 495 496 const std::string NOT_RETURN_IDL_CONTENT = 497 "interface idl.IAbnormalIdlTest {\n" 498 " voidReturn([in] int data);\n" 499 "}"; 500 501 const std::string NOT_FUNCTION_IDL_CONTENT = 502 "interface idl.IAbnormalIdlTest {\n" 503 " void ([in] int data);\n" 504 "}"; 505 506 const std::string SAME_FUNCTION_IDL_CONTENT = 507 "interface idl.IAbnormalIdlTest {\n" 508 " void func([in] int data);\n" 509 " void func([in] int data, [in] int size);\n" 510 "}"; 511 512 const std::string FUNCTION_NAME_TOO_LONG_IDL_CONTENT = 513 "interface idl.IAbnormalIdlTest {\n" 514 " void funcdsadasdsadasdasdasdasdasdasdassadasdasdasdasdasd\ 515 asdasdasdasdasdasdasddddddddddddddddddddddddddddddddddddddddd\ 516 dsaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaassddd\ 517 asddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd\ 518 saddddddddddddddddsssssssssssssssssssssssssssssssssssssssssss\ 519 sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss\ 520 sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss\ 521 sssssssssssssssssssssssssssssssssssssssssss([in] int data);\n" 522 "}"; 523 524 const std::string VARIABLE_NAME_TOO_LONG_IDL_CONTENT = 525 "interface idl.IAbnormalIdlTest {\n" 526 " void func([in] int datadddddddddddddddddddddddddddddddddddd\ 527 ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd\ 528 ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd\ 529 ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd\ 530 ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd\ 531 ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd\ 532 ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd\ 533 ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd);\n" 534 "}"; 535 536 const std::string INTERFACE_SPECIAL_NAME_IDL_NAME = "SpecialNameTest.idl"; 537 538 const std::string INTERFACE_SPECIAL_NAME_IDL_CONTENT = 539 "interface idl.systemtest.SpecialNameTest {\n" 540 " void voidParameterTypeShort([in] short param1);\n" 541 "}"; 542 } 543 } 544 } 545 #endif // OHOS_AAFWK_ABILITY_CONFIG_H