2 **********************************************************************
3 * Copyright (C) 1998-2010, International Business Machines Corporation
4 * and others. All Rights Reserved.
5 **********************************************************************
9 * Modification History:
11 * Date Name Description
12 * 4/26/2000 srl created
13 *******************************************************************************
16 #include "unicode/utypes.h"
19 #include "unicode/udata.h"
20 #include "unicode/ucnv.h"
22 extern const char U_IMPORT U_ICUDATA_ENTRY_POINT
[];
29 UErrorCode status
= U_ZERO_ERROR
;
31 udata_setCommonData(NULL
, &status
);
32 printf("setCommonData(NULL) -> %s [should fail]\n", u_errorName(status
));
33 if(status
!= U_ILLEGAL_ARGUMENT_ERROR
)
35 printf("*** FAIL: should have returned U_ILLEGAL_ARGUMENT_ERROR\n");
39 status
= U_ZERO_ERROR
;
40 udata_setCommonData(U_ICUDATA_ENTRY_POINT
, &status
);
41 printf("setCommonData(%p) -> %s\n", U_ICUDATA_ENTRY_POINT
, u_errorName(status
));
44 printf("*** FAIL: should have returned U_ZERO_ERROR\n");
48 status
= U_ZERO_ERROR
;
49 c
= ucnv_open("iso-8859-7", &status
);
50 printf("ucnv_open(iso-8859-7)-> %p, err = %s, name=%s\n",
51 (void *)c
, u_errorName(status
), (!c
)?"?":ucnv_getName(c
,&status
) );
52 if(status
!= U_ZERO_ERROR
)
54 printf("\n*** FAIL: should have returned U_ZERO_ERROR;\n");
62 status
= U_ZERO_ERROR
;
63 udata_setCommonData(U_ICUDATA_ENTRY_POINT
, &status
);
64 printf("setCommonData(%p) -> %s [should pass]\n", U_ICUDATA_ENTRY_POINT
, u_errorName(status
));
65 if (U_FAILURE(status
) || status
== U_USING_DEFAULT_WARNING
)
67 printf("\n*** FAIL: should pass and not set U_USING_DEFAULT_ERROR\n");
71 printf("\n*** PASS PASS PASS, test PASSED!!!!!!!!\n");