ActsUtilConvertApiTest.cpp 35.8 KB
Newer Older
M
mamingshuai 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067
/*
 * Copyright (c) 2021 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include <stdlib.h>
#include <ctype.h>
#include <wctype.h>
#include <wchar.h>
#include <string.h>

#include "gtest/gtest.h"
#include "log.h"
#include "utils.h"

using namespace testing::ext;

class ActsUtilConvertApiTest : public testing::Test {
protected:
    // SetUpTestCase: Testsuit setup, run before 1st testcase
    static void SetUpTestCase(void)
    {
    }
    // TearDownTestCase: Testsuit teardown, run after last testcase
    static void TearDownTestCase(void)
    {
    }
    // Testcase setup
    virtual void SetUp()
    {
    }
    // Testcase teardown
    virtual void TearDown()
    {
    }
};

/**
* @tc.number     SUB_KERNEL_UTIL_CONVERT_TOLOWER_0100
* @tc.name       test _tolower api with upper alpha
* @tc.desc       [C- SOFTWARE -0200]
*/
HWTEST_F(ActsUtilConvertApiTest, testTolower0100, Function | MediumTest | Level1) {
    char paraChar;
    int returnVal;

    paraChar = 'A';
    returnVal = _tolower(paraChar);
    LOGD("    _tolower c:='%c',   returnVal:='%c'\n", paraChar, returnVal);
    ASSERT_TRUE('a' == returnVal) << "ErrInfo: _tolower  returnVal:='" << returnVal << "'";
}

/**
* @tc.number     SUB_KERNEL_UTIL_CONVERT_TOLOWER_0200
* @tc.name       test _tolower api with digit
* @tc.desc       [C- SOFTWARE -0200]
*/
HWTEST_F(ActsUtilConvertApiTest, testTolower0200, Function | MediumTest | Level1) {
    char paraChar;
    int returnVal;

    paraChar = '5';
    returnVal = _tolower(paraChar);
    LOGD("    _tolower c:='%c',   returnVal:='%c'\n", paraChar, returnVal);
    ASSERT_TRUE('5' == returnVal) << "ErrInfo: _tolower  returnVal:='" << returnVal << "'";
}

/**
* @tc.number     SUB_KERNEL_UTIL_CONVERT_TOLOWER_0300
* @tc.name       test _tolower api with lower alpha
* @tc.desc       [C- SOFTWARE -0200]
*/
HWTEST_F(ActsUtilConvertApiTest, testTolower0300, Function | MediumTest | Level1) {
    char paraChar;
    int returnVal;

    paraChar = 'z';
    returnVal = _tolower(paraChar);
    LOGD("    _tolower c:='%c',   returnVal:='%c'\n", paraChar, returnVal);
    ASSERT_TRUE('z' == returnVal) << "ErrInfo: _tolower  returnVal:='" << returnVal << "'";
}

/* *
 * @tc.number     SUB_KERNEL_UTIL_CONVERT_TOLOWER_0310
 * @tc.name       abnormal test:test _tolower api with multiple characters
 * @tc.desc       [C- SOFTWARE -0200]
 */
HWTEST_F(ActsUtilConvertApiTest, testTolower0310, Function | MediumTest | Level1)
{
    char paraChar;
    int returnVal;

    paraChar = 'AZ';
    returnVal = _tolower(paraChar);
    LOGD("    _tolower c:='%c',   returnVal:='%c'/n", paraChar, returnVal);
    EXPECT_FALSE('az' == returnVal) << "ErrInfo: _tolower  returnVal:='" << returnVal << "'";
}

/* *
 * @tc.number     SUB_KERNEL_UTIL_CONVERT_TOLOWER_0320
 * @tc.name       abnormal test:test _tolower api with multiple characters
 * @tc.desc       [C- SOFTWARE -0200]
 */
HWTEST_F(ActsUtilConvertApiTest, testTolower0320, Function | MediumTest | Level1)
{
    char paraChar;
    int returnVal;

    paraChar = '22';
    returnVal = _tolower(paraChar);
    LOGD("    _tolower c:='%c',   returnVal:='%c'/n", paraChar, returnVal);
    EXPECT_FALSE('22' == returnVal) << "ErrInfo: _tolower  returnVal:='" << returnVal << "'";
}

/* *
 * @tc.number     SUB_KERNEL_UTIL_CONVERT_TOLOWER_0330
 * @tc.name       abnormal test:test _tolower api with special characters"@"
 * @tc.desc       [C- SOFTWARE -0200]
 */
HWTEST_F(ActsUtilConvertApiTest, testTolower0330, Function | MediumTest | Level1)
{
    char paraChar;
    int returnVal;

    paraChar = '@';
    returnVal = _tolower(paraChar);
    LOGD("    _tolower c:='%c',   returnVal:='%c'/n", paraChar, returnVal);
    ASSERT_TRUE(96 == returnVal) << "ErrInfo: _tolower  returnVal:='" << returnVal << "'";
}


/**
* @tc.number     SUB_KERNEL_UTIL_CONVERT_TOUPPER_0400
* @tc.name       test _toupper api with lower alpha
* @tc.desc       [C- SOFTWARE -0200]
*/
HWTEST_F(ActsUtilConvertApiTest, testToupper0400, Function | MediumTest | Level1) {
    char paraChar;
    int returnVal;

    paraChar = 'a';
    returnVal = _toupper(paraChar);
    LOGD("    _toupper c:='%c',   returnVal:='%c'\n", paraChar, returnVal);
    ASSERT_TRUE('A' == returnVal) << "ErrInfo: _toupper  returnVal:='" << returnVal << "'";
}

/**
* @tc.number     SUB_KERNEL_UTIL_CONVERT_TOUPPER_0500
* @tc.name       test _toupper api with upper alpha
* @tc.desc       [C- SOFTWARE -0200]
*/
HWTEST_F(ActsUtilConvertApiTest, testToupper0500, Function | MediumTest | Level1) {
    char paraChar;
    int returnVal;

    paraChar = 'Z';
    returnVal = _toupper(paraChar);
    LOGD("    _toupper c:='%c',   returnVal:='%c'\n", paraChar, returnVal);
    ASSERT_TRUE('Z' == returnVal) << "ErrInfo: _toupper  returnVal:='" << returnVal << "'";
}

/* *
 * @tc.number     SUB_KERNEL_UTIL_CONVERT_TOUPPER_0510
 * @tc.name       test _toupper api with special characters"@"
 * @tc.desc       [C- SOFTWARE -0200]
 */
HWTEST_F(ActsUtilConvertApiTest, testToupper0510, Function | MediumTest | Level1)
{
    char paraChar;
    int returnVal;

    paraChar = '@';
    returnVal = _toupper(paraChar);
    LOGD("    _toupper c:='%c',   returnVal:='%c'/n", paraChar, returnVal);
    ASSERT_TRUE('@' == returnVal) << "ErrInfo: _toupper  returnVal:='" << returnVal << "'";
}

/* *
 * @tc.number     SUB_KERNEL_UTIL_CONVERT_TOUPPER_0520
 * @tc.name       test _toupper api with special characters
 * @tc.desc       [C- SOFTWARE -0200]
 */
HWTEST_F(ActsUtilConvertApiTest, testToupper0520, Function | MediumTest | Level1)
{
    char paraChar;
    int returnVal;

    paraChar = 50;
    returnVal = _toupper(paraChar);
    LOGD("    _toupper c:='%c',   returnVal:='%c'/n", paraChar, returnVal);
    ASSERT_TRUE(18 == returnVal) << "ErrInfo: _toupper  returnVal:='" << returnVal << "'";
}

/* *
 * @tc.number     SUB_KERNEL_UTIL_CONVERT_TOUPPER_0530
 * @tc.name       test _toupper api with special characters
 * @tc.desc       [C- SOFTWARE -0200]
 */
HWTEST_F(ActsUtilConvertApiTest, testToupper0530, Function | MediumTest | Level1)
{
    char paraChar;
    int returnVal;

    paraChar = 'aa';
    returnVal = _toupper(paraChar);
    LOGD("    _toupper c:='%c',   returnVal:='%c'/n", paraChar, returnVal);
    EXPECT_FALSE('AA' == returnVal) << "ErrInfo: _toupper  returnVal:='" << returnVal << "'";
}

/* *
 * @tc.number     SUB_KERNEL_UTIL_CONVERT_TOUPPER_0540
 * @tc.name       test _toupper api with special characters
 * @tc.desc       [C- SOFTWARE -0200]
 */
HWTEST_F(ActsUtilConvertApiTest, testToupper0540, Function | MediumTest | Level1)
{
    char paraChar;
    int returnVal;

    paraChar = 'az';
    returnVal = _toupper(paraChar);
    LOGD("    _toupper c:='%c',   returnVal:='%c'/n", paraChar, returnVal);
    EXPECT_FALSE('AZ' == returnVal) << "ErrInfo: _toupper  returnVal:='" << returnVal << "'";
}

/**
* @tc.number     SUB_KERNEL_UTIL_CONVERT_ATOF_0600
* @tc.name       test atof api with string
* @tc.desc       [C- SOFTWARE -0200]
*/
HWTEST_F(ActsUtilConvertApiTest, testAtof0600, Function | MediumTest | Level1) {
    const char *paraChar = nullptr;
    double returnVal;

    paraChar = "abcde";
    returnVal = atof(paraChar);
    LOGD("    atof c:='%s',   returnVal:='%f'\n", paraChar, returnVal);
    ASSERT_TRUE(0.000000 == returnVal) << "ErrInfo: atof  returnVal:='" << returnVal << "'";
}

/**
* @tc.number     SUB_KERNEL_UTIL_CONVERT_ATOF_0700
* @tc.name       test atof api with empty string
* @tc.desc       [C- SOFTWARE -0200]
*/
HWTEST_F(ActsUtilConvertApiTest, testAtof0700, Function | MediumTest | Level1) {
    const char *paraChar = nullptr;
    double returnVal;

    paraChar = "";
    returnVal = atof(paraChar);
    LOGD("    atof c:='%s',   returnVal:='%f'\n", paraChar, returnVal);
    ASSERT_TRUE(0.000000 == returnVal) << "ErrInfo: atof  returnVal:='" << returnVal << "'";
}

/**
* @tc.number     SUB_KERNEL_UTIL_CONVERT_ATOF_0800
* @tc.name       test atof api with digit
* @tc.desc       [C- SOFTWARE -0200]
*/
HWTEST_F(ActsUtilConvertApiTest, testAtof0800, Function | MediumTest | Level1) {
    const char *paraChar = nullptr;
    double returnVal;

    paraChar = "12345";
    returnVal = atof(paraChar);
    LOGD("    atof c:='%s',   returnVal:='%f'\n", paraChar, returnVal);
    ASSERT_TRUE(12345.000000 == returnVal) << "ErrInfo: atof  returnVal:='" << returnVal << "'";
}

/* *
 * @tc.number     SUB_KERNEL_UTIL_CONVERT_ATOF_0810
 * @tc.name       test atof api with digit
 * @tc.desc       [C- SOFTWARE -0200]
 */
HWTEST_F(ActsUtilConvertApiTest, testAtof0810, Function | MediumTest | Level1)
{
    const char *paraChar = nullptr;
    double returnVal;

    paraChar = "xtstest abcde";
    returnVal = atof(paraChar);
    LOGD("    atof c:='%s',   returnVal:='%f'/n", paraChar, returnVal);
    ASSERT_TRUE(0.000000 == returnVal) << "ErrInfo: atof  returnVal:='" << returnVal << "'";
}

/* *
 * @tc.number     SUB_KERNEL_UTIL_CONVERT_ATOF_0820
 * @tc.name       test atof api with digit
 * @tc.desc       [C- SOFTWARE -0200]
 */
HWTEST_F(ActsUtilConvertApiTest, testAtof0820, Function | MediumTest | Level1)
{
    const char *paraChar = nullptr;
    double returnVal;

    paraChar = "xtstest 123456";
    returnVal = atof(paraChar);
    LOGD("    atof c:='%s',   returnVal:='%f'/n", paraChar, returnVal);
    ASSERT_TRUE(0.000000 == returnVal) << "ErrInfo: atof  returnVal:='" << returnVal << "'";
}

/* *
 * @tc.number     SUB_KERNEL_UTIL_CONVERT_ATOF_0830
 * @tc.name       test atof api with digit
 * @tc.desc       [C- SOFTWARE -0200]
 */
HWTEST_F(ActsUtilConvertApiTest, testAtof0830, Function | MediumTest | Level1)
{
    const char *paraChar = nullptr;
    double returnVal;

    paraChar = "123456    ";
    returnVal = atof(paraChar);
    LOGD("    atof c:='%s',   returnVal:='%f'/n", paraChar, returnVal);
    ASSERT_TRUE(123456.000000 == returnVal) << "ErrInfo: atof  returnVal:='" << returnVal << "'";
}

/* *
 * @tc.number     SUB_KERNEL_UTIL_CONVERT_ATOF_0840
 * @tc.name       test atof api with digit
 * @tc.desc       [C- SOFTWARE -0200]
 */
HWTEST_F(ActsUtilConvertApiTest, testAtof0840, Function | MediumTest | Level1)
{
    const char *paraChar = nullptr;
    double returnVal;

    paraChar = "      abcde";
    returnVal = atof(paraChar);
    LOGD("    atof c:='%s',   returnVal:='%f'/n", paraChar, returnVal);
    ASSERT_TRUE(0.000000 == returnVal) << "ErrInfo: atof  returnVal:='" << returnVal << "'";
}

/* *
 * @tc.number     SUB_KERNEL_UTIL_CONVERT_ATOF_0850
 * @tc.name       test atof api with digit
 * @tc.desc       [C- SOFTWARE -0200]
 */
HWTEST_F(ActsUtilConvertApiTest, testAtof0850, Function | MediumTest | Level1)
{
    const char *paraChar = nullptr;
    double returnVal;

    paraChar = "      abcde     ";
    returnVal = atof(paraChar);
    LOGD("    atof c:='%s',   returnVal:='%f'/n", paraChar, returnVal);
    ASSERT_TRUE(0.000000 == returnVal) << "ErrInfo: atof  returnVal:='" << returnVal << "'";
}

/* *
 * @tc.number     SUB_KERNEL_UTIL_CONVERT_ATOF_0860
 * @tc.name       test atof api with digit
 * @tc.desc       [C- SOFTWARE -0200]
 */
HWTEST_F(ActsUtilConvertApiTest, testAtof0860, Function | MediumTest | Level1)
{
    const char *paraChar = nullptr;
    double returnVal;

    paraChar = "a";
    returnVal = atof(paraChar);
    LOGD("    atof c:='%s',   returnVal:='%f'/n", paraChar, returnVal);
    ASSERT_TRUE(0.000000 == returnVal) << "ErrInfo: atof  returnVal:='" << returnVal << "'";
}

/**
* @tc.number     SUB_KERNEL_UTIL_CONVERT_ATOL_0900
* @tc.name       test atol api with string
* @tc.desc       [C- SOFTWARE -0200]
*/
HWTEST_F(ActsUtilConvertApiTest, testAtol0900, Function | MediumTest | Level1) {
    const char *paraChar = nullptr;
    long int returnVal;

    paraChar = "abcde";
    returnVal = atol(paraChar);
    LOGD("    atol c:='%s',   returnVal:='%ld'\n", paraChar, returnVal);
    ASSERT_TRUE(0 == returnVal) << "ErrInfo: atol  returnVal:='" << returnVal << "'";
}

/**
* @tc.number     SUB_KERNEL_UTIL_CONVERT_ATOL_1000
* @tc.name       test atol api with empty string
* @tc.desc       [C- SOFTWARE -0200]
*/
HWTEST_F(ActsUtilConvertApiTest, testAtol1000, Function | MediumTest | Level1) {
    const char *paraChar = nullptr;
    long int returnVal;

    paraChar = "";
    returnVal = atol(paraChar);
    LOGD("    atol c:='%s',   returnVal:='%ld'\n", paraChar, returnVal);
    ASSERT_TRUE(0 == returnVal) << "ErrInfo: atol  returnVal:='" << returnVal << "'";
}

/**
* @tc.number     SUB_KERNEL_UTIL_CONVERT_ATOL_1100
* @tc.name       test atol api with digit
* @tc.desc       [C- SOFTWARE -0200]
*/
HWTEST_F(ActsUtilConvertApiTest, testAtol1100, Function | MediumTest | Level1) {
    const char *paraChar = nullptr;
    long int returnVal;

    paraChar = "12345";
    returnVal = atol(paraChar);
    LOGD("    atol c:='%s',   returnVal:='%ld'\n", paraChar, returnVal);
    ASSERT_TRUE(12345 == returnVal) << "ErrInfo: atol  returnVal:='" << returnVal << "'";
}

/* *
 * @tc.number     SUB_KERNEL_UTIL_CONVERT_ATOL_0100
 * @tc.name       test atol api with digit
 * @tc.desc       [C- SOFTWARE -0200]
 */
HWTEST_F(ActsUtilConvertApiTest, testAtol0100, Function | MediumTest | Level1)
{
    const char *paraChar = nullptr;
    long int returnVal;

    paraChar = "12345.111";
    returnVal = atol(paraChar);
    LOGD("    atol c:='%s',   returnVal:='%ld'/n", paraChar, returnVal);
    ASSERT_TRUE(12345 == returnVal) << "ErrInfo: atol  returnVal:='" << returnVal << "'";
}

/* *
 * @tc.number     SUB_KERNEL_UTIL_CONVERT_ATOL_0200
 * @tc.name       test atol api with digit
 * @tc.desc       [C- SOFTWARE -0200]
 */
HWTEST_F(ActsUtilConvertApiTest, testAtol0200, Function | MediumTest | Level1)
{
    const char *paraChar = nullptr;
    long int returnVal;

    paraChar = "-12345";
    returnVal = atol(paraChar);
    LOGD("    atol c:='%s',   returnVal:='%ld'/n", paraChar, returnVal);
    ASSERT_TRUE(-12345 == returnVal) << "ErrInfo: atol  returnVal:='" << returnVal << "'";
}

/**
* @tc.number     SUB_KERNEL_UTIL_CONVERT_ATOLL_1200
* @tc.name       test atoll api with string
* @tc.desc       [C- SOFTWARE -0200]
*/
HWTEST_F(ActsUtilConvertApiTest, testAtoll1200, Function | MediumTest | Level1) {
    const char *paraChar = nullptr;
    long long int returnVal;

    paraChar = "abcde";
    returnVal = atoll(paraChar);
    LOGD("    atoll c:='%s',   returnVal:='%lld'\n", paraChar, returnVal);
    ASSERT_TRUE(0 == returnVal) << "ErrInfo: atoll  returnVal:='" << returnVal << "'";
}

/**
* @tc.number     SUB_KERNEL_UTIL_CONVERT_ATOLL_1300
* @tc.name       test atoll api with empty string
* @tc.desc       [C- SOFTWARE -0200]
*/
HWTEST_F(ActsUtilConvertApiTest, testAtoll1300, Function | MediumTest | Level1) {
    const char *paraChar = nullptr;
    long long int returnVal;

    paraChar = "";
    returnVal = atoll(paraChar);
    LOGD("    atoll c:='%s',   returnVal:='%lld'\n", paraChar, returnVal);
    ASSERT_TRUE(0 == returnVal) << "ErrInfo: atoll  returnVal:='" << returnVal << "'";
}

/**
* @tc.number     SUB_KERNEL_UTIL_CONVERT_ATOLL_1400
* @tc.name       test atoll api with digit
* @tc.desc       [C- SOFTWARE -0200]
*/
HWTEST_F(ActsUtilConvertApiTest, testAtoll1400, Function | MediumTest | Level1) {
    const char *paraChar = nullptr;
    long long int returnVal;

    paraChar = "1234567890";
    returnVal = atoll(paraChar);
    LOGD("    atoll c:='%s',   returnVal:='%lld'\n", paraChar, returnVal);
    ASSERT_TRUE(1234567890 == returnVal) << "ErrInfo: atoll  returnVal:='" << returnVal << "'";
}

/**
* @tc.number     SUB_KERNEL_UTIL_CONVERT_ECVT_1500
* @tc.name       test ecvt api with decimal double
* @tc.desc       [C- SOFTWARE -0200]
*/
HWTEST_F(ActsUtilConvertApiTest, testEcvt1500, Function | MediumTest | Level1) {
    char *returnVal = nullptr;
    double paraValue;
    int digitCount;
    int paraDec;
    int paraSign;

    paraValue = 12345.6789;
    digitCount = 10;
    returnVal = ecvt(paraValue, digitCount, &paraDec, &paraSign);
    LOGD("    ecvt  paraValue:='%f',  digitCount:='%d',  paraDec = '%d',  paraSign = '%d',  returnVal:='%s'\n",
        paraValue, digitCount, paraDec, paraSign, returnVal);
    ASSERT_TRUE(strcmp(returnVal, "1234567890") == 0 && paraSign == 0 && paraDec == 5) <<
        "ErrInfo: ecvt returnVal:='" << returnVal << "',  paraDec:='" << paraDec << "', paraSign:='" << paraSign << "'";
}

/**
* @tc.number     SUB_KERNEL_UTIL_CONVERT_ECVT_1600
* @tc.name       test ecvt api with exponent double
* @tc.desc       [C- SOFTWARE -0200]
*/
HWTEST_F(ActsUtilConvertApiTest, testEcvt1600, Function | MediumTest | Level1) {
    char *returnVal = nullptr;
    double paraValue;
    int digitCount;
    int paraDec;
    int paraSign;

    paraValue = -0.123e4;
    digitCount = 5;
    returnVal = ecvt(paraValue, digitCount, &paraDec, &paraSign);
    LOGD("    ecvt  paraValue:='%d',  digitCount:='%d',  paraDec = '%d',  paraSign = '%d',  returnVal:='%s'\n",
        paraValue, digitCount, returnVal, paraDec, paraSign);
    ASSERT_TRUE(strcmp(returnVal, "12300") == 0 && paraSign == 1 && paraDec != 0) <<
        "ErrInfo: ecvt returnVal:='" << returnVal << "',  paraDec:='" << paraDec << "', paraSign:='" << paraSign << "'";
}

/* *
 * @tc.number     SUB_KERNEL_UTIL_CONVERT_ECVT_1610
 * @tc.name       test ecvt api with exponent double
 * @tc.desc       [C- SOFTWARE -0200]
 */
HWTEST_F(ActsUtilConvertApiTest, testEcvt1610, Function | MediumTest | Level1)
{
    int dec, sign;
    char *returnVal;

    double paraValue = 3.1415926385;
    int precision = 10;

    returnVal = ecvt(paraValue, precision, &dec, &sign);
    LOGD("    ecvt  paraValue:='%f',  precision:='%d',  dec = '%d',  sign = '%d',  returnVal:='%s'/n", paraValue,
        precision, dec, sign, returnVal);
    ASSERT_TRUE(strcmp(returnVal, "3141592639") == 0 && dec == 1 && sign == 0) << "ErrInfo: ecvt returnVal:='" <<
        returnVal << "',  dec:='" << dec << "', sign:='" << sign << "'";
}

/* *
 * @tc.number     SUB_KERNEL_UTIL_CONVERT_ECVT_1630
 * @tc.name       test ecvt api with exponent double
 * @tc.desc       [C- SOFTWARE -0200]
 */
HWTEST_F(ActsUtilConvertApiTest, testEcvt1630, Function | MediumTest | Level1)
{
    int dec, sign;
    char *returnVal;

    double paraValue = 0.0;
    int precision = 10;

    returnVal = ecvt(paraValue, precision, &dec, &sign);
    LOGD("    ecvt  paraValue:='%f',  precision:='%d',  dec = '%d',  sign = '%d',  returnVal:='%s'/n", paraValue,
        precision, dec, sign, returnVal);
    ASSERT_TRUE(strcmp(returnVal, "0000000000") == 0 && dec == 1 && sign == 0) << "ErrInfo: ecvt returnVal:='" <<
        returnVal << "',  dec:='" << dec << "', sign:='" << sign << "'";
}

/**
* @tc.number     SUB_KERNEL_UTIL_CONVERT_TOASCII_1700
* @tc.name       test toascii api with digit
* @tc.desc       [C- SOFTWARE -0200]
*/
HWTEST_F(ActsUtilConvertApiTest, testToascii1700, Function | MediumTest | Level1) {
    char paraVal;
    int returnVal;

    paraVal = 225;
    returnVal = toascii(paraVal);
    LOGD("    toascii returnVal:='%d'\n", returnVal);
    ASSERT_TRUE(97 == returnVal) << "ErrInfo: toascii  returnVal:='" << returnVal << "'";
}

/**
* @tc.number     SUB_KERNEL_UTIL_CONVERT_TOLOWER_1800
* @tc.name       test tolower api with upper alpha
* @tc.desc       [C- SOFTWARE -0200]
*/
HWTEST_F(ActsUtilConvertApiTest, testTolower1800, Function | MediumTest | Level1) {
    char paraVal;
    int returnVal;

    paraVal = 'A';
    returnVal = tolower(paraVal);
    LOGD("    tolower returnVal:='%d'\n", returnVal);
    ASSERT_TRUE('a' == returnVal) << "ErrInfo: tolower  returnVal:='" << returnVal << "'";
}

/**
* @tc.number     SUB_KERNEL_UTIL_CONVERT_TOLOWER_1900
* @tc.name       test tolower api with lower alpha
* @tc.desc       [C- SOFTWARE -0200]
*/
HWTEST_F(ActsUtilConvertApiTest, testTolower1900, Function | MediumTest | Level1) {
    char paraVal;
    int returnVal;

    paraVal = 'a';
    returnVal = tolower(paraVal);
    LOGD("    tolower returnVal:='%d'\n", returnVal);
    ASSERT_TRUE('a' == returnVal) << "ErrInfo: tolower  returnVal:='" << returnVal << "'";
}

/**
* @tc.number     SUB_KERNEL_UTIL_CONVERT_TOLOWER_L_2000
* @tc.name       test tolower_l api with upper alpha
* @tc.desc       [C- SOFTWARE -0200]
*/
HWTEST_F(ActsUtilConvertApiTest, testTolowerL2000, Function | MediumTest | Level1) {
    char paraVal;
    int returnVal;

    paraVal = 'A';
    returnVal = tolower_l(paraVal, newlocale(LC_ALL_MASK, "", (locale_t)0));
    LOGD("    tolower_l returnVal:='%d'\n", returnVal);
    ASSERT_TRUE('a' == returnVal) << "ErrInfo: tolower_l  returnVal:='" << returnVal << "'";
}

/**
* @tc.number     SUB_KERNEL_UTIL_CONVERT_TOLOWER_L_2100
* @tc.name       test tolower_l api with lower alpha
* @tc.desc       [C- SOFTWARE -0200]
*/
HWTEST_F(ActsUtilConvertApiTest, testTolowerL2100, Function | MediumTest | Level1) {
    char paraVal;
    int returnVal;

    paraVal = 'a';
    returnVal = tolower_l(paraVal, newlocale(LC_ALL_MASK, "", (locale_t)0));
    LOGD("    tolower_l returnVal:='%d'\n", returnVal);
    ASSERT_TRUE('a' == returnVal) << "ErrInfo: tolower_l  returnVal:='" << returnVal << "'";
}

/**
* @tc.number     SUB_KERNEL_UTIL_CONVERT_TOUPPER_2200
* @tc.name       test toupper api with upper alpha
* @tc.desc       [C- SOFTWARE -0200]
*/
HWTEST_F(ActsUtilConvertApiTest, testToupper2200, Function | MediumTest | Level1) {
    char paraVal;
    int returnVal;

    paraVal = 'A';
    returnVal = toupper(paraVal);
    LOGD("    toupper returnVal:='%d'\n", returnVal);
    ASSERT_TRUE('A' == returnVal) << "ErrInfo: toupper  returnVal:='" << returnVal << "'";
}

/**
* @tc.number     SUB_KERNEL_UTIL_CONVERT_TOUPPER_2300
* @tc.name       test toupper api with lower alpha
* @tc.desc       [C- SOFTWARE -0200]
*/
HWTEST_F(ActsUtilConvertApiTest, testToupper2300, Function | MediumTest | Level1) {
    char paraVal;
    int returnVal;

    paraVal = 'a';
    returnVal = toupper(paraVal);
    LOGD("    toupper returnVal:='%d'\n", returnVal);
    ASSERT_TRUE('A' == returnVal) << "ErrInfo: toupper  returnVal:='" << returnVal << "'";
}

/**
* @tc.number     SUB_KERNEL_UTIL_CONVERT_TOUPPER_L_2400
* @tc.name       test toupper_l api with upper alpha
* @tc.desc       [C- SOFTWARE -0200]
*/
HWTEST_F(ActsUtilConvertApiTest, testToupperL2400, Function | MediumTest | Level1) {
    char paraVal;
    int returnVal;

    paraVal = 'A';
    returnVal = toupper_l(paraVal, newlocale(LC_ALL_MASK, "", (locale_t)0));
    LOGD("    toupper_l returnVal:='%d'\n", returnVal);
    ASSERT_TRUE('A' == returnVal) << "ErrInfo: toupper_l  returnVal:='" << returnVal << "'";
}

/**
* @tc.number     SUB_KERNEL_UTIL_CONVERT_TOUPPER_L_2500
* @tc.name       test toupper_l api with lower alpha
* @tc.desc       [C- SOFTWARE -0200]
*/
HWTEST_F(ActsUtilConvertApiTest, testToupperL2500, Function | MediumTest | Level1) {
    char paraVal;
    int returnVal;

    paraVal = 'a';
    returnVal = toupper_l(paraVal, newlocale(LC_ALL_MASK, "", (locale_t)0));
    LOGD("    toupper_l returnVal:='%d'\n", returnVal);
    ASSERT_TRUE('A' == returnVal) << "ErrInfo: toupper_l  returnVal:='" << returnVal << "'";
}

/**
* @tc.number     SUB_KERNEL_UTIL_CONVERT_L64A_2600
* @tc.name       test l64a api with zero
* @tc.desc       [C- SOFTWARE -0200]
*/
HWTEST_F(ActsUtilConvertApiTest, testL64a2600, Function | MediumTest | Level1) {
    long paraVal;
    char *returnVal;

    paraVal = 0;
    returnVal = l64a(paraVal);
    LOGD("    l64a returnVal:='%s'\n", returnVal);
    ASSERT_TRUE(strcmp("", returnVal) == 0) << "ErrInfo: l64a  returnVal:='" << returnVal << "'";
}

/**
* @tc.number     SUB_KERNEL_UTIL_CONVERT_L64A_2700
* @tc.name       test l64a api with decimal
* @tc.desc       [C- SOFTWARE -0200]
*/
HWTEST_F(ActsUtilConvertApiTest, testL64a2700, Function | MediumTest | Level1) {
    long paraVal;
    char *returnVal;

    paraVal = 12345;
    returnVal = l64a(paraVal);
    LOGD("    l64a returnVal:='%s'\n", returnVal);
    ASSERT_TRUE(strcmp("t.1", returnVal) == 0) << "ErrInfo: l64a  returnVal:='" << returnVal << "'";
}

/**
* @tc.number     SUB_KERNEL_UTIL_CONVERT_TOWLOWER_2800
* @tc.name       test towlower api with upper alpha
* @tc.desc       [C- SOFTWARE -0200]
*/
HWTEST_F(ActsUtilConvertApiTest, testTowlower2800, Function | MediumTest | Level1) {
    wint_t wideChar;
    wint_t returnVal;

    wideChar = 'A';
    returnVal = towlower(wideChar);
    LOGD("    towlower returnVal:='%c'\n", returnVal);
    ASSERT_TRUE('a' == returnVal) << "ErrInfo: towlower  returnVal:='" << returnVal << "'";
}

/**
* @tc.number     SUB_KERNEL_UTIL_CONVERT_TOWLOWER_2900
* @tc.name       test towlower api with lower alpha
* @tc.desc       [C- SOFTWARE -0200]
*/
HWTEST_F(ActsUtilConvertApiTest, testTowlower2900, Function | MediumTest | Level1) {
    wint_t wideChar;
    wint_t returnVal;

    wideChar = 'a';
    returnVal = towlower(wideChar);
    LOGD("    towlower returnVal:='%c'\n", returnVal);
    ASSERT_TRUE('a' == returnVal) << "ErrInfo: towlower  returnVal:='" << returnVal << "'";
}

/**
* @tc.number     SUB_KERNEL_UTIL_CONVERT_TOWLOWER_L_3000
* @tc.name       test towlower_l api with upper alpha
* @tc.desc       [C- SOFTWARE -0200]
*/
HWTEST_F(ActsUtilConvertApiTest, testTowlowerL3000, Function | MediumTest | Level1) {
    wint_t wideChar;
    wint_t returnVal;

    wideChar = 'A';
    returnVal = towlower_l(wideChar, newlocale(LC_ALL_MASK, "", (locale_t)0));
    LOGD("    towlower_l returnVal:='%c'\n", returnVal);
    ASSERT_TRUE('a' == returnVal) << "ErrInfo: towlower_l  returnVal:='" << returnVal << "'";
}

/**
* @tc.number     SUB_KERNEL_UTIL_CONVERT_TOWLOWER_L_3100
* @tc.name       test towlower_l api with lower alpha
* @tc.desc       [C- SOFTWARE -0200]
*/
HWTEST_F(ActsUtilConvertApiTest, testTowlowerL3100, Function | MediumTest | Level1) {
    wint_t wideChar;
    wint_t returnVal;

    wideChar = 'a';
    returnVal = towlower_l(wideChar, newlocale(LC_ALL_MASK, "", (locale_t)0));
    LOGD("    towlower_l returnVal:='%c'\n", returnVal);
    ASSERT_TRUE('a' == returnVal) << "ErrInfo: towlower_l  returnVal:='" << returnVal << "'";
}

/**
* @tc.number     SUB_KERNEL_UTIL_CONVERT_TOWUPPER_3200
* @tc.name       test towupper api with upper alpha
* @tc.desc       [C- SOFTWARE -0200]
*/
HWTEST_F(ActsUtilConvertApiTest, testTowupper3200, Function | MediumTest | Level1) {
    wint_t wideChar;
    wint_t returnVal;

    wideChar = 'A';
    returnVal = towupper(wideChar);
    LOGD("    towupper returnVal:='%c'\n", returnVal);
    ASSERT_TRUE('A' == returnVal) << "ErrInfo: towupper  returnVal:='" << returnVal << "'";
}

/**
* @tc.number     SUB_KERNEL_UTIL_CONVERT_TOWUPPER_3300
* @tc.name       test towupper api with lower alpha
* @tc.desc       [C- SOFTWARE -0200]
*/
HWTEST_F(ActsUtilConvertApiTest, testTowupper3300, Function | MediumTest | Level1) {
    wint_t wideChar;
    wint_t returnVal;

    wideChar = 'a';
    returnVal = towupper(wideChar);
    LOGD("    towupper returnVal:='%c'\n", returnVal);
    ASSERT_TRUE('A' == returnVal) << "ErrInfo: towupper  returnVal:='" << returnVal << "'";
}

/**
* @tc.number     SUB_KERNEL_UTIL_CONVERT_TOWUPPER_L_3400
* @tc.name       test towupper_l api with upper alpha
* @tc.desc       [C- SOFTWARE -0200]
*/
HWTEST_F(ActsUtilConvertApiTest, testTowupperL3400, Function | MediumTest | Level1) {
    wint_t wideChar;
    wint_t returnVal;

    wideChar = 'A';
    returnVal = towupper_l(wideChar, newlocale(LC_ALL_MASK, "", (locale_t)0));
    LOGD("    towupper_l returnVal:='%c'\n", returnVal);
    ASSERT_TRUE('A' == returnVal) << "ErrInfo: towupper_l  returnVal:='" << returnVal << "'";
}

/**
* @tc.number     SUB_KERNEL_UTIL_CONVERT_TOWUPPER_L_3500
* @tc.name       test towupper_l api with lower alpha
* @tc.desc       [C- SOFTWARE -0200]
*/
HWTEST_F(ActsUtilConvertApiTest, testTowupperL3500, Function | MediumTest | Level1) {
    wint_t wideChar;
    wint_t returnVal;

    wideChar = 'a';
    returnVal = towupper_l(wideChar, newlocale(LC_ALL_MASK, "", (locale_t)0));
    LOGD("    towupper_l returnVal:='%c'\n", returnVal);
    ASSERT_TRUE('A' == returnVal) << "ErrInfo: towupper_l  returnVal:='" << returnVal << "'";
}

/**
* @tc.number     SUB_KERNEL_UTIL_CONVERT_MBTOWC_3600
* @tc.name       test mbtowc api with alpha
* @tc.desc       [C- SOFTWARE -0200]
*/
HWTEST_F(ActsUtilConvertApiTest, testMbtowc3600, Function | MediumTest | Level1) {
    wchar_t wideChar;
    const char *paraStr = "a";
    size_t sizeVal;
    int returnVal;

    wideChar = 'a';
    sizeVal = 1;
    returnVal = mbtowc(&wideChar, paraStr, sizeVal);
    LOGD("    mbtowc returnVal:='%d'\n", returnVal);
    ASSERT_TRUE(1 == returnVal && L'a' == wideChar) << "ErrInfo: mbtowc  returnVal:='" << returnVal << "'";
}

/**
* @tc.number     SUB_KERNEL_UTIL_CONVERT_TOWCTRANS_3700
* @tc.name       test towctrans api with WEOF
* @tc.desc       [C- SOFTWARE -0200]
*/
HWTEST_F(ActsUtilConvertApiTest, testTowctrans3700, Function | MediumTest | Level1) {
    wint_t wideChar;
    wctrans_t paraDesc;
    wint_t returnVal;

    wideChar = WEOF;
    paraDesc = wctrans("tolower");
    returnVal = towctrans(wideChar, paraDesc);
    LOGD("    towctrans returnVal:='%d'\n", returnVal);
    ASSERT_TRUE(WEOF == returnVal) << "ErrInfo: towctrans  returnVal:='" << returnVal << "'";
}

/**
* @tc.number     SUB_KERNEL_UTIL_CONVERT_TOWCTRANS_3800
* @tc.name       test towctrans api with upper alpha
* @tc.desc       [C- SOFTWARE -0200]
*/
HWTEST_F(ActsUtilConvertApiTest, testTowctrans3800, Function | MediumTest | Level1) {
    wint_t wideChar;
    wctrans_t paraDesc;
    wint_t returnVal;

    wideChar = L'A';
    paraDesc = wctrans("tolower");
    returnVal = towctrans(wideChar, paraDesc);
    LOGD("    towctrans returnVal:='%d'\n", returnVal);
    ASSERT_TRUE('a' == returnVal) << "ErrInfo: towctrans  returnVal:='" << returnVal << "'";
}

/**
* @tc.number     SUB_KERNEL_UTIL_CONVERT_TOWCTRANS_3900
* @tc.name       test towctrans api with lower alpha
* @tc.desc       [C- SOFTWARE -0200]
*/
HWTEST_F(ActsUtilConvertApiTest, testTowctrans3900, Function | MediumTest | Level1) {
    wint_t wideChar;
    wctrans_t paraDesc;
    wint_t returnVal;

    wideChar = L'a';
    paraDesc = wctrans("toupper");
    returnVal = towctrans(wideChar, paraDesc);
    LOGD("    towctrans returnVal:='%d'\n", returnVal);
    ASSERT_TRUE('A' == returnVal) << "ErrInfo: towctrans  returnVal:='" << returnVal << "'";
}

/**
* @tc.number     SUB_KERNEL_UTIL_CONVERT_TOWCTRANS_L_4000
* @tc.name       test towctrans_l api with WEOF
* @tc.desc       [C- SOFTWARE -0200]
*/
HWTEST_F(ActsUtilConvertApiTest, testTowctransL4000, Function | MediumTest | Level1) {
    wint_t wideChar;
    wctrans_t paraDesc;
    wint_t returnVal;

    wideChar = WEOF;
    paraDesc = wctrans_l("tolower", newlocale(LC_ALL_MASK, "", (locale_t)0));
    returnVal = towctrans_l(wideChar, paraDesc, newlocale(LC_ALL_MASK, "", (locale_t)0));
    LOGD("    towctrans_l returnVal:='%d'\n", returnVal);
    ASSERT_TRUE(WEOF == returnVal) << "ErrInfo: towctrans_l  returnVal:='" << returnVal << "'";
}

/**
* @tc.number     SUB_KERNEL_UTIL_CONVERT_TOWCTRANS_L_4100
* @tc.name       test towctrans_l api with upper alpha
* @tc.desc       [C- SOFTWARE -0200]
*/
HWTEST_F(ActsUtilConvertApiTest, testTowctransL4100, Function | MediumTest | Level1) {
    wint_t wideChar;
    wctrans_t paraDesc;
    wint_t returnVal;

    wideChar = L'A';
    paraDesc = wctrans_l("tolower", newlocale(LC_ALL_MASK, "", (locale_t)0));
    returnVal = towctrans_l(wideChar, paraDesc, newlocale(LC_ALL_MASK, "", (locale_t)0));
    LOGD("    towctrans_l returnVal:='%d'\n", returnVal);
    ASSERT_TRUE('a' == returnVal) << "ErrInfo: towctrans_l  returnVal:='" << returnVal << "'";
}

/**
* @tc.number     SUB_KERNEL_UTIL_CONVERT_TOWCTRANS_L_4200
* @tc.name       test towctrans_l api with lower alpha
* @tc.desc       [C- SOFTWARE -0200]
*/
HWTEST_F(ActsUtilConvertApiTest, testTowctransL4200, Function | MediumTest | Level1) {
    wint_t wideChar;
    wctrans_t paraDesc;
    wint_t returnVal;

    wideChar = L'a';
    paraDesc = wctrans_l("toupper", newlocale(LC_ALL_MASK, "", (locale_t)0));
    returnVal = towctrans_l(wideChar, paraDesc, newlocale(LC_ALL_MASK, "", (locale_t)0));
    LOGD("    towctrans_l returnVal:='%d'\n", returnVal);
    ASSERT_TRUE('A' == returnVal) << "ErrInfo: towctrans_l  returnVal:='" << returnVal << "'";
}

/**
* @tc.number     SUB_KERNEL_UTIL_CONVERT_WCTOB_4300
* @tc.name       test wctob api with lower alpha
* @tc.desc       [C- SOFTWARE -0200]
*/
HWTEST_F(ActsUtilConvertApiTest, testWctob4300, Function | MediumTest | Level1) {
    wint_t wideChar;
    int returnVal;

    wideChar = L'a';
    returnVal = wctob(wideChar);
    LOGD("    wctob returnVal:='%d'\n", returnVal);
    ASSERT_TRUE('a' == returnVal) << "ErrInfo: wctob  returnVal:='" << returnVal << "'";
}

/**
* @tc.number     SUB_KERNEL_UTIL_CONVERT_WCTOMB_4400
* @tc.name       test wctomb api with lower alpha
* @tc.desc       [C- SOFTWARE -0200]
*/
HWTEST_F(ActsUtilConvertApiTest, testWctomb4400, Function | MediumTest | Level1) {
    char paraStr[5];
    wint_t wideChar;
    int returnVal;

    wideChar = L'a';
    returnVal = wctomb(paraStr, wideChar);
    LOGD("    wctomb returnVal:='%d'\n", returnVal);
    ASSERT_TRUE(1 == returnVal && 'a' == paraStr[0]) << "ErrInfo: wctomb  returnVal:='" << returnVal << "'";
}

/**
* @tc.number     SUB_KERNEL_UTIL_CONVERT_MBSTOWCS_4500
* @tc.name       test mbstowcs api with string
* @tc.desc       [C- SOFTWARE -0200]
*/
HWTEST_F(ActsUtilConvertApiTest, testMbstowcs4500, Function | MediumTest | Level1) {
    wchar_t paraDest[10];
    const char *paraSrc = "abcde";
    size_t sizeVal = 6;
    size_t returnVal;

    returnVal = mbstowcs(paraDest, paraSrc, sizeVal);
    LOGD("    mbstowcs returnVal:='%d'\n", returnVal);
    ASSERT_TRUE(5 == returnVal && (0 == wcscmp(paraDest, L"abcde")))
        << "ErrInfo: mbstowcs  returnVal:='" << returnVal << "'";
}

/**
* @tc.number     SUB_KERNEL_UTIL_CONVERT_WCSTOMBS_4600
* @tc.name       test wcstombs api with string
* @tc.desc       [C- SOFTWARE -0200]
*/
HWTEST_F(ActsUtilConvertApiTest, testWcstombs4600, Function | MediumTest | Level1) {
    char paraDest[10];
    const wchar_t *paraSrc = L"abcde";
    size_t sizeVal = 6;
    size_t returnVal;

    returnVal = wcstombs(paraDest, paraSrc, sizeVal);
    LOGD("    wcstombs returnVal:='%d'\n", returnVal);
    ASSERT_TRUE(5 == returnVal && (0 == strcmp(paraDest, "abcde")))
        << "ErrInfo: wcstombs  returnVal:='" << returnVal << "'";
}

/**
* @tc.number     SUB_KERNEL_UTIL_CONVERT_WCRTOMB_4700
* @tc.name       test wcrtomb api with lower alpha
* @tc.desc       [C- SOFTWARE -0200]
*/
HWTEST_F(ActsUtilConvertApiTest, testWcrtomb4700, Function | MediumTest | Level1) {
    char paraStr[2];
    wchar_t wideChar;
    mbstate_t paraPs;
    size_t returnVal;

    wideChar = L'a';

    returnVal = wcrtomb(paraStr, wideChar, &paraPs);
    LOGD("    wcrtomb returnVal:='%d'\n", returnVal);
    ASSERT_TRUE(1 == returnVal && 'a' == paraStr[0]) << "ErrInfo: wcrtomb  returnVal:='" << returnVal << "'";
}