]> git.saurik.com Git - apple/icu.git/blame_incremental - icuSources/test/cintltst/nccbtst.h
ICU-551.51.4.tar.gz
[apple/icu.git] / icuSources / test / cintltst / nccbtst.h
... / ...
CommitLineData
1/********************************************************************
2 * COPYRIGHT:
3 * Copyright (c) 1997-2001, International Business Machines Corporation and
4 * others. All Rights Reserved.
5 ********************************************************************/
6/********************************************************************************
7*
8* File NCCBTST.H
9*
10* Modification History:
11* Name Description
12* Madhu Katragadda creation
13*********************************************************************************
14*/
15#ifndef _NCCBTST
16#define _NCCBTST
17/* C API TEST FOR CALL BACK ROUTINES OF CODESET CONVERSION COMPONENT */
18#include "cintltst.h"
19#include "unicode/utypes.h"
20
21
22static void TestSkipCallBack(void);
23static void TestStopCallBack(void);
24static void TestSubCallBack(void);
25static void TestSubWithValueCallBack(void);
26static void TestLegalAndOtherCallBack(void);
27static void TestSingleByteCallBack(void);
28
29
30static void TestSkip(int32_t inputsize, int32_t outputsize);
31
32static void TestStop(int32_t inputsize, int32_t outputsize);
33
34static void TestSub(int32_t inputsize, int32_t outputsize);
35
36static void TestSubWithValue(int32_t inputsize, int32_t outputsize);
37
38static void TestLegalAndOthers(int32_t inputsize, int32_t outputsize);
39static void TestSingleByte(int32_t inputsize, int32_t outputsize);
40static void TestEBCDIC_STATEFUL_Sub(int32_t inputsize, int32_t outputsize);
41
42/* Following will return FALSE *only* on a mismach. They will return TRUE on any other error OR success, because
43 * the error would have been emitted to log_err separately. */
44
45UBool testConvertFromUnicode(const UChar *source, int sourceLen, const uint8_t *expect, int expectLen,
46 const char *codepage, UConverterFromUCallback callback, const int32_t *expectOffsets,
47 const char *mySubChar, int8_t len);
48
49
50UBool testConvertToUnicode( const uint8_t *source, int sourcelen, const UChar *expect, int expectlen,
51 const char *codepage, UConverterToUCallback callback, const int32_t *expectOffsets,
52 const char *mySubChar, int8_t len);
53
54UBool testConvertFromUnicodeWithContext(const UChar *source, int sourceLen, const uint8_t *expect, int expectLen,
55 const char *codepage, UConverterFromUCallback callback , const int32_t *expectOffsets,
56 const char *mySubChar, int8_t len, const void* context, UErrorCode expectedError);
57
58UBool testConvertToUnicodeWithContext( const uint8_t *source, int sourcelen, const UChar *expect, int expectlen,
59 const char *codepage, UConverterToUCallback callback, const int32_t *expectOffsets,
60 const char *mySubChar, int8_t len, const void* context, UErrorCode expectedError);
61
62static void printSeq(const uint8_t* a, int len);
63static void printUSeq(const UChar* a, int len);
64static void printSeqErr(const uint8_t* a, int len);
65static void printUSeqErr(const UChar* a, int len);
66static void setNuConvTestName(const char *codepage, const char *direction);
67
68
69#endif