Back to index

glibc  2.9
dat_wcsspn.c
Go to the documentation of this file.
00001 /*
00002  *  TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
00003  *
00004  *      FILE: dat_wcsspn.c
00005  *
00006  *      WCSSPN:  size_t wcsspn (const wchar_t *ws1, const wchar_t *ws2);
00007  */
00008 
00009 TST_WCSSPN tst_wcsspn_loc [] = {
00010     {
00011       { Twcsspn, TST_LOC_de },
00012       {
00013        { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
00014                      { 0x00D1,0x0000                  }, },  /* #01 */
00015          /*expect*/ { 0,1,1,                            },
00016        },
00017        { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
00018                      {      0x00D2,0x0000      }, },  /* #02 */
00019          /*expect*/ { 0,1,0,                            },
00020        },
00021        { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
00022                      {             0x00D3,0x0000 }, },  /* #03 */
00023          /*expect*/ { 0,1,0,                            },
00024        },
00025        { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
00026                      {             0x00D4,0x0000 }, },  /* #04 */
00027          /*expect*/ { 0,1,0,                            },
00028        },
00029        { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
00030                      {      0x00D2,0x00D3,0x0000 }, },  /* #05 */
00031          /*expect*/ { 0,1,0,                            },
00032        },
00033        { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
00034                      {      0x00D3,0x00D4,0x0000 }, },  /* #06 */
00035          /*expect*/ { 0,1,0,                            },
00036        },
00037        { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
00038                      { 0x00D1,0x00D2,0x00D3,0x0000 }, },  /* #07 */
00039          /*expect*/ { 0,1,3,                            },
00040        },
00041        { /*input.*/ { { 0x00D1,0x00D2,0x0000          },
00042                      { 0x00D1,0x00D2,0x00D3,0x0000 }, },  /* #08 */
00043          /*expect*/ { 0,1,2,                            },
00044        },
00045        { /*input.*/ { { 0x0000,0x00D2,0x00D3,0x0000 },
00046                      { 0x00D2,0x0000                  }, },  /* #09 */
00047          /*expect*/ { 0,1,0,                            },
00048        },
00049        { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
00050                      { 0x0000,0x00D2,0x0000           }, },  /* #10 */
00051          /*expect*/ { 0,1,0,                            },
00052        },
00053        { /*input.*/ { { 0x0000,0x00D2,0x00D3,0x0000 },
00054                      { 0x0000,0x00D2,0x0000           }, },  /* #11 */
00055          /*expect*/ { 0,1,0,                            },
00056        },
00057        { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
00058                      { 0x00D2,0x00D1,0x0000           }, },  /* #12 */
00059          /*expect*/ { 0,1,2,                            },
00060        },
00061        { .is_last = 1 }
00062       }
00063     },
00064     {
00065       { Twcsspn, TST_LOC_enUS },
00066       {
00067        { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
00068                      { 0x0041,0x0000                  }, },  /* #01 */
00069          /*expect*/ { 0,1,1,                            },
00070        },
00071        { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
00072                      {      0x0042,0x0000      }, },  /* #02 */
00073          /*expect*/ { 0,1,0,                            },
00074        },
00075        { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
00076                      {             0x0043,0x0000 }, },  /* #03 */
00077          /*expect*/ { 0,1,0,                            },
00078        },
00079        { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
00080                      {             0x0044,0x0000 }, },  /* #04 */
00081          /*expect*/ { 0,1,0,                            },
00082        },
00083        { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
00084                      {      0x0042,0x0043,0x0000 }, },  /* #05 */
00085          /*expect*/ { 0,1,0,                            },
00086        },
00087        { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
00088                      {      0x0043,0x0044,0x0000 }, },  /* #06 */
00089          /*expect*/ { 0,1,0,                            },
00090        },
00091        { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
00092                      { 0x0041,0x0042,0x0043,0x0000 }, },  /* #07 */
00093          /*expect*/ { 0,1,3,                            },
00094        },
00095        { /*input.*/ { { 0x0041,0x0042,0x0000          },
00096                      { 0x0041,0x0042,0x0043,0x0000 }, },  /* #08 */
00097          /*expect*/ { 0,1,2,                            },
00098        },
00099        { /*input.*/ { { 0x0000,0x0042,0x0043,0x0000 },
00100                      { 0x0042,0x0000                  }, },  /* #09 */
00101          /*expect*/ { 0,1,0,                            },
00102        },
00103        { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
00104                      { 0x0000,0x0042,0x0000           }, },  /* #10 */
00105          /*expect*/ { 0,1,0,                            },
00106        },
00107        { /*input.*/ { { 0x0000,0x0042,0x0043,0x0000 },
00108                      { 0x0000,0x0042,0x0000           }, },  /* #11 */
00109          /*expect*/ { 0,1,0,                            },
00110        },
00111        { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
00112                      { 0x0042,0x0041,0x0000           }, },  /* #12 */
00113          /*expect*/ { 0,1,2,                            },
00114        },
00115        { .is_last = 1 }
00116       }
00117     },
00118     {
00119       { Twcsspn, TST_LOC_eucJP },
00120       {
00121        { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
00122                      { 0x3041,0x0000                  }, },  /* #1 */
00123          /*expect*/ { 0,1,1,                            },
00124        },
00125        { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
00126                      {      0x3042,0x0000      }, },  /* #2 */
00127          /*expect*/ { 0,1,0,                            },
00128        },
00129        { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
00130                      {             0x3043,0x0000 }, },  /* #3 */
00131          /*expect*/ { 0,1,0,                            },
00132        },
00133        { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
00134                      {             0x3044,0x0000 }, },  /* #4 */
00135          /*expect*/ { 0,1,0,                            },
00136        },
00137        { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
00138                      {      0x3042,0x3043,0x0000 }, },  /* #5 */
00139          /*expect*/ { 0,1,0,                            },
00140        },
00141        { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
00142                      {      0x3043,0x3044,0x0000 }, },  /* #6 */
00143          /*expect*/ { 0,1,0,                            },
00144        },
00145        { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
00146                      { 0x3041,0x3042,0x3043,0x0000 }, },  /* #7 */
00147          /*expect*/ { 0,1,3,                            },
00148        },
00149        { /*input.*/ { { 0x3041,0x3042,0x0000          },
00150                      { 0x3041,0x3042,0x3043,0x0000 }, },  /* #8 */
00151          /*expect*/ { 0,1,2,                            },
00152        },
00153        { /*input.*/ { { 0x0000,0x3042,0x3043,0x0000 },
00154                      { 0x3042,0x0000                  }, },  /* #9 */
00155          /*expect*/ { 0,1,0,                            },
00156        },
00157        { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
00158                      { 0x0000,0x3042,0x0000           }, },  /* #10 */
00159          /*expect*/ { 0,1,0,                            },
00160        },
00161        { /*input.*/ { { 0x0000,0x3042,0x3043,0x0000 },
00162                      { 0x0000,0x3042,0x0000           }, },  /* #11 */
00163          /*expect*/ { 0,1,0,                            },
00164        },
00165        { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
00166                      { 0x3042,0x3041,0x0000           }, },  /* #12 */
00167          /*expect*/ { 0,1,2,                            },
00168        },
00169        { .is_last = 1 }
00170       }
00171     },
00172     {
00173       { Twcsspn, TST_LOC_end }
00174     }
00175 };