Home | History | Annotate | Line # | Download | only in locale
t_c16rtomb.c revision 1.6.2.2
      1  1.6.2.2  martin /*	$NetBSD: t_c16rtomb.c,v 1.6.2.2 2024/10/14 17:20:19 martin Exp $	*/
      2  1.6.2.2  martin 
      3  1.6.2.2  martin /*-
      4  1.6.2.2  martin  * Copyright (c) 2002 Tim J. Robbins
      5  1.6.2.2  martin  * All rights reserved.
      6  1.6.2.2  martin  *
      7  1.6.2.2  martin  * Copyright (c) 2013 Ed Schouten <ed (at) FreeBSD.org>
      8  1.6.2.2  martin  * All rights reserved.
      9  1.6.2.2  martin  *
     10  1.6.2.2  martin  * Redistribution and use in source and binary forms, with or without
     11  1.6.2.2  martin  * modification, are permitted provided that the following conditions
     12  1.6.2.2  martin  * are met:
     13  1.6.2.2  martin  * 1. Redistributions of source code must retain the above copyright
     14  1.6.2.2  martin  *    notice, this list of conditions and the following disclaimer.
     15  1.6.2.2  martin  * 2. Redistributions in binary form must reproduce the above copyright
     16  1.6.2.2  martin  *    notice, this list of conditions and the following disclaimer in the
     17  1.6.2.2  martin  *    documentation and/or other materials provided with the distribution.
     18  1.6.2.2  martin  *
     19  1.6.2.2  martin  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
     20  1.6.2.2  martin  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     21  1.6.2.2  martin  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     22  1.6.2.2  martin  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
     23  1.6.2.2  martin  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     24  1.6.2.2  martin  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     25  1.6.2.2  martin  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     26  1.6.2.2  martin  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     27  1.6.2.2  martin  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     28  1.6.2.2  martin  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     29  1.6.2.2  martin  * SUCH DAMAGE.
     30  1.6.2.2  martin  */
     31  1.6.2.2  martin /*
     32  1.6.2.2  martin  * Test program for c16rtomb() as specified by ISO/IEC 9899:2011.
     33  1.6.2.2  martin  */
     34  1.6.2.2  martin 
     35  1.6.2.2  martin #include <sys/cdefs.h>
     36  1.6.2.2  martin __RCSID("$NetBSD: t_c16rtomb.c,v 1.6.2.2 2024/10/14 17:20:19 martin Exp $");
     37  1.6.2.2  martin 
     38  1.6.2.2  martin #include <errno.h>
     39  1.6.2.2  martin #include <limits.h>
     40  1.6.2.2  martin #include <locale.h>
     41  1.6.2.2  martin #include <stdio.h>
     42  1.6.2.2  martin #include <string.h>
     43  1.6.2.2  martin #include <uchar.h>
     44  1.6.2.2  martin 
     45  1.6.2.2  martin #include <atf-c.h>
     46  1.6.2.2  martin 
     47  1.6.2.2  martin static void
     48  1.6.2.2  martin require_lc_ctype(const char *locale_name)
     49  1.6.2.2  martin {
     50  1.6.2.2  martin 	char *lc_ctype_set;
     51  1.6.2.2  martin 
     52  1.6.2.2  martin 	lc_ctype_set = setlocale(LC_CTYPE, locale_name);
     53  1.6.2.2  martin 	if (lc_ctype_set == NULL)
     54  1.6.2.2  martin 		atf_tc_fail("setlocale(LC_CTYPE, \"%s\") failed; errno=%d",
     55  1.6.2.2  martin 		    locale_name, errno);
     56  1.6.2.2  martin 
     57  1.6.2.2  martin 	ATF_REQUIRE_EQ_MSG(strcmp(lc_ctype_set, locale_name), 0,
     58  1.6.2.2  martin 	    "lc_ctype_set=%s locale_name=%s", lc_ctype_set, locale_name);
     59  1.6.2.2  martin }
     60  1.6.2.2  martin 
     61  1.6.2.2  martin static mbstate_t s;
     62  1.6.2.2  martin static char buf[7*MB_LEN_MAX + 1];
     63  1.6.2.2  martin 
     64  1.6.2.2  martin ATF_TC_WITHOUT_HEAD(c16rtomb_c_locale_test);
     65  1.6.2.2  martin ATF_TC_BODY(c16rtomb_c_locale_test, tc)
     66  1.6.2.2  martin {
     67  1.6.2.2  martin 	size_t n;
     68  1.6.2.2  martin 
     69  1.6.2.2  martin 	require_lc_ctype("C");
     70  1.6.2.2  martin 
     71  1.6.2.2  martin 	/*
     72  1.6.2.2  martin 	 * If the buffer argument is NULL, c16 is implicitly 0,
     73  1.6.2.2  martin 	 * c16rtomb() resets its internal state.
     74  1.6.2.2  martin 	 */
     75  1.6.2.2  martin 	ATF_CHECK_EQ_MSG((n = c16rtomb(NULL, L'\0', NULL)), 1, "n=%zu", n);
     76  1.6.2.2  martin 	ATF_CHECK_EQ_MSG((n = c16rtomb(NULL, 0xdc00, NULL)), 1, "n=%zu", n);
     77  1.6.2.2  martin 
     78  1.6.2.2  martin 	/* Null wide character. */
     79  1.6.2.2  martin 	memset(&s, 0, sizeof(s));
     80  1.6.2.2  martin 	memset(buf, 0xcc, sizeof(buf));
     81  1.6.2.2  martin 	ATF_CHECK_EQ_MSG((n = c16rtomb(buf, 0, &s)), 1, "n=%zu", n);
     82  1.6.2.2  martin 	ATF_CHECK_MSG(((unsigned char)buf[0] == 0 &&
     83  1.6.2.2  martin 		(unsigned char)buf[1] == 0xcc),
     84  1.6.2.2  martin 	    "buf=[%02x %02x]", buf[0], buf[1]);
     85  1.6.2.2  martin 
     86  1.6.2.2  martin 	/* Latin letter A, internal state. */
     87  1.6.2.2  martin 	ATF_CHECK_EQ_MSG((n = c16rtomb(NULL, L'\0', NULL)), 1, "n=%zu", n);
     88  1.6.2.2  martin 	ATF_CHECK_EQ_MSG((n = c16rtomb(NULL, L'A', NULL)), 1, "n=%zu", n);
     89  1.6.2.2  martin 
     90  1.6.2.2  martin 	/* Latin letter A. */
     91  1.6.2.2  martin 	memset(&s, 0, sizeof(s));
     92  1.6.2.2  martin 	memset(buf, 0xcc, sizeof(buf));
     93  1.6.2.2  martin 	ATF_CHECK_EQ_MSG((n = c16rtomb(buf, L'A', &s)), 1, "n=%zu", n);
     94  1.6.2.2  martin 	ATF_CHECK_MSG(((unsigned char)buf[0] == 'A' &&
     95  1.6.2.2  martin 		(unsigned char)buf[1] == 0xcc),
     96  1.6.2.2  martin 	    "buf=[%02x %02x]", buf[0], buf[1]);
     97  1.6.2.2  martin 
     98  1.6.2.2  martin 	/* Unicode character 'Pile of poo'. */
     99  1.6.2.2  martin 	memset(&s, 0, sizeof(s));
    100  1.6.2.2  martin 	memset(buf, 0xcc, sizeof(buf));
    101  1.6.2.2  martin 	ATF_CHECK_EQ_MSG((n = c16rtomb(buf, 0xd83d, &s)), 0, "n=%zu", n);
    102  1.6.2.2  martin 	ATF_CHECK_EQ_MSG((n = c16rtomb(buf, 0xdca9, &s)), (size_t)-1,
    103  1.6.2.2  martin 	    "n=%zu", n);
    104  1.6.2.2  martin 	ATF_CHECK_EQ_MSG(errno, EILSEQ, "errno=%d", errno);
    105  1.6.2.2  martin 	ATF_CHECK_EQ_MSG((unsigned char)buf[0], 0xcc, "buf=[%02x]", buf[0]);
    106  1.6.2.2  martin 
    107  1.6.2.2  martin 	/* Incomplete Unicode character 'Pile of poo', interrupted by NUL. */
    108  1.6.2.2  martin 	memset(&s, 0, sizeof(s));
    109  1.6.2.2  martin 	memset(buf, 0xcc, sizeof(buf));
    110  1.6.2.2  martin 	ATF_CHECK_EQ_MSG((n = c16rtomb(buf, 0xd83d, &s)), 0, "n=%zu", n);
    111  1.6.2.2  martin 	ATF_CHECK_EQ_MSG((n = c16rtomb(buf, L'\0', &s)), 1, "n=%zu", n);
    112  1.6.2.2  martin 	ATF_CHECK_MSG(((unsigned char)buf[0] == '\0' &&
    113  1.6.2.2  martin 		(unsigned char)buf[1] == 0xcc),
    114  1.6.2.2  martin 	    "buf=[%02x %02x]", buf[0], buf[1]);
    115  1.6.2.2  martin }
    116  1.6.2.2  martin 
    117  1.6.2.2  martin ATF_TC_WITHOUT_HEAD(c16rtomb_iso2022jp_locale_test);
    118  1.6.2.2  martin ATF_TC_BODY(c16rtomb_iso2022jp_locale_test, tc)
    119  1.6.2.2  martin {
    120  1.6.2.2  martin 	char *p;
    121  1.6.2.2  martin 	size_t n;
    122  1.6.2.2  martin 
    123  1.6.2.2  martin 	require_lc_ctype("ja_JP.ISO-2022-JP");
    124  1.6.2.2  martin 
    125  1.6.2.2  martin 	/*
    126  1.6.2.2  martin 	 * If the buffer argument is NULL, c16 is implicitly 0,
    127  1.6.2.2  martin 	 * c16rtomb() resets its internal state.
    128  1.6.2.2  martin 	 */
    129  1.6.2.2  martin 	ATF_CHECK_EQ_MSG((n = c16rtomb(NULL, L'\0', NULL)), 1, "n=%zu", n);
    130  1.6.2.2  martin 	ATF_CHECK_EQ_MSG((n = c16rtomb(NULL, 0xdc00, NULL)), 1, "n=%zu", n);
    131  1.6.2.2  martin 
    132  1.6.2.2  martin 	/* Null wide character. */
    133  1.6.2.2  martin 	memset(&s, 0, sizeof(s));
    134  1.6.2.2  martin 	memset(buf, 0xcc, sizeof(buf));
    135  1.6.2.2  martin 	ATF_CHECK_EQ_MSG((n = c16rtomb(buf, 0, &s)), 1, "n=%zu", n);
    136  1.6.2.2  martin 	ATF_CHECK_MSG(((unsigned char)buf[0] == 0 &&
    137  1.6.2.2  martin 		(unsigned char)buf[1] == 0xcc),
    138  1.6.2.2  martin 	    "buf=[%02x %02x]", buf[0], buf[1]);
    139  1.6.2.2  martin 
    140  1.6.2.2  martin 	/* Latin letter A, internal state. */
    141  1.6.2.2  martin 	ATF_CHECK_EQ_MSG((n = c16rtomb(NULL, L'\0', NULL)), 1, "n=%zu", n);
    142  1.6.2.2  martin 	ATF_CHECK_EQ_MSG((n = c16rtomb(NULL, L'A', NULL)), 1, "n=%zu", n);
    143  1.6.2.2  martin 
    144  1.6.2.2  martin 	/*
    145  1.6.2.2  martin 	 * 1. U+0042 LATIN CAPITAL LETTER A
    146  1.6.2.2  martin 	 * 2. U+00A5 YEN SIGN
    147  1.6.2.2  martin 	 * 3. U+00A5 YEN SIGN (again, no shift needed)
    148  1.6.2.2  martin 	 * 4. U+30A2 KATAKANA LETTER A
    149  1.6.2.2  martin 	 * 5. U+30A2 KATAKANA LETTER A (again, no shift needed)
    150  1.6.2.2  martin 	 * 6. incomplete UTF-16 surrogate pair -- no output
    151  1.6.2.2  martin 	 * 7. U+0000 NUL (plus shift sequence to initial state)
    152  1.6.2.2  martin 	 */
    153  1.6.2.2  martin 	memset(&s, 0, sizeof(s));
    154  1.6.2.2  martin 	memset(buf, 0xcc, sizeof(buf));
    155  1.6.2.2  martin 	p = buf;
    156  1.6.2.2  martin 	ATF_CHECK_EQ_MSG((n = c16rtomb(p, L'A', &s)), 1, "n=%zu", n); /* 1 */
    157  1.6.2.2  martin 	p += 1;
    158  1.6.2.2  martin 	ATF_CHECK_EQ_MSG((n = c16rtomb(p, 0xa5, &s)), 4, "n=%zu", n); /* 2 */
    159  1.6.2.2  martin 	p += 4;
    160  1.6.2.2  martin 	ATF_CHECK_EQ_MSG((n = c16rtomb(p, 0xa5, &s)), 1, "n=%zu", n); /* 3 */
    161  1.6.2.2  martin 	p += 1;
    162  1.6.2.2  martin 	ATF_CHECK_EQ_MSG((n = c16rtomb(p, 0x30a2, &s)), 5, "n=%zu", n); /* 4 */
    163  1.6.2.2  martin 	p += 5;
    164  1.6.2.2  martin 	ATF_CHECK_EQ_MSG((n = c16rtomb(p, 0x30a2, &s)), 2, "n=%zu", n); /* 5 */
    165  1.6.2.2  martin 	p += 2;
    166  1.6.2.2  martin 	ATF_CHECK_EQ_MSG((n = c16rtomb(p, 0xd800, &s)), 0, "n=%zu", n); /* 6 */
    167  1.6.2.2  martin 	ATF_CHECK_EQ_MSG((n = c16rtomb(p, L'\0', &s)), 4, "n=%zu", n); /* 7 */
    168  1.6.2.2  martin 	p += 4;
    169  1.6.2.2  martin 	ATF_CHECK_MSG(((unsigned char)buf[0] == 'A' &&
    170  1.6.2.2  martin 		(unsigned char)buf[1] == 0x1b && /* shift ISO/IEC 646:JP */
    171  1.6.2.2  martin 		(unsigned char)buf[2] == '(' &&
    172  1.6.2.2  martin 		(unsigned char)buf[3] == 'J' &&
    173  1.6.2.2  martin 		(unsigned char)buf[4] == 0x5c && /* YEN SIGN */
    174  1.6.2.2  martin 		(unsigned char)buf[5] == 0x5c && /* YEN SIGN */
    175  1.6.2.2  martin 		(unsigned char)buf[6] == 0x1b && /* shift JIS X 0208 */
    176  1.6.2.2  martin 		(unsigned char)buf[7] == '$' &&
    177  1.6.2.2  martin 		(unsigned char)buf[8] == 'B' &&
    178  1.6.2.2  martin 		(unsigned char)buf[9] == 0x25 && /* KATAKANA LETTER A */
    179  1.6.2.2  martin 		(unsigned char)buf[10] == 0x22 &&
    180  1.6.2.2  martin 		(unsigned char)buf[11] == 0x25 && /* KATAKANA LETTER A */
    181  1.6.2.2  martin 		(unsigned char)buf[12] == 0x22 &&
    182  1.6.2.2  martin 		(unsigned char)buf[13] == 0x1b && /* shift US-ASCII */
    183  1.6.2.2  martin 		(unsigned char)buf[14] == '(' &&
    184  1.6.2.2  martin 		(unsigned char)buf[15] == 'B' &&
    185  1.6.2.2  martin 		(unsigned char)buf[16] == '\0' &&
    186  1.6.2.2  martin 		(unsigned char)buf[17] == 0xcc),
    187  1.6.2.2  martin 	    "buf=[%02x %02x %02x %02x  %02x %02x %02x %02x "
    188  1.6.2.2  martin 	    " %02x %02x %02x %02x  %02x %02x %02x %02x "
    189  1.6.2.2  martin 	    " %02x %02x]",
    190  1.6.2.2  martin 	    buf[0], buf[1], buf[2], buf[3],
    191  1.6.2.2  martin 	    buf[4], buf[5], buf[6], buf[7],
    192  1.6.2.2  martin 	    buf[8], buf[9], buf[10], buf[11],
    193  1.6.2.2  martin 	    buf[12], buf[13], buf[14], buf[15],
    194  1.6.2.2  martin 	    buf[16], buf[17]);
    195  1.6.2.2  martin }
    196  1.6.2.2  martin 
    197  1.6.2.2  martin ATF_TC_WITHOUT_HEAD(c16rtomb_iso_8859_1_test);
    198  1.6.2.2  martin ATF_TC_BODY(c16rtomb_iso_8859_1_test, tc)
    199  1.6.2.2  martin {
    200  1.6.2.2  martin 	size_t n;
    201  1.6.2.2  martin 
    202  1.6.2.2  martin 	require_lc_ctype("en_US.ISO8859-1");
    203  1.6.2.2  martin 
    204  1.6.2.2  martin 	/* Unicode character 'Euro sign'. */
    205  1.6.2.2  martin 	memset(&s, 0, sizeof(s));
    206  1.6.2.2  martin 	memset(buf, 0xcc, sizeof(buf));
    207  1.6.2.2  martin 	ATF_CHECK_EQ_MSG((n = c16rtomb(buf, 0x20ac, &s)), (size_t)-1,
    208  1.6.2.2  martin 	    "n=%zu", n);
    209  1.6.2.2  martin 	ATF_CHECK_EQ_MSG(errno, EILSEQ, "errno=%d", errno);
    210  1.6.2.2  martin 	ATF_CHECK_EQ_MSG((unsigned char)buf[0], 0xcc, "buf=[%02x]", buf[0]);
    211  1.6.2.2  martin }
    212  1.6.2.2  martin 
    213  1.6.2.2  martin ATF_TC_WITHOUT_HEAD(c16rtomb_iso_8859_15_test);
    214  1.6.2.2  martin ATF_TC_BODY(c16rtomb_iso_8859_15_test, tc)
    215  1.6.2.2  martin {
    216  1.6.2.2  martin 	size_t n;
    217  1.6.2.2  martin 
    218  1.6.2.2  martin 	require_lc_ctype("en_US.ISO8859-15");
    219  1.6.2.2  martin 
    220  1.6.2.2  martin 	/* Unicode character 'Euro sign'. */
    221  1.6.2.2  martin 	memset(&s, 0, sizeof(s));
    222  1.6.2.2  martin 	memset(buf, 0xcc, sizeof(buf));
    223  1.6.2.2  martin 	ATF_CHECK_EQ_MSG((n = c16rtomb(buf, 0x20ac, &s)), 1, "n=%zu", n);
    224  1.6.2.2  martin 	ATF_CHECK_MSG(((unsigned char)buf[0] == 0xa4 &&
    225  1.6.2.2  martin 		(unsigned char)buf[1] == 0xcc),
    226  1.6.2.2  martin 	    "buf=[%02x %02x]", buf[0], buf[1]);
    227  1.6.2.2  martin }
    228  1.6.2.2  martin 
    229  1.6.2.2  martin ATF_TC_WITHOUT_HEAD(c16rtomb_utf_8_test);
    230  1.6.2.2  martin ATF_TC_BODY(c16rtomb_utf_8_test, tc)
    231  1.6.2.2  martin {
    232  1.6.2.2  martin 	size_t n;
    233  1.6.2.2  martin 
    234  1.6.2.2  martin 	require_lc_ctype("en_US.UTF-8");
    235  1.6.2.2  martin 
    236  1.6.2.2  martin 	/* Unicode character 'Pile of poo'. */
    237  1.6.2.2  martin 	memset(&s, 0, sizeof(s));
    238  1.6.2.2  martin 	memset(buf, 0xcc, sizeof(buf));
    239  1.6.2.2  martin 	ATF_CHECK_EQ_MSG((n = c16rtomb(buf, 0xd83d, &s)), 0, "n=%zu", n);
    240  1.6.2.2  martin 	ATF_CHECK_EQ_MSG((n = c16rtomb(buf, 0xdca9, &s)), 4, "n=%zu", n);
    241  1.6.2.2  martin 	ATF_CHECK_MSG(((unsigned char)buf[0] == 0xf0 &&
    242  1.6.2.2  martin 		(unsigned char)buf[1] == 0x9f &&
    243  1.6.2.2  martin 		(unsigned char)buf[2] == 0x92 &&
    244  1.6.2.2  martin 		(unsigned char)buf[3] == 0xa9 &&
    245  1.6.2.2  martin 		(unsigned char)buf[4] == 0xcc),
    246  1.6.2.2  martin 	    "buf=[%02x %02x %02x %02x %02x]",
    247  1.6.2.2  martin 	    buf[0], buf[1], buf[2], buf[3], buf[4]);
    248  1.6.2.2  martin 
    249  1.6.2.2  martin 	/* Invalid code; 'Pile of poo' without the trail surrogate. */
    250  1.6.2.2  martin 	memset(&s, 0, sizeof(s));
    251  1.6.2.2  martin 	memset(buf, 0xcc, sizeof(buf));
    252  1.6.2.2  martin 	ATF_CHECK_EQ_MSG((n = c16rtomb(buf, 0xd83d, &s)), 0, "n=%zu", n);
    253  1.6.2.2  martin 	ATF_CHECK_EQ_MSG((n = c16rtomb(buf, L'A', &s)), (size_t)-1,
    254  1.6.2.2  martin 	    "n=%zu", n);
    255  1.6.2.2  martin 	ATF_CHECK_EQ_MSG(errno, EILSEQ, "errno=%d", errno);
    256  1.6.2.2  martin 	ATF_CHECK_EQ_MSG((unsigned char)buf[0], 0xcc, "buf=[%02x]", buf[0]);
    257  1.6.2.2  martin 
    258  1.6.2.2  martin 	/* Invalid code; 'Pile of poo' without the lead surrogate. */
    259  1.6.2.2  martin 	memset(&s, 0, sizeof(s));
    260  1.6.2.2  martin 	memset(buf, 0xcc, sizeof(buf));
    261  1.6.2.2  martin 	ATF_CHECK_EQ_MSG((n = c16rtomb(buf, 0xdca9, &s)), (size_t)-1,
    262  1.6.2.2  martin 	    "n=%zu", n);
    263  1.6.2.2  martin 	ATF_CHECK_EQ_MSG(errno, EILSEQ, "errno=%d", errno);
    264  1.6.2.2  martin 	ATF_CHECK_EQ_MSG((unsigned char)buf[0], 0xcc, "buf=[%02x]", buf[0]);
    265  1.6.2.2  martin 
    266  1.6.2.2  martin 	/* Incomplete Unicode character 'Pile of poo', interrupted by NUL. */
    267  1.6.2.2  martin 	memset(&s, 0, sizeof(s));
    268  1.6.2.2  martin 	memset(buf, 0xcc, sizeof(buf));
    269  1.6.2.2  martin 	ATF_CHECK_EQ_MSG((n = c16rtomb(buf, 0xd83d, &s)), 0, "n=%zu", n);
    270  1.6.2.2  martin 	ATF_CHECK_EQ_MSG((n = c16rtomb(buf, L'\0', &s)), 1,
    271  1.6.2.2  martin 	    "n=%zu", n);
    272  1.6.2.2  martin 	ATF_CHECK_MSG(((unsigned char)buf[0] == '\0' &&
    273  1.6.2.2  martin 		(unsigned char)buf[1] == 0xcc),
    274  1.6.2.2  martin 	    "buf=[%02x %02x]", buf[0], buf[1]);
    275  1.6.2.2  martin }
    276  1.6.2.2  martin 
    277  1.6.2.2  martin ATF_TP_ADD_TCS(tp)
    278  1.6.2.2  martin {
    279  1.6.2.2  martin 
    280  1.6.2.2  martin 	ATF_TP_ADD_TC(tp, c16rtomb_c_locale_test);
    281  1.6.2.2  martin 	ATF_TP_ADD_TC(tp, c16rtomb_iso2022jp_locale_test);
    282  1.6.2.2  martin 	ATF_TP_ADD_TC(tp, c16rtomb_iso_8859_1_test);
    283  1.6.2.2  martin 	ATF_TP_ADD_TC(tp, c16rtomb_iso_8859_15_test);
    284  1.6.2.2  martin 	ATF_TP_ADD_TC(tp, c16rtomb_utf_8_test);
    285  1.6.2.2  martin 
    286  1.6.2.2  martin 	return (atf_no_error());
    287  1.6.2.2  martin }
    288