Back to index

glibc  2.9
dat_wcslen.c
Go to the documentation of this file.
00001 /*
00002  *  TEST SUITE FOR MB/WC FUNCTIONS IN CLIBRARY
00003  *
00004  *       FILE:  dat_wcslen.c
00005  *
00006  *       WCSLEN:  size_t wcslen (const wchar_t *ws);
00007  */
00008 
00009 
00010 /*
00011  *  NOTE:
00012  *
00013  *      a header in each expected data:
00014  *
00015  *         int  err_val;  ... expected value for errno
00016  *        <typ> ret_flg; ... set ret_flg=1 to compare an expected
00017  *                           value with an actual value
00018  *        <typ> ret_val; ... expected value for return
00019  */
00020 
00021 
00022 TST_WCSLEN tst_wcslen_loc [] = {
00023 
00024   {   { Twcslen, TST_LOC_de },
00025       {
00026        { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 } },  /* #01 */
00027          /*expect*/ { 0,1,3,                        },
00028        },
00029        { /*input.*/ { { 0x0000 }                      },  /* #02 */
00030          /*expect*/ { 0,1,0,                        },
00031        },
00032        { .is_last = 1 }
00033       }
00034   },
00035   {   { Twcslen, TST_LOC_enUS },
00036       {
00037        { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 } },  /* #01 */
00038          /*expect*/ { 0,1,3,                        },
00039        },
00040        { /*input.*/ { { 0x0000 }                      },  /* #02 */
00041          /*expect*/ { 0,1,0,                        },
00042        },
00043        { .is_last = 1 }
00044       }
00045   },
00046   {   { Twcslen, TST_LOC_eucJP },
00047       {
00048        { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 } },  /* #01 */
00049          /*expect*/ { 0,1,3,                        },
00050        },
00051        { /*input.*/ { { 0x0000 }                      },  /* #02 */
00052          /*expect*/ { 0,1,0,                        },
00053        },
00054        { .is_last = 1 }
00055       }
00056   },
00057   {   { Twcslen, TST_LOC_end }}
00058 };