]>
git.saurik.com Git - apple/icu.git/blob - icuSources/test/cintltst/cctest.c
1 /********************************************************************
3 * Copyright (c) 1997-2004, International Business Machines Corporation and
4 * others. All Rights Reserved.
5 ********************************************************************/
7 #include "unicode/ucnv.h"
8 #include "unicode/ucnv_err.h"
12 void TestDefaultConverterError(void); /* keep gcc happy */
15 /* This makes sure that a converter isn't leaked when an error is passed to
16 u_getDefaultConverter */
17 void TestDefaultConverterError(void) {
18 UErrorCode err
= U_ZERO_ERROR
;
20 /* Remove the default converter */
21 ucnv_close(u_getDefaultConverter(&err
));
24 log_err("Didn't expect a failure yet %s\n", myErrorName(err
));
28 /* Set to any radom error state */
29 err
= U_FILE_ACCESS_ERROR
;
30 if (u_getDefaultConverter(&err
) != NULL
) {
31 log_err("Didn't expect to get a converter on a failure\n");