X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Ffunctional%2Fmbc.c;h=65dceaab2147cf13573fffe76f97af5adcd4dc51;hb=ec0d497d9d1190047f9fd35fbc859eb02d52c730;hp=56c546b9c12c3f7f7fc427c19b09529a9f28cf49;hpb=2cf89517c5b25c2524fe0c0c01ed277d7307a852;p=libc-test diff --git a/src/functional/mbc.c b/src/functional/mbc.c index 56c546b..65dceaa 100644 --- a/src/functional/mbc.c +++ b/src/functional/mbc.c @@ -14,11 +14,11 @@ #define T(f, x, m) (void)( \ memset(&st, 0, sizeof st), \ (i = (f)) == (x) || \ - error("%s failed (%s) got %d want %d\n", #f, m, i, x) ) + t_error("%s failed (%s) got %d want %d\n", #f, m, i, x) ) #define TCHAR(f, x, m) (void)( \ memset(&st, 0, sizeof st), \ (i = (f)) == (x) || \ - error("%s failed (%s) got 0x%04x want 0x%04x\n", #f, m, i, x) ) + t_error("%s failed (%s) got 0x%04x want 0x%04x\n", #f, m, i, x) ) int main(void) { @@ -41,7 +41,7 @@ int main(void) T(mbsrtowcs(NULL, (cs="abcdef",&cs), 2, &st), 6, "wrong semantics for NULL wcs"); if (strcmp(nl_langinfo(CODESET), "UTF-8")) - return error("cannot set UTF-8 locale for test (codeset=%s)\n", nl_langinfo(CODESET)); + return t_error("cannot set UTF-8 locale for test (codeset=%s)\n", nl_langinfo(CODESET)); T(mbrtowc(&wc, "\x80", 1, &st), -1, "failed to catch error"); T(mbrtowc(&wc, "\xc0", 1, &st), -1, "failed to catch illegal initial"); @@ -81,5 +81,5 @@ int main(void) TCHAR(wcs[0], 0xa0, "wrong char"); TCHAR(wcs[1], 'a', "wrong char"); T(!cs, 1, "wrong final position"); - return test_status; + return t_status; }