2 **********************************************************************
3 * Copyright (C) 1998-2003, 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
[];
30 int32_t month
= -1, year
= -1;
31 UErrorCode status
= U_ZERO_ERROR
;
32 status
= U_ZERO_ERROR
;
35 udata_setCommonData(NULL
, &status
);
36 printf("setCommonData(NULL) -> %s [should fail]\n", u_errorName(status
));
37 if(status
!= U_ILLEGAL_ARGUMENT_ERROR
)
39 printf("*** FAIL: should have returned U_ILLEGAL_ARGUMENT_ERROR\n");
43 status
= U_ZERO_ERROR
;
44 udata_setCommonData(U_ICUDATA_ENTRY_POINT
, &status
);
45 printf("setCommonData(%p) -> %s\n", U_ICUDATA_ENTRY_POINT
, u_errorName(status
));
48 printf("*** FAIL: should have returned U_ZERO_ERROR\n");
52 status
= U_ZERO_ERROR
;
53 c
= ucnv_open("iso-8859-7", &status
);
54 printf("ucnv_open(iso-8859-7)-> %p, err = %s, name=%s\n", c
, u_errorName(status
), (!c
)?"?":ucnv_getName(c
,&status
) );
55 if(status
!= U_ZERO_ERROR
)
57 printf("\n*** FAIL: should have returned U_ZERO_ERROR;\n");
65 status
= U_ZERO_ERROR
;
66 udata_setCommonData(U_ICUDATA_ENTRY_POINT
, &status
);
67 printf("setCommonData(%p) -> %s [should fail]\n", U_ICUDATA_ENTRY_POINT
, u_errorName(status
));
68 if ( status
!= U_USING_DEFAULT_WARNING
)
70 printf("\n*** FAIL: should have returned U_USING_DEFAULT_ERROR\n");
74 printf("\n*** PASS PASS PASS, test PASSED!!!!!!!!\n");