Back to index

glibc  2.9
dat_wcscmp.c
Go to the documentation of this file.
00001 /*
00002  *  TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
00003  *
00004  *      FILE: dat_wcscmp.c
00005  *
00006  *      WCSCMP:  int  wcscmp (const wchar_t *ws1, const wchar_t *ws2);
00007  */
00008 
00009 /* NOTE:
00010        This is not a locale sensitive function and
00011        it may not make sence testing it for each locale ...
00012 */
00013 
00014 
00015 TST_WCSCMP tst_wcscmp_loc [] = {
00016   {
00017     { Twcscmp, TST_LOC_de },
00018     {
00019       { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
00020                    { 0x00D1,0x00D2,0x00D3,0x0000 }, },  /* #1 */
00021        /*expect*/ { 0,1,0,                  },
00022       },
00023       { /*input.*/ { { 0x0000,0x00D1,0x00D3,0x0000 },
00024                    { 0x0000,0x00D2,0x00D3,0x0000 }, },  /* #2 */
00025        /*expect*/ { 0,1,0,                  },
00026       },
00027       { /*input.*/ { { 0x00D1,0x00D1,0x00D3,0x0000 },
00028                    { 0x0000,0x00D2,0x00D3,0x0000 }, },  /* #3 */
00029        /*expect*/ { 0,1,1,                  },
00030       },
00031       { /*input.*/ { { 0x0000,0x00D2,0x00D3,0x0000 },
00032                    { 0x00D1,0x00D1,0x00D3,0x0000 }, },  /* #4 */
00033        /*expect*/ { 0,1,-1,                 },
00034       },
00035       { /*input.*/ { { 0x00D1,0x00D5,0x00D3,0x0000 },
00036                    { 0x00D1,0x00D2,0x00D3,0x0000 }, },  /* #5 */
00037        /*expect*/ { 0,1,1,                  },
00038       },
00039       { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
00040                    { 0x00D1,0x00D2,0x00D9,0x0000 }, },  /* #6 */
00041        /*expect*/ { 0,1,-1,                 },
00042       },
00043       { /*input.*/ { { 0x00D1,0x00D2,0x0000             },
00044                    { 0x00D1,0x00D2,0x00D9,0x0000 }, },  /* #7 */
00045        /*expect*/ { 0,1,-1,                 },
00046       },
00047       { /*input.*/ { { 0x00D1,0x00D2,0x00D9,0x0000 },
00048                    { 0x00D1,0x00D2,0x0000        }, },  /* #8 */
00049        /*expect*/ { 0,1,1,                  },
00050       },
00051       { .is_last = 1 }
00052     }
00053   },
00054   {
00055     { Twcscmp, TST_LOC_enUS },
00056     {
00057       { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
00058                    { 0x0041,0x0042,0x0043,0x0000 }, },  /* #1 */
00059        /*expect*/ { 0,1,0,                  },
00060       },
00061       { /*input.*/ { { 0x0000,0x0041,0x0043,0x0000 },
00062                    { 0x0000,0x0042,0x0043,0x0000 }, },  /* #2 */
00063        /*expect*/ { 0,1,0,                  },
00064       },
00065       { /*input.*/ { { 0x0041,0x0041,0x0043,0x0000 },
00066                    { 0x0000,0x0042,0x0043,0x0000 }, },  /* #3 */
00067        /*expect*/ { 0,1,1,                  },
00068       },
00069       { /*input.*/ { { 0x0000,0x0042,0x0043,0x0000 },
00070                    { 0x0041,0x0041,0x0043,0x0000 }, },  /* #4 */
00071        /*expect*/ { 0,1,-1,                 },
00072       },
00073       { /*input.*/ { { 0x0041,0x0045,0x0043,0x0000 },
00074                    { 0x0041,0x0042,0x0043,0x0000 }, },  /* #5 */
00075        /*expect*/ { 0,1,1,                  },
00076       },
00077       { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
00078                    { 0x0041,0x0042,0x0049,0x0000 }, },  /* #6 */
00079        /*expect*/ { 0,1,-1,                 },
00080       },
00081       { /*input.*/ { { 0x0041,0x0042,0x0000             },
00082                    { 0x0041,0x0042,0x0049,0x0000 }, },  /* #7 */
00083        /*expect*/ { 0,1,-1,                 },
00084       },
00085       { /*input.*/ { { 0x0041,0x0042,0x0049,0x0000 },
00086                    { 0x0041,0x0042,0x0000        }, },  /* #8 */
00087        /*expect*/ { 0,1,1,                  },
00088       },
00089       { .is_last = 1 }
00090     }
00091   },
00092   {
00093     { Twcscmp, TST_LOC_eucJP},
00094     {
00095       { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
00096                    { 0x3041,0x3042,0x3043,0x0000 }, },  /* #1 */
00097        /*expect*/ { 0,1,0,                  },
00098       },
00099       { /*input.*/ { { 0x0000,0x3041,0x3043,0x0000 },
00100                    { 0x0000,0x3042,0x3043,0x0000 }, },  /* #2 */
00101        /*expect*/ { 0,1,0,                  },
00102       },
00103       { /*input.*/ { { 0x3041,0x3041,0x3043,0x0000 },
00104                    { 0x0000,0x3042,0x3043,0x0000 }, },  /* #3 */
00105        /*expect*/ { 0,1,1,                  },
00106       },
00107       { /*input.*/ { { 0x0000,0x3042,0x3043,0x0000 },
00108                    { 0x3041,0x3041,0x3043,0x0000 }, },  /* #4 */
00109        /*expect*/ { 0,1,-1,                 },
00110       },
00111       { /*input.*/ { { 0x3041,0x3045,0x3043,0x0000 },
00112                    { 0x3041,0x3042,0x3043,0x0000 }, },  /* #5 */
00113        /*expect*/ { 0,1,1,                  },
00114       },
00115       { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
00116                    { 0x3041,0x3042,0x3049,0x0000 }, },  /* #6 */
00117        /*expect*/ { 0,1,-1,                 },
00118       },
00119       { /*input.*/ { { 0x3041,0x3042,0x0000             },
00120                    { 0x3041,0x3042,0x3049,0x0000 }, },  /* #7 */
00121        /*expect*/ { 0,1,-1,                 },
00122       },
00123       { /*input.*/ { { 0x3041,0x3042,0x3049,0x0000 },
00124                    { 0x3041,0x3042,0x0000        }, },  /* #8 */
00125        /*expect*/ { 0,1,1,                  },
00126       },
00127       { .is_last = 1 }
00128     }
00129   },
00130   {
00131     { Twcschr, TST_LOC_end}
00132   }
00133 };