1 /* 2 * Copyright (c) 2021 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 #include <wctype.h> 17 18 #include "gtest/gtest.h" 19 #include "log.h" 20 #include "utils.h" 21 22 using namespace testing::ext; 23 24 class ActsUtilWideCheckApiTest : public testing::Test { 25 public: 26 locale_t g_auwcaLocale; 27 protected: 28 // SetUpTestCase: Testsuit setup, run before 1st testcase SetUpTestCase(void)29 static void SetUpTestCase(void) 30 { 31 } 32 // TearDownTestCase: Testsuit teardown, run after last testcase TearDownTestCase(void)33 static void TearDownTestCase(void) 34 { 35 } 36 // Testcase setup SetUp()37 virtual void SetUp() 38 { 39 g_auwcaLocale = newlocale(LC_ALL_MASK, "", (locale_t)0); 40 } 41 // Testcase teardown TearDown()42 virtual void TearDown() 43 { 44 freelocale(g_auwcaLocale); 45 } 46 }; 47 48 /** 49 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWALNUM_0100 50 * @tc.name test iswalnum api with num 51 * @tc.desc [C- SOFTWARE -0200] 52 */ 53 HWTEST_F(ActsUtilWideCheckApiTest, testIswalnum0100, Function | MediumTest | Level1) { 54 wint_t paraVal; 55 int returnVal; 56 57 paraVal = '2'; 58 returnVal = iswalnum(paraVal); 59 LOGD(" iswalnum returnVal:='%d'\n", returnVal); 60 ASSERT_TRUE(returnVal != 0) << "ErrInfo: iswalnum returnVal:='" << returnVal << "'"; 61 } 62 63 /** 64 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWALNUM_0200 65 * @tc.name test iswalnum api with upper alpha 66 * @tc.desc [C- SOFTWARE -0200] 67 */ 68 HWTEST_F(ActsUtilWideCheckApiTest, testIswalnum0200, Function | MediumTest | Level1) { 69 wint_t paraVal; 70 int returnVal; 71 72 paraVal = 'Z'; 73 returnVal = iswalnum(paraVal); 74 LOGD(" iswalnum returnVal:='%d'\n", returnVal); 75 ASSERT_TRUE(returnVal != 0) << "ErrInfo: iswalnum returnVal:='" << returnVal << "'"; 76 } 77 78 /** 79 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWALNUM_0300 80 * @tc.name test iswalnum api with lower alpha 81 * @tc.desc [C- SOFTWARE -0200] 82 */ 83 HWTEST_F(ActsUtilWideCheckApiTest, testIswalnum0300, Function | MediumTest | Level1) { 84 wint_t paraVal; 85 int returnVal; 86 87 paraVal = 'z'; 88 returnVal = iswalnum(paraVal); 89 LOGD(" iswalnum returnVal:='%d'\n", returnVal); 90 ASSERT_TRUE(returnVal != 0) << "ErrInfo: iswalnum returnVal:='" << returnVal << "'"; 91 } 92 93 /** 94 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWALNUM_0400 95 * @tc.name test iswalnum api with space 96 * @tc.desc [C- SOFTWARE -0200] 97 */ 98 HWTEST_F(ActsUtilWideCheckApiTest, testIswalnum0400, Function | MediumTest | Level1) { 99 wint_t paraVal; 100 int returnVal; 101 102 paraVal = ' '; 103 returnVal = iswalnum(paraVal); 104 LOGD(" iswalnum returnVal:='%d'\n", returnVal); 105 ASSERT_TRUE(0 == returnVal) << "ErrInfo: iswalnum returnVal:='" << returnVal << "'"; 106 } 107 108 /** 109 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWALNUM_0500 110 * @tc.name test iswalnum api with LF 111 * @tc.desc [C- SOFTWARE -0200] 112 */ 113 HWTEST_F(ActsUtilWideCheckApiTest, testIswalnum0500, Function | MediumTest | Level1) { 114 wint_t paraVal; 115 int returnVal; 116 117 paraVal = '\n'; 118 returnVal = iswalnum(paraVal); 119 LOGD(" iswalnum returnVal:='%d'\n", returnVal); 120 ASSERT_TRUE(0 == returnVal) << "ErrInfo: iswalnum returnVal:='" << returnVal << "'"; 121 } 122 123 /** 124 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWALNUM_L_0600 125 * @tc.name test iswalnum_l api with num 126 * @tc.desc [C- SOFTWARE -0200] 127 */ 128 HWTEST_F(ActsUtilWideCheckApiTest, testIswalnumL0600, Function | MediumTest | Level1) { 129 wint_t paraVal; 130 int returnVal; 131 132 paraVal = '2'; 133 returnVal = iswalnum_l(paraVal, g_auwcaLocale); 134 LOGD(" iswalnum_l returnVal:='%d'\n", returnVal); 135 ASSERT_TRUE(returnVal != 0) << "ErrInfo: iswalnum_l returnVal:='" << returnVal << "'"; 136 } 137 138 /** 139 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWALNUM_L_0700 140 * @tc.name test iswalnum_l api with upper alpha 141 * @tc.desc [C- SOFTWARE -0200] 142 */ 143 HWTEST_F(ActsUtilWideCheckApiTest, testIswalnumL0700, Function | MediumTest | Level1) { 144 wint_t paraVal; 145 int returnVal; 146 147 paraVal = 'Z'; 148 returnVal = iswalnum_l(paraVal, g_auwcaLocale); 149 LOGD(" iswalnum_l returnVal:='%d'\n", returnVal); 150 ASSERT_TRUE(returnVal != 0) << "ErrInfo: iswalnum_l returnVal:='" << returnVal << "'"; 151 } 152 153 /** 154 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWALNUM_L_0800 155 * @tc.name test iswalnum_l api with lower alpha 156 * @tc.desc [C- SOFTWARE -0200] 157 */ 158 HWTEST_F(ActsUtilWideCheckApiTest, testIswalnumL0800, Function | MediumTest | Level1) { 159 wint_t paraVal; 160 int returnVal; 161 162 paraVal = 'z'; 163 returnVal = iswalnum_l(paraVal, g_auwcaLocale); 164 LOGD(" iswalnum_l returnVal:='%d'\n", returnVal); 165 ASSERT_TRUE(returnVal != 0) << "ErrInfo: iswalnum_l returnVal:='" << returnVal << "'"; 166 } 167 168 /** 169 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWALNUM_L_0900 170 * @tc.name test iswalnum_l api with space 171 * @tc.desc [C- SOFTWARE -0200] 172 */ 173 HWTEST_F(ActsUtilWideCheckApiTest, testIswalnumL0900, Function | MediumTest | Level1) { 174 wint_t paraVal; 175 int returnVal; 176 177 paraVal = ' '; 178 returnVal = iswalnum_l(paraVal, g_auwcaLocale); 179 LOGD(" iswalnum_l returnVal:='%d'\n", returnVal); 180 ASSERT_TRUE(0 == returnVal) << "ErrInfo: iswalnum_l returnVal:='" << returnVal << "'"; 181 } 182 183 /** 184 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWALNUM_L_1000 185 * @tc.name test iswalnum_l api with LF 186 * @tc.desc [C- SOFTWARE -0200] 187 */ 188 HWTEST_F(ActsUtilWideCheckApiTest, testIswalnumL1000, Function | MediumTest | Level1) { 189 wint_t paraVal; 190 int returnVal; 191 192 paraVal = '\n'; 193 returnVal = iswalnum_l(paraVal, g_auwcaLocale); 194 LOGD(" iswalnum_l returnVal:='%d'\n", returnVal); 195 ASSERT_TRUE(0 == returnVal) << "ErrInfo: iswalnum_l returnVal:='" << returnVal << "'"; 196 } 197 198 /** 199 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWALPHA_1100 200 * @tc.name test iswalpha api with lower alpha 201 * @tc.desc [C- SOFTWARE -0200] 202 */ 203 HWTEST_F(ActsUtilWideCheckApiTest, testIswalpha1100, Function | MediumTest | Level1) { 204 wint_t paraVal; 205 int returnVal; 206 207 paraVal = 'z'; 208 returnVal = iswalpha(paraVal); 209 LOGD(" iswalpha returnVal:='%d'\n", returnVal); 210 ASSERT_TRUE(returnVal != 0) << "ErrInfo: iswalpha returnVal:='" << returnVal << "'"; 211 } 212 213 /** 214 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWALPHA_1200 215 * @tc.name test iswalpha api with upper alpha 216 * @tc.desc [C- SOFTWARE -0200] 217 */ 218 HWTEST_F(ActsUtilWideCheckApiTest, testIswalpha1200, Function | MediumTest | Level1) { 219 wint_t paraVal; 220 int returnVal; 221 222 paraVal = 'Z'; 223 returnVal = iswalpha(paraVal); 224 LOGD(" iswalpha returnVal:='%d'\n", returnVal); 225 ASSERT_TRUE(returnVal != 0) << "ErrInfo: iswalpha returnVal:='" << returnVal << "'"; 226 } 227 228 /** 229 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWALPHA_1300 230 * @tc.name test iswalpha api with space 231 * @tc.desc [C- SOFTWARE -0200] 232 */ 233 HWTEST_F(ActsUtilWideCheckApiTest, testIswalpha1300, Function | MediumTest | Level1) { 234 wint_t paraVal; 235 int returnVal; 236 237 paraVal = ' '; 238 returnVal = iswalpha(paraVal); 239 LOGD(" iswalpha returnVal:='%d'\n", returnVal); 240 ASSERT_TRUE(0 == returnVal) << "ErrInfo: iswalpha returnVal:='" << returnVal << "'"; 241 } 242 243 /** 244 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWALPHA_1400 245 * @tc.name test iswalpha api with LF 246 * @tc.desc [C- SOFTWARE -0200] 247 */ 248 HWTEST_F(ActsUtilWideCheckApiTest, testIswalpha1400, Function | MediumTest | Level1) { 249 wint_t paraVal; 250 int returnVal; 251 252 paraVal = '\n'; 253 returnVal = iswalpha(paraVal); 254 LOGD(" iswalpha returnVal:='%d'\n", returnVal); 255 ASSERT_TRUE(0 == returnVal) << "ErrInfo: iswalpha returnVal:='" << returnVal << "'"; 256 } 257 258 /** 259 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWALPHA_L_1500 260 * @tc.name test iswalpha_l api with lower alpha 261 * @tc.desc [C- SOFTWARE -0200] 262 */ 263 HWTEST_F(ActsUtilWideCheckApiTest, testIswalphaL1500, Function | MediumTest | Level1) { 264 wint_t paraVal; 265 int returnVal; 266 267 paraVal = 'z'; 268 returnVal = iswalpha_l(paraVal, g_auwcaLocale); 269 LOGD(" iswalpha_l returnVal:='%d'\n", returnVal); 270 ASSERT_TRUE(returnVal != 0) << "ErrInfo: iswalpha_l returnVal:='" << returnVal << "'"; 271 } 272 273 /** 274 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWALPHA_L_1600 275 * @tc.name test iswalpha_l api with upper alpha 276 * @tc.desc [C- SOFTWARE -0200] 277 */ 278 HWTEST_F(ActsUtilWideCheckApiTest, testIswalphaL1600, Function | MediumTest | Level1) { 279 wint_t paraVal; 280 int returnVal; 281 282 paraVal = 'Z'; 283 returnVal = iswalpha_l(paraVal, g_auwcaLocale); 284 LOGD(" iswalpha_l returnVal:='%d'\n", returnVal); 285 ASSERT_TRUE(returnVal != 0) << "ErrInfo: iswalpha_l returnVal:='" << returnVal << "'"; 286 } 287 288 /** 289 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWALPHA_L_1700 290 * @tc.name test iswalpha_l api with space 291 * @tc.desc [C- SOFTWARE -0200] 292 */ 293 HWTEST_F(ActsUtilWideCheckApiTest, testIswalphaL1700, Function | MediumTest | Level1) { 294 wint_t paraVal; 295 int returnVal; 296 297 paraVal = ' '; 298 returnVal = iswalpha_l(paraVal, g_auwcaLocale); 299 LOGD(" iswalpha_l returnVal:='%d'\n", returnVal); 300 ASSERT_TRUE(0 == returnVal) << "ErrInfo: iswalpha_l returnVal:='" << returnVal << "'"; 301 } 302 303 /** 304 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWALPHA_L_1800 305 * @tc.name test iswalpha_l api with LF 306 * @tc.desc [C- SOFTWARE -0200] 307 */ 308 HWTEST_F(ActsUtilWideCheckApiTest, testIswalphaL1800, Function | MediumTest | Level1) { 309 wint_t paraVal; 310 int returnVal; 311 312 paraVal = '\n'; 313 returnVal = iswalpha_l(paraVal, g_auwcaLocale); 314 LOGD(" iswalpha_l returnVal:='%d'\n", returnVal); 315 ASSERT_TRUE(0 == returnVal) << "ErrInfo: iswalpha_l returnVal:='" << returnVal << "'"; 316 } 317 318 /** 319 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWBLANK_1900 320 * @tc.name test iswblank api with space 321 * @tc.desc [C- SOFTWARE -0200] 322 */ 323 HWTEST_F(ActsUtilWideCheckApiTest, testIswblank1900, Function | MediumTest | Level1) { 324 wint_t paraVal; 325 int returnVal; 326 327 paraVal = ' '; 328 returnVal = iswblank(paraVal); 329 LOGD(" iswblank returnVal:='%d'\n", returnVal); 330 ASSERT_TRUE(returnVal != 0) << "ErrInfo: iswblank returnVal:='" << returnVal << "'"; 331 } 332 333 /** 334 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWBLANK_2000 335 * @tc.name test iswblank api with alpha 336 * @tc.desc [C- SOFTWARE -0200] 337 */ 338 HWTEST_F(ActsUtilWideCheckApiTest, testIswblank2000, Function | MediumTest | Level1) { 339 wint_t paraVal; 340 int returnVal; 341 342 paraVal = 'A'; 343 returnVal = iswblank(paraVal); 344 LOGD(" iswblank returnVal:='%d'\n", returnVal); 345 ASSERT_TRUE(0 == returnVal) << "ErrInfo: iswblank returnVal:='" << returnVal << "'"; 346 } 347 348 /** 349 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWBLANK_L_2100 350 * @tc.name test iswblank_l api with space 351 * @tc.desc [C- SOFTWARE -0200] 352 */ 353 HWTEST_F(ActsUtilWideCheckApiTest, testIswblankL2100, Function | MediumTest | Level1) { 354 wint_t paraVal; 355 int returnVal; 356 357 paraVal = ' '; 358 returnVal = iswblank_l(paraVal, g_auwcaLocale); 359 LOGD(" iswblank_l returnVal:='%d'\n", returnVal); 360 ASSERT_TRUE(returnVal != 0) << "ErrInfo: iswblank_l returnVal:='" << returnVal << "'"; 361 } 362 363 /** 364 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWBLANK_L_2200 365 * @tc.name test iswblank_l api with alpha 366 * @tc.desc [C- SOFTWARE -0200] 367 */ 368 HWTEST_F(ActsUtilWideCheckApiTest, testIswblankL2200, Function | MediumTest | Level1) { 369 wint_t paraVal; 370 int returnVal; 371 372 paraVal = 'A'; 373 returnVal = iswblank_l(paraVal, g_auwcaLocale); 374 LOGD(" iswblank_l returnVal:='%d'\n", returnVal); 375 ASSERT_TRUE(0 == returnVal) << "ErrInfo: iswblank_l returnVal:='" << returnVal << "'"; 376 } 377 378 /** 379 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWCNTRL_2300 380 * @tc.name test iswcntrl api with LF 381 * @tc.desc [C- SOFTWARE -0200] 382 */ 383 HWTEST_F(ActsUtilWideCheckApiTest, testIswcntrl2300, Function | MediumTest | Level1) { 384 wint_t paraVal; 385 int returnVal; 386 387 paraVal = '\n'; 388 returnVal = iswcntrl(paraVal); 389 LOGD(" iswcntrl returnVal:='%d'\n", returnVal); 390 ASSERT_TRUE(returnVal != 0) << "ErrInfo: iswcntrl returnVal:='" << returnVal << "'"; 391 } 392 393 /** 394 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWCNTRL_2400 395 * @tc.name test iswcntrl api with alpha 396 * @tc.desc [C- SOFTWARE -0200] 397 */ 398 HWTEST_F(ActsUtilWideCheckApiTest, testIswcntrl2400, Function | MediumTest | Level1) { 399 wint_t paraVal; 400 int returnVal; 401 402 paraVal = 'A'; 403 returnVal = iswcntrl(paraVal); 404 LOGD(" iswcntrl returnVal:='%d'\n", returnVal); 405 ASSERT_TRUE(0 == returnVal) << "ErrInfo: iswcntrl returnVal:='" << returnVal << "'"; 406 } 407 408 /** 409 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWCNTRL_L_2500 410 * @tc.name test iswcntrl_l api with LF 411 * @tc.desc [C- SOFTWARE -0200] 412 */ 413 HWTEST_F(ActsUtilWideCheckApiTest, testIswcntrlL2500, Function | MediumTest | Level1) { 414 wint_t paraVal; 415 int returnVal; 416 417 paraVal = '\n'; 418 returnVal = iswcntrl_l(paraVal, g_auwcaLocale); 419 LOGD(" iswcntrl_l returnVal:='%d'\n", returnVal); 420 ASSERT_TRUE(returnVal != 0) << "ErrInfo: iswcntrl_l returnVal:='" << returnVal << "'"; 421 } 422 423 /** 424 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWCNTRL_L_2600 425 * @tc.name test iswcntrl_l api with alpha 426 * @tc.desc [C- SOFTWARE -0200] 427 */ 428 HWTEST_F(ActsUtilWideCheckApiTest, testIswcntrlL2600, Function | MediumTest | Level1) { 429 wint_t paraVal; 430 int returnVal; 431 432 paraVal = 'A'; 433 returnVal = iswcntrl_l(paraVal, g_auwcaLocale); 434 LOGD(" iswcntrl_l returnVal:='%d'\n", returnVal); 435 ASSERT_TRUE(0 == returnVal) << "ErrInfo: iswcntrl_l returnVal:='" << returnVal << "'"; 436 } 437 438 /** 439 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWCTYPE_2700 440 * @tc.name test iswctype api with alpha 441 * @tc.desc [C- SOFTWARE -0200] 442 */ 443 HWTEST_F(ActsUtilWideCheckApiTest, testIswctype2700, Function | MediumTest | Level1) { 444 wint_t wideChar; 445 wctype_t paraDesc; 446 int returnVal; 447 448 wideChar = 'A'; 449 paraDesc = wctype("alnum"); 450 returnVal = iswctype(wideChar, paraDesc); 451 LOGD(" iswctype returnVal:='%d'\n", returnVal); 452 ASSERT_TRUE(returnVal != 0) << "ErrInfo: iswctype returnVal:='" << returnVal << "'"; 453 } 454 455 /** 456 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWCTYPE_2800 457 * @tc.name test iswctype api with digit 458 * @tc.desc [C- SOFTWARE -0200] 459 */ 460 HWTEST_F(ActsUtilWideCheckApiTest, testIswctype2800, Function | MediumTest | Level1) { 461 wint_t wideChar; 462 wctype_t paraDesc; 463 int returnVal; 464 465 wideChar = '3'; 466 paraDesc = wctype("alnum"); 467 returnVal = iswctype(wideChar, paraDesc); 468 LOGD(" iswctype returnVal:='%d'\n", returnVal); 469 ASSERT_TRUE(returnVal != 0) << "ErrInfo: iswctype returnVal:='" << returnVal << "'"; 470 } 471 472 /** 473 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWCTYPE_L_2900 474 * @tc.name test iswctype_l api with alpha 475 * @tc.desc [C- SOFTWARE -0200] 476 */ 477 HWTEST_F(ActsUtilWideCheckApiTest, testIswctypeL2900, Function | MediumTest | Level1) { 478 wint_t wideChar; 479 wctype_t paraDesc; 480 int returnVal; 481 482 wideChar = 'A'; 483 paraDesc = wctype("alnum"); 484 returnVal = iswctype_l(wideChar, paraDesc, g_auwcaLocale); 485 LOGD(" iswctype_l returnVal:='%d'\n", returnVal); 486 ASSERT_TRUE(returnVal != 0) << "ErrInfo: iswctype_l returnVal:='" << returnVal << "'"; 487 } 488 489 /** 490 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWCTYPE_L_3000 491 * @tc.name test iswctype_l api with digit 492 * @tc.desc [C- SOFTWARE -0200] 493 */ 494 HWTEST_F(ActsUtilWideCheckApiTest, testIswctypeL3000, Function | MediumTest | Level1) { 495 wint_t wideChar; 496 wctype_t paraDesc; 497 int returnVal; 498 499 wideChar = '3'; 500 paraDesc = wctype("alnum"); 501 returnVal = iswctype_l(wideChar, paraDesc, g_auwcaLocale); 502 LOGD(" iswctype_l returnVal:='%d'\n", returnVal); 503 ASSERT_TRUE(returnVal != 0) << "ErrInfo: iswctype_l returnVal:='" << returnVal << "'"; 504 } 505 506 /** 507 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWDIGIT_3100 508 * @tc.name test iswdigit api with digit 509 * @tc.desc [C- SOFTWARE -0200] 510 */ 511 HWTEST_F(ActsUtilWideCheckApiTest, testIswdigit3100, Function | MediumTest | Level1) { 512 wint_t wideChar; 513 int returnVal; 514 515 wideChar = '3'; 516 returnVal = iswdigit(wideChar); 517 LOGD(" iswdigit returnVal:='%d'\n", returnVal); 518 ASSERT_TRUE(returnVal != 0) << "ErrInfo: iswdigit returnVal:='" << returnVal << "'"; 519 } 520 521 /** 522 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWDIGIT_3200 523 * @tc.name test iswdigit api with alpha 524 * @tc.desc [C- SOFTWARE -0200] 525 */ 526 HWTEST_F(ActsUtilWideCheckApiTest, testIswdigit3200, Function | MediumTest | Level1) { 527 wint_t wideChar; 528 int returnVal; 529 530 wideChar = 'A'; 531 returnVal = iswdigit(wideChar); 532 LOGD(" iswdigit returnVal:='%d'\n", returnVal); 533 ASSERT_TRUE(0 == returnVal) << "ErrInfo: iswdigit returnVal:='" << returnVal << "'"; 534 } 535 536 /** 537 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWDIGIT_L_3300 538 * @tc.name test iswdigit_l api with digit 539 * @tc.desc [C- SOFTWARE -0200] 540 */ 541 HWTEST_F(ActsUtilWideCheckApiTest, testIswdigitL3300, Function | MediumTest | Level1) { 542 wint_t wideChar; 543 int returnVal; 544 545 wideChar = '3'; 546 returnVal = iswdigit_l(wideChar, g_auwcaLocale); 547 LOGD(" iswdigit_l returnVal:='%d'\n", returnVal); 548 ASSERT_TRUE(returnVal != 0) << "ErrInfo: iswdigit_l returnVal:='" << returnVal << "'"; 549 } 550 551 /** 552 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWDIGIT_L_3400 553 * @tc.name test iswdigit api with alpha 554 * @tc.desc [C- SOFTWARE -0200] 555 */ 556 HWTEST_F(ActsUtilWideCheckApiTest, testIswdigitL3400, Function | MediumTest | Level1) { 557 wint_t wideChar; 558 int returnVal; 559 560 wideChar = 'A'; 561 returnVal = iswdigit_l(wideChar, g_auwcaLocale); 562 LOGD(" iswdigit_l returnVal:='%d'\n", returnVal); 563 ASSERT_TRUE(0 == returnVal) << "ErrInfo: iswdigit_l returnVal:='" << returnVal << "'"; 564 } 565 566 /** 567 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWGRAPH_3500 568 * @tc.name test iswgraph api with alpha 569 * @tc.desc [C- SOFTWARE -0200] 570 */ 571 HWTEST_F(ActsUtilWideCheckApiTest, testIswgraph3500, Function | MediumTest | Level1) { 572 wint_t wideChar; 573 int returnVal; 574 575 wideChar = 'A'; 576 returnVal = iswgraph(wideChar); 577 LOGD(" iswgraph returnVal:='%d'\n", returnVal); 578 ASSERT_TRUE(returnVal != 0) << "ErrInfo: iswgraph returnVal:='" << returnVal << "'"; 579 } 580 581 /** 582 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWGRAPH_3600 583 * @tc.name test iswgraph api with LF 584 * @tc.desc [C- SOFTWARE -0200] 585 */ 586 HWTEST_F(ActsUtilWideCheckApiTest, testIswgraph3600, Function | MediumTest | Level1) { 587 wint_t wideChar; 588 int returnVal; 589 590 wideChar = '\n'; 591 returnVal = iswgraph(wideChar); 592 LOGD(" iswgraph returnVal:='%d'\n", returnVal); 593 ASSERT_TRUE(0 == returnVal) << "ErrInfo: iswgraph returnVal:='" << returnVal << "'"; 594 } 595 596 /** 597 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWGRAPH_L_3700 598 * @tc.name test iswgraph_l api with alpha 599 * @tc.desc [C- SOFTWARE -0200] 600 */ 601 HWTEST_F(ActsUtilWideCheckApiTest, testIswgraphL3700, Function | MediumTest | Level1) { 602 wint_t wideChar; 603 int returnVal; 604 605 wideChar = 'A'; 606 returnVal = iswgraph_l(wideChar, g_auwcaLocale); 607 LOGD(" iswgraph_l returnVal:='%d'\n", returnVal); 608 ASSERT_TRUE(returnVal != 0) << "ErrInfo: iswgraph_l returnVal:='" << returnVal << "'"; 609 } 610 611 /** 612 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWGRAPH_L_3800 613 * @tc.name test iswgraph_l api with LF 614 * @tc.desc [C- SOFTWARE -0200] 615 */ 616 HWTEST_F(ActsUtilWideCheckApiTest, testIswgraphL3800, Function | MediumTest | Level1) { 617 wint_t wideChar; 618 int returnVal; 619 620 wideChar = '\n'; 621 returnVal = iswgraph_l(wideChar, g_auwcaLocale); 622 LOGD(" iswgraph_l returnVal:='%d'\n", returnVal); 623 ASSERT_TRUE(0 == returnVal) << "ErrInfo: iswgraph_l returnVal:='" << returnVal << "'"; 624 } 625 626 /** 627 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWLOWER_3900 628 * @tc.name test iswlower api with upper alpha 629 * @tc.desc [C- SOFTWARE -0200] 630 */ 631 HWTEST_F(ActsUtilWideCheckApiTest, testIswlower3900, Function | MediumTest | Level1) { 632 wint_t wideChar; 633 int returnVal; 634 635 wideChar = 'A'; 636 returnVal = iswlower(wideChar); 637 LOGD(" iswlower c:='%c', returnVal:='%c'\n", wideChar, returnVal); 638 ASSERT_TRUE(0 == returnVal) << "ErrInfo: iswlower c:='" << wideChar << "', returnVal:='" << returnVal << "'"; 639 } 640 641 /** 642 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWLOWER_4000 643 * @tc.name test islower api with lower alpha 644 * @tc.desc [C- SOFTWARE -0200] 645 */ 646 HWTEST_F(ActsUtilWideCheckApiTest, testIswlower4000, Function | MediumTest | Level1) { 647 wint_t wideChar; 648 int returnVal; 649 650 wideChar = 'a'; 651 returnVal = iswlower(wideChar); 652 LOGD(" iswlower c:='%c', returnVal:='%c'\n", wideChar, returnVal); 653 ASSERT_TRUE(returnVal != 0) << "ErrInfo: iswlower c:='" << wideChar << "', returnVal:='" << returnVal << "'"; 654 } 655 656 /** 657 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWLOWER_4100 658 * @tc.name test islower api with digit 659 * @tc.desc [C- SOFTWARE -0200] 660 */ 661 HWTEST_F(ActsUtilWideCheckApiTest, testIswlower4100, Function | MediumTest | Level1) { 662 wint_t wideChar; 663 int returnVal; 664 665 wideChar = '5'; 666 returnVal = iswlower(wideChar); 667 LOGD(" iswlower c:='%c', returnVal:='%c'\n", wideChar, returnVal); 668 ASSERT_TRUE(0 == returnVal) << "ErrInfo: iswlower c:='" << wideChar << "', returnVal:='" << returnVal << "'"; 669 } 670 671 /** 672 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWLOWER_L_4200 673 * @tc.name test iswlower_l api with upper alpha 674 * @tc.desc [C- SOFTWARE -0200] 675 */ 676 HWTEST_F(ActsUtilWideCheckApiTest, testIswlowerL4200, Function | MediumTest | Level1) { 677 wint_t wideChar; 678 int returnVal; 679 680 wideChar = 'A'; 681 returnVal = iswlower_l(wideChar, g_auwcaLocale); 682 LOGD(" iswlower_l c:='%c', returnVal:='%c'\n", wideChar, returnVal); 683 ASSERT_TRUE(0 == returnVal) << "ErrInfo: iswlower_l c:='" << wideChar << "', returnVal:='" << returnVal << "'"; 684 } 685 686 /** 687 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWLOWER_L_4300 688 * @tc.name test iswlower_l api with lower alpha 689 * @tc.desc [C- SOFTWARE -0200] 690 */ 691 HWTEST_F(ActsUtilWideCheckApiTest, testIswlowerL4300, Function | MediumTest | Level1) { 692 wint_t wideChar; 693 int returnVal; 694 695 wideChar = 'a'; 696 returnVal = iswlower_l(wideChar, g_auwcaLocale); 697 LOGD(" iswlower_l c:='%c', returnVal:='%c'\n", wideChar, returnVal); 698 ASSERT_TRUE(returnVal != 0) << "ErrInfo: iswlower_l c:='" << wideChar << "', returnVal:='" << returnVal << "'"; 699 } 700 701 /** 702 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWLOWER_L_4400 703 * @tc.name test iswlower_l api with digit 704 * @tc.desc [C- SOFTWARE -0200] 705 */ 706 HWTEST_F(ActsUtilWideCheckApiTest, testIswlowerL4400, Function | MediumTest | Level1) { 707 wint_t wideChar; 708 int returnVal; 709 710 wideChar = '5'; 711 returnVal = iswlower_l(wideChar, g_auwcaLocale); 712 LOGD(" iswlower_l c:='%c', returnVal:='%c'\n", wideChar, returnVal); 713 ASSERT_TRUE(0 == returnVal) << "ErrInfo: iswlower_l c:='" << wideChar << "', returnVal:='" << returnVal << "'"; 714 } 715 716 /** 717 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWPRINT_4500 718 * @tc.name test iswprint api with alpha 719 * @tc.desc [C- SOFTWARE -0200] 720 */ 721 HWTEST_F(ActsUtilWideCheckApiTest, testIswprint4500, Function | MediumTest | Level1) { 722 wint_t wideChar; 723 int returnVal; 724 725 wideChar = 'a'; 726 returnVal = iswprint(wideChar); 727 LOGD(" iswprint returnVal:='%d'\n", returnVal); 728 ASSERT_TRUE(returnVal != 0) << "ErrInfo: iswprint returnVal:='" << returnVal << "'"; 729 } 730 731 /** 732 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWPRINT_4600 733 * @tc.name test iswprint api with LF 734 * @tc.desc [C- SOFTWARE -0200] 735 */ 736 HWTEST_F(ActsUtilWideCheckApiTest, testIswprint4600, Function | MediumTest | Level1) { 737 wint_t wideChar; 738 int returnVal; 739 740 wideChar = '\n'; 741 returnVal = iswprint(wideChar); 742 LOGD(" iswprint returnVal:='%d'\n", returnVal); 743 ASSERT_TRUE(0 == returnVal) << "ErrInfo: iswprint returnVal:='" << returnVal << "'"; 744 } 745 746 /** 747 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWPRINT_L_4700 748 * @tc.name test iswprint_l api with alpha 749 * @tc.desc [C- SOFTWARE -0200] 750 */ 751 HWTEST_F(ActsUtilWideCheckApiTest, testIswprintL4700, Function | MediumTest | Level1) { 752 wint_t wideChar; 753 int returnVal; 754 755 wideChar = 'a'; 756 returnVal = iswprint_l(wideChar, g_auwcaLocale); 757 LOGD(" iswprint_l returnVal:='%d'\n", returnVal); 758 ASSERT_TRUE(returnVal != 0) << "ErrInfo: iswprint_l returnVal:='" << returnVal << "'"; 759 } 760 761 /** 762 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWPRINT_L_4800 763 * @tc.name test iswprint_l api with LF 764 * @tc.desc [C- SOFTWARE -0200] 765 */ 766 HWTEST_F(ActsUtilWideCheckApiTest, testIswprintL4800, Function | MediumTest | Level1) { 767 wint_t wideChar; 768 int returnVal; 769 770 wideChar = '\n'; 771 returnVal = iswprint_l(wideChar, g_auwcaLocale); 772 LOGD(" iswprint_l returnVal:='%d'\n", returnVal); 773 ASSERT_TRUE(0 == returnVal) << "ErrInfo: iswprint_l returnVal:='" << returnVal << "'"; 774 } 775 776 /** 777 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWPUNCT_4900 778 * @tc.name test iswpunct api with space 779 * @tc.desc [C- SOFTWARE -0200] 780 */ 781 HWTEST_F(ActsUtilWideCheckApiTest, testIswpunct4900, Function | MediumTest | Level1) { 782 wint_t wideChar; 783 int returnVal; 784 785 wideChar = ' '; 786 returnVal = iswpunct(wideChar); 787 LOGD(" iswpunct returnVal:='%d'\n", returnVal); 788 ASSERT_TRUE(0 == returnVal) << "ErrInfo: iswpunct returnVal:='" << returnVal << "'"; 789 } 790 791 /** 792 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWPUNCT_5000 793 * @tc.name test iswpunct api with alpha 794 * @tc.desc [C- SOFTWARE -0200] 795 */ 796 HWTEST_F(ActsUtilWideCheckApiTest, testIswpunct5000, Function | MediumTest | Level1) { 797 wint_t wideChar; 798 int returnVal; 799 800 wideChar = 'A'; 801 returnVal = iswpunct(wideChar); 802 LOGD(" iswpunct returnVal:='%d'\n", returnVal); 803 ASSERT_TRUE(0 == returnVal) << "ErrInfo: iswpunct returnVal:='" << returnVal << "'"; 804 } 805 806 /** 807 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWPUNCT_5100 808 * @tc.name test iswpunct api with digit 809 * @tc.desc [C- SOFTWARE -0200] 810 */ 811 HWTEST_F(ActsUtilWideCheckApiTest, testIswpunct5100, Function | MediumTest | Level1) { 812 wint_t wideChar; 813 int returnVal; 814 815 wideChar = '3'; 816 returnVal = iswpunct(wideChar); 817 LOGD(" iswpunct returnVal:='%d'\n", returnVal); 818 ASSERT_TRUE(0 == returnVal) << "ErrInfo: iswpunct returnVal:='" << returnVal << "'"; 819 } 820 821 /** 822 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWPUNCT_5200 823 * @tc.name test iswpunct api with LF 824 * @tc.desc [C- SOFTWARE -0200] 825 */ 826 HWTEST_F(ActsUtilWideCheckApiTest, testIswpunct5200, Function | MediumTest | Level1) { 827 wint_t wideChar; 828 int returnVal; 829 830 wideChar = '\n'; 831 returnVal = iswpunct(wideChar); 832 LOGD(" iswpunct returnVal:='%d'\n", returnVal); 833 ASSERT_TRUE(0 == returnVal) << "ErrInfo: iswpunct returnVal:='" << returnVal << "'"; 834 } 835 836 /** 837 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWPUNCT_L_5300 838 * @tc.name test iswpunct_l api with space 839 * @tc.desc [C- SOFTWARE -0200] 840 */ 841 HWTEST_F(ActsUtilWideCheckApiTest, testIswpunctL5300, Function | MediumTest | Level1) { 842 wint_t wideChar; 843 int returnVal; 844 845 wideChar = ' '; 846 returnVal = iswpunct_l(wideChar, g_auwcaLocale); 847 LOGD(" iswpunct_l returnVal:='%d'\n", returnVal); 848 ASSERT_TRUE(0 == returnVal) << "ErrInfo: iswpunct_l returnVal:='" << returnVal << "'"; 849 } 850 851 /** 852 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWPUNCT_L_5400 853 * @tc.name test iswpunct_l api with alpha 854 * @tc.desc [C- SOFTWARE -0200] 855 */ 856 HWTEST_F(ActsUtilWideCheckApiTest, testIswpunctL5400, Function | MediumTest | Level1) { 857 wint_t wideChar; 858 int returnVal; 859 860 wideChar = 'A'; 861 returnVal = iswpunct_l(wideChar, g_auwcaLocale); 862 LOGD(" iswpunct_l returnVal:='%d'\n", returnVal); 863 ASSERT_TRUE(0 == returnVal) << "ErrInfo: iswpunct_l returnVal:='" << returnVal << "'"; 864 } 865 866 /** 867 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWPUNCT_L_5500 868 * @tc.name test iswpunct_l api with digit 869 * @tc.desc [C- SOFTWARE -0200] 870 */ 871 HWTEST_F(ActsUtilWideCheckApiTest, testIswpunctL5500, Function | MediumTest | Level1) { 872 wint_t wideChar; 873 int returnVal; 874 875 wideChar = '3'; 876 returnVal = iswpunct_l(wideChar, g_auwcaLocale); 877 LOGD(" iswpunct_l returnVal:='%d'\n", returnVal); 878 ASSERT_TRUE(0 == returnVal) << "ErrInfo: iswpunct_l returnVal:='" << returnVal << "'"; 879 } 880 881 /** 882 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWPUNCT_L_5600 883 * @tc.name test iswpunct_l api with LF 884 * @tc.desc [C- SOFTWARE -0200] 885 */ 886 HWTEST_F(ActsUtilWideCheckApiTest, testIswpunctL5600, Function | MediumTest | Level1) { 887 wint_t wideChar; 888 int returnVal; 889 890 wideChar = '\n'; 891 returnVal = iswpunct_l(wideChar, g_auwcaLocale); 892 LOGD(" iswpunct_l returnVal:='%d'\n", returnVal); 893 ASSERT_TRUE(0 == returnVal) << "ErrInfo: iswpunct_l returnVal:='" << returnVal << "'"; 894 } 895 896 /** 897 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWSPACE_5700 898 * @tc.name test iswspace api with alpha 899 * @tc.desc [C- SOFTWARE -0200] 900 */ 901 HWTEST_F(ActsUtilWideCheckApiTest, testIswspace5700, Function | MediumTest | Level1) { 902 wint_t wideChar; 903 int returnVal; 904 905 wideChar = 'a'; 906 returnVal = iswspace(wideChar); 907 LOGD(" iswspace returnVal:='%d'\n", returnVal); 908 ASSERT_TRUE(0 == returnVal) << "ErrInfo: iswspace returnVal:='" << returnVal << "'"; 909 } 910 911 /** 912 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWSPACE_5800 913 * @tc.name test iswspace api with space 914 * @tc.desc [C- SOFTWARE -0200] 915 */ 916 HWTEST_F(ActsUtilWideCheckApiTest, testIswspace5800, Function | MediumTest | Level1) { 917 wint_t wideChar; 918 int returnVal; 919 920 wideChar = ' '; 921 returnVal = iswspace(wideChar); 922 LOGD(" iswspace returnVal:='%d'\n", returnVal); 923 ASSERT_TRUE(returnVal != 0) << "ErrInfo: iswspace returnVal:='" << returnVal << "'"; 924 } 925 926 /** 927 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWSPACE_5900 928 * @tc.name test iswspace api with LF 929 * @tc.desc [C- SOFTWARE -0200] 930 */ 931 HWTEST_F(ActsUtilWideCheckApiTest, testIswspace5900, Function | MediumTest | Level1) { 932 wint_t wideChar; 933 int returnVal; 934 935 wideChar = '\n'; 936 returnVal = iswspace(wideChar); 937 LOGD(" iswspace returnVal:='%d'\n", returnVal); 938 ASSERT_TRUE(returnVal != 0) << "ErrInfo: iswspace returnVal:='" << returnVal << "'"; 939 } 940 941 /** 942 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWSPACE_6000 943 * @tc.name test iswspace api with CR 944 * @tc.desc [C- SOFTWARE -0200] 945 */ 946 HWTEST_F(ActsUtilWideCheckApiTest, testIswspace6000, Function | MediumTest | Level1) { 947 wint_t wideChar; 948 int returnVal; 949 950 wideChar = '\r'; 951 returnVal = iswspace(wideChar); 952 LOGD(" iswspace returnVal:='%d'\n", returnVal); 953 ASSERT_TRUE(returnVal != 0) << "ErrInfo: iswspace returnVal:='" << returnVal << "'"; 954 } 955 956 /** 957 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWSPACE_6100 958 * @tc.name test iswspace api with form-feed 959 * @tc.desc [C- SOFTWARE -0200] 960 */ 961 HWTEST_F(ActsUtilWideCheckApiTest, testIswspace6100, Function | MediumTest | Level1) { 962 wint_t wideChar; 963 int returnVal; 964 965 wideChar = '\f'; 966 returnVal = iswspace(wideChar); 967 LOGD(" iswspace returnVal:='%d'\n", returnVal); 968 ASSERT_TRUE(returnVal != 0) << "ErrInfo: iswspace returnVal:='" << returnVal << "'"; 969 } 970 971 /** 972 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWSPACE_6200 973 * @tc.name test iswspace api with horizontal tab 974 * @tc.desc [C- SOFTWARE -0200] 975 */ 976 HWTEST_F(ActsUtilWideCheckApiTest, testIswspace6200, Function | MediumTest | Level1) { 977 wint_t wideChar; 978 int returnVal; 979 980 wideChar = '\t'; 981 returnVal = iswspace(wideChar); 982 LOGD(" iswspace returnVal:='%d'\n", returnVal); 983 ASSERT_TRUE(returnVal != 0) << "ErrInfo: iswspace returnVal:='" << returnVal << "'"; 984 } 985 986 /** 987 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWSPACE_6300 988 * @tc.name test iswspace api with vertical tab 989 * @tc.desc [C- SOFTWARE -0200] 990 */ 991 HWTEST_F(ActsUtilWideCheckApiTest, testIswspace6300, Function | MediumTest | Level1) { 992 wint_t wideChar; 993 int returnVal; 994 995 wideChar = '\v'; 996 returnVal = iswspace(wideChar); 997 LOGD(" iswspace returnVal:='%d'\n", returnVal); 998 ASSERT_TRUE(returnVal != 0) << "ErrInfo: iswspace returnVal:='" << returnVal << "'"; 999 } 1000 1001 /** 1002 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWSPACE_L_6400 1003 * @tc.name test iswspace_l api with alpha 1004 * @tc.desc [C- SOFTWARE -0200] 1005 */ 1006 HWTEST_F(ActsUtilWideCheckApiTest, testIswspaceL6400, Function | MediumTest | Level1) { 1007 wint_t wideChar; 1008 int returnVal; 1009 1010 wideChar = 'a'; 1011 returnVal = iswspace_l(wideChar, g_auwcaLocale); 1012 LOGD(" iswspace_l returnVal:='%d'\n", returnVal); 1013 ASSERT_TRUE(0 == returnVal) << "ErrInfo: iswspace_l returnVal:='" << returnVal << "'"; 1014 } 1015 1016 /** 1017 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWSPACE_L_6500 1018 * @tc.name test iswspace_l api with space 1019 * @tc.desc [C- SOFTWARE -0200] 1020 */ 1021 HWTEST_F(ActsUtilWideCheckApiTest, testIswspaceL6500, Function | MediumTest | Level1) { 1022 wint_t wideChar; 1023 int returnVal; 1024 1025 wideChar = ' '; 1026 returnVal = iswspace_l(wideChar, g_auwcaLocale); 1027 LOGD(" iswspace_l returnVal:='%d'\n", returnVal); 1028 ASSERT_TRUE(returnVal != 0) << "ErrInfo: iswspace_l returnVal:='" << returnVal << "'"; 1029 } 1030 1031 /** 1032 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWSPACE_L_6600 1033 * @tc.name test iswspace_l api with LF 1034 * @tc.desc [C- SOFTWARE -0200] 1035 */ 1036 HWTEST_F(ActsUtilWideCheckApiTest, testIswspaceL6600, Function | MediumTest | Level1) { 1037 wint_t wideChar; 1038 int returnVal; 1039 1040 wideChar = '\n'; 1041 returnVal = iswspace_l(wideChar, g_auwcaLocale); 1042 LOGD(" iswspace_l returnVal:='%d'\n", returnVal); 1043 ASSERT_TRUE(returnVal != 0) << "ErrInfo: iswspace_l returnVal:='" << returnVal << "'"; 1044 } 1045 1046 /** 1047 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWSPACE_L_6700 1048 * @tc.name test iswspace_l api with CR 1049 * @tc.desc [C- SOFTWARE -0200] 1050 */ 1051 HWTEST_F(ActsUtilWideCheckApiTest, testIswspaceL6700, Function | MediumTest | Level1) { 1052 wint_t wideChar; 1053 int returnVal; 1054 1055 wideChar = '\r'; 1056 returnVal = iswspace_l(wideChar, g_auwcaLocale); 1057 LOGD(" iswspace_l returnVal:='%d'\n", returnVal); 1058 ASSERT_TRUE(returnVal != 0) << "ErrInfo: iswspace_l returnVal:='" << returnVal << "'"; 1059 } 1060 1061 /** 1062 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWSPACE_L_6800 1063 * @tc.name test iswspace_l api with form-feed 1064 * @tc.desc [C- SOFTWARE -0200] 1065 */ 1066 HWTEST_F(ActsUtilWideCheckApiTest, testIswspaceL6800, Function | MediumTest | Level1) { 1067 wint_t wideChar; 1068 int returnVal; 1069 1070 wideChar = '\f'; 1071 returnVal = iswspace_l(wideChar, g_auwcaLocale); 1072 LOGD(" iswspace_l returnVal:='%d'\n", returnVal); 1073 ASSERT_TRUE(returnVal != 0) << "ErrInfo: iswspace_l returnVal:='" << returnVal << "'"; 1074 } 1075 1076 /** 1077 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWSPACE_L_6900 1078 * @tc.name test iswspace_l api with horizontal tab 1079 * @tc.desc [C- SOFTWARE -0200] 1080 */ 1081 HWTEST_F(ActsUtilWideCheckApiTest, testIswspaceL6900, Function | MediumTest | Level1) { 1082 wint_t wideChar; 1083 int returnVal; 1084 1085 wideChar = '\t'; 1086 returnVal = iswspace_l(wideChar, g_auwcaLocale); 1087 LOGD(" iswspace_l returnVal:='%d'\n", returnVal); 1088 ASSERT_TRUE(returnVal != 0) << "ErrInfo: iswspace_l returnVal:='" << returnVal << "'"; 1089 } 1090 1091 /** 1092 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWSPACE_L_7000 1093 * @tc.name test iswspace_l api with vertical tab 1094 * @tc.desc [C- SOFTWARE -0200] 1095 */ 1096 HWTEST_F(ActsUtilWideCheckApiTest, testIswspaceL7000, Function | MediumTest | Level1) { 1097 wint_t wideChar; 1098 int returnVal; 1099 1100 wideChar = '\v'; 1101 returnVal = iswspace_l(wideChar, g_auwcaLocale); 1102 LOGD(" iswspace_l returnVal:='%d'\n", returnVal); 1103 ASSERT_TRUE(returnVal != 0) << "ErrInfo: iswspace_l returnVal:='" << returnVal << "'"; 1104 } 1105 1106 /** 1107 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWUPPER_7100 1108 * @tc.name test iswupper api with upper alpha 1109 * @tc.desc [C- SOFTWARE -0200] 1110 */ 1111 HWTEST_F(ActsUtilWideCheckApiTest, testIswupper7100, Function | MediumTest | Level1) { 1112 wint_t wideChar; 1113 int returnVal; 1114 1115 wideChar = 'A'; 1116 returnVal = iswupper(wideChar); 1117 LOGD(" iswupper returnVal:='%d'\n", returnVal); 1118 ASSERT_TRUE(returnVal != 0) << "ErrInfo: iswupper returnVal:='" << returnVal << "'"; 1119 } 1120 1121 /** 1122 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWUPPER_7200 1123 * @tc.name test iswupper api with lower alpha 1124 * @tc.desc [C- SOFTWARE -0200] 1125 */ 1126 HWTEST_F(ActsUtilWideCheckApiTest, testIswupper7200, Function | MediumTest | Level1) { 1127 wint_t wideChar; 1128 int returnVal; 1129 1130 wideChar = 'a'; 1131 returnVal = iswupper(wideChar); 1132 LOGD(" iswupper returnVal:='%d'\n", returnVal); 1133 ASSERT_TRUE(0 == returnVal) << "ErrInfo: iswupper returnVal:='" << returnVal << "'"; 1134 } 1135 1136 /** 1137 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWUPPER_7300 1138 * @tc.name test iswupper api with digit 1139 * @tc.desc [C- SOFTWARE -0200] 1140 */ 1141 HWTEST_F(ActsUtilWideCheckApiTest, testIswupper7300, Function | MediumTest | Level1) { 1142 wint_t wideChar; 1143 int returnVal; 1144 1145 wideChar = '5'; 1146 returnVal = iswupper(wideChar); 1147 LOGD(" iswupper returnVal:='%d'\n", returnVal); 1148 ASSERT_TRUE(0 == returnVal) << "ErrInfo: iswupper returnVal:='" << returnVal << "'"; 1149 } 1150 1151 /** 1152 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWUPPER_7400 1153 * @tc.name test iswupper api with LF 1154 * @tc.desc [C- SOFTWARE -0200] 1155 */ 1156 HWTEST_F(ActsUtilWideCheckApiTest, testIswupper7400, Function | MediumTest | Level1) { 1157 wint_t wideChar; 1158 int returnVal; 1159 1160 wideChar = '\n'; 1161 returnVal = iswupper(wideChar); 1162 LOGD(" iswupper returnVal:='%d'\n", returnVal); 1163 ASSERT_TRUE(0 == returnVal) << "ErrInfo: iswupper returnVal:='" << returnVal << "'"; 1164 } 1165 1166 /** 1167 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWUPPER_L_7500 1168 * @tc.name test iswupper_l api with upper alpha 1169 * @tc.desc [C- SOFTWARE -0200] 1170 */ 1171 HWTEST_F(ActsUtilWideCheckApiTest, testIswupperL7500, Function | MediumTest | Level1) { 1172 wint_t wideChar; 1173 int returnVal; 1174 1175 wideChar = 'A'; 1176 returnVal = iswupper_l(wideChar, g_auwcaLocale); 1177 LOGD(" iswupper_l returnVal:='%d'\n", returnVal); 1178 ASSERT_TRUE(returnVal != 0) << "ErrInfo: iswupper_l returnVal:='" << returnVal << "'"; 1179 } 1180 1181 /** 1182 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWUPPER_L_7600 1183 * @tc.name test iswupper_l api with lower alpha 1184 * @tc.desc [C- SOFTWARE -0200] 1185 */ 1186 HWTEST_F(ActsUtilWideCheckApiTest, testIswupperL7600, Function | MediumTest | Level1) { 1187 wint_t wideChar; 1188 int returnVal; 1189 1190 wideChar = 'a'; 1191 returnVal = iswupper_l(wideChar, g_auwcaLocale); 1192 LOGD(" iswupper_l returnVal:='%d'\n", returnVal); 1193 ASSERT_TRUE(0 == returnVal) << "ErrInfo: iswupper_l returnVal:='" << returnVal << "'"; 1194 } 1195 1196 /** 1197 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWUPPER_L_7700 1198 * @tc.name test iswupper_l api with digit 1199 * @tc.desc [C- SOFTWARE -0200] 1200 */ 1201 HWTEST_F(ActsUtilWideCheckApiTest, testIswupperL7700, Function | MediumTest | Level1) { 1202 wint_t wideChar; 1203 int returnVal; 1204 1205 wideChar = '5'; 1206 returnVal = iswupper_l(wideChar, g_auwcaLocale); 1207 LOGD(" iswupper_l returnVal:='%d'\n", returnVal); 1208 ASSERT_TRUE(0 == returnVal) << "ErrInfo: iswupper_l returnVal:='" << returnVal << "'"; 1209 } 1210 1211 /** 1212 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWUPPER_L_7800 1213 * @tc.name test iswupper_l api with LF 1214 * @tc.desc [C- SOFTWARE -0200] 1215 */ 1216 HWTEST_F(ActsUtilWideCheckApiTest, testIswupperL7800, Function | MediumTest | Level1) { 1217 wint_t wideChar; 1218 int returnVal; 1219 1220 wideChar = '\n'; 1221 returnVal = iswupper_l(wideChar, g_auwcaLocale); 1222 LOGD(" iswupper_l returnVal:='%d'\n", returnVal); 1223 ASSERT_TRUE(0 == returnVal) << "ErrInfo: iswupper_l returnVal:='" << returnVal << "'"; 1224 } 1225 1226 /** 1227 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWXDIGIT_7900 1228 * @tc.name test iswxdigit api with xdigit F 1229 * @tc.desc [C- SOFTWARE -0200] 1230 */ 1231 HWTEST_F(ActsUtilWideCheckApiTest, testIswxdigit7900, Function | MediumTest | Level1) { 1232 wint_t wideChar; 1233 int returnVal; 1234 1235 wideChar = 'F'; 1236 returnVal = iswxdigit(wideChar); 1237 LOGD(" iswxdigit returnVal:='%d'\n", returnVal); 1238 ASSERT_TRUE(returnVal != 0) << "ErrInfo: iswxdigit returnVal:='" << returnVal << "'"; 1239 } 1240 1241 /** 1242 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWXDIGIT_8000 1243 * @tc.name test iswxdigit api with alpha G 1244 * @tc.desc [C- SOFTWARE -0200] 1245 */ 1246 HWTEST_F(ActsUtilWideCheckApiTest, testIswxdigit8000, Function | MediumTest | Level1) { 1247 wint_t wideChar; 1248 int returnVal; 1249 1250 wideChar = 'G'; 1251 returnVal = iswxdigit(wideChar); 1252 LOGD(" iswxdigit returnVal:='%d'\n", returnVal); 1253 ASSERT_TRUE(0 == returnVal) << "ErrInfo: iswxdigit returnVal:='" << returnVal << "'"; 1254 } 1255 1256 /** 1257 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWXDIGIT_L_8100 1258 * @tc.name test iswxdigit_l api with xdigit F 1259 * @tc.desc [C- SOFTWARE -0200] 1260 */ 1261 HWTEST_F(ActsUtilWideCheckApiTest, testIswxdigitL8100, Function | MediumTest | Level1) { 1262 wint_t wideChar; 1263 int returnVal; 1264 1265 wideChar = 'F'; 1266 returnVal = iswxdigit_l(wideChar, g_auwcaLocale); 1267 LOGD(" iswxdigit_l returnVal:='%d'\n", returnVal); 1268 ASSERT_TRUE(returnVal != 0) << "ErrInfo: iswxdigit_l returnVal:='" << returnVal << "'"; 1269 } 1270 1271 /** 1272 * @tc.number SUB_KERNEL_UTIL_WIDECHECK_ISWXDIGIT_L_8200 1273 * @tc.name test iswxdigit_l api with alpha G 1274 * @tc.desc [C- SOFTWARE -0200] 1275 */ 1276 HWTEST_F(ActsUtilWideCheckApiTest, testIswxdigitL8200, Function | MediumTest | Level1) { 1277 wint_t wideChar; 1278 int returnVal; 1279 1280 wideChar = 'G'; 1281 returnVal = iswxdigit_l(wideChar, g_auwcaLocale); 1282 LOGD(" iswxdigit_l returnVal:='%d'\n", returnVal); 1283 ASSERT_TRUE(0 == returnVal) << "ErrInfo: iswxdigit_l returnVal:='" << returnVal << "'"; 1284 }