2000-01-15 02:00:06 +00:00
|
|
|
/********************************************************************
|
|
|
|
* COPYRIGHT:
|
2001-03-21 19:46:49 +00:00
|
|
|
* Copyright (c) 1997-2001, International Business Machines Corporation and
|
2000-01-15 02:00:06 +00:00
|
|
|
* others. All Rights Reserved.
|
|
|
|
********************************************************************/
|
|
|
|
/********************************************************************************
|
1999-08-16 21:50:52 +00:00
|
|
|
*
|
|
|
|
* File NCCBTST.H
|
|
|
|
*
|
|
|
|
* Modification History:
|
|
|
|
* Name Description
|
|
|
|
* Madhu Katragadda creation
|
|
|
|
*********************************************************************************
|
|
|
|
*/
|
2000-06-26 21:33:25 +00:00
|
|
|
#ifndef _NCCBTST
|
|
|
|
#define _NCCBTST
|
1999-08-16 21:50:52 +00:00
|
|
|
/* C API TEST FOR CALL BACK ROUTINES OF CODESET CONVERSION COMPONENT */
|
|
|
|
#include "cintltst.h"
|
1999-12-28 23:57:50 +00:00
|
|
|
#include "unicode/utypes.h"
|
1999-08-16 21:50:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
static void TestSkipCallBack(void);
|
2000-06-22 01:09:15 +00:00
|
|
|
static void TestStopCallBack(void);
|
1999-08-16 21:50:52 +00:00
|
|
|
static void TestSubCallBack(void);
|
|
|
|
static void TestSubWithValueCallBack(void);
|
|
|
|
static void TestLegalAndOtherCallBack(void);
|
|
|
|
static void TestSingleByteCallBack(void);
|
|
|
|
|
2000-07-31 22:42:14 +00:00
|
|
|
|
1999-08-16 21:50:52 +00:00
|
|
|
static void TestSkip(int32_t inputsize, int32_t outputsize);
|
|
|
|
|
2000-06-22 01:09:15 +00:00
|
|
|
static void TestStop(int32_t inputsize, int32_t outputsize);
|
|
|
|
|
1999-08-16 21:50:52 +00:00
|
|
|
static void TestSub(int32_t inputsize, int32_t outputsize);
|
|
|
|
|
|
|
|
static void TestSubWithValue(int32_t inputsize, int32_t outputsize);
|
|
|
|
|
|
|
|
static void TestLegalAndOthers(int32_t inputsize, int32_t outputsize);
|
|
|
|
static void TestSingleByte(int32_t inputsize, int32_t outputsize);
|
2000-07-31 22:42:14 +00:00
|
|
|
static void TestEBCDIC_STATEFUL_Sub(int32_t inputsize, int32_t outputsize);
|
1999-08-16 21:50:52 +00:00
|
|
|
|
2000-08-11 18:58:51 +00:00
|
|
|
UBool testConvertFromUnicode(const UChar *source, int sourceLen, const uint8_t *expect, int expectLen,
|
2000-11-21 04:05:39 +00:00
|
|
|
const char *codepage, UConverterFromUCallback callback, const int32_t *expectOffsets,
|
2000-07-31 22:42:14 +00:00
|
|
|
const char *mySubChar, int8_t len);
|
1999-08-16 21:50:52 +00:00
|
|
|
|
|
|
|
|
2000-08-11 18:58:51 +00:00
|
|
|
UBool testConvertToUnicode( const uint8_t *source, int sourcelen, const UChar *expect, int expectlen,
|
2000-11-21 04:05:39 +00:00
|
|
|
const char *codepage, UConverterToUCallback callback, const int32_t *expectOffsets,
|
2000-07-31 22:42:14 +00:00
|
|
|
const char *mySubChar, int8_t len);
|
1999-08-16 21:50:52 +00:00
|
|
|
|
2001-02-16 20:13:47 +00:00
|
|
|
UBool testConvertFromUnicodeWithContext(const UChar *source, int sourceLen, const uint8_t *expect, int expectLen,
|
|
|
|
const char *codepage, UConverterFromUCallback callback , const int32_t *expectOffsets,
|
|
|
|
const char *mySubChar, int8_t len, void* context, UErrorCode expectedError);
|
|
|
|
|
|
|
|
UBool testConvertToUnicodeWithContext( const uint8_t *source, int sourcelen, const UChar *expect, int expectlen,
|
|
|
|
const char *codepage, UConverterToUCallback callback, const int32_t *expectOffsets,
|
|
|
|
const char *mySubChar, int8_t len, void* context, UErrorCode expectedError);
|
1999-08-16 21:50:52 +00:00
|
|
|
|
2000-08-11 18:58:51 +00:00
|
|
|
static void printSeq(const uint8_t* a, int len);
|
1999-08-16 21:50:52 +00:00
|
|
|
static void printUSeq(const UChar* a, int len);
|
2000-08-11 18:58:51 +00:00
|
|
|
static void printSeqErr(const uint8_t* a, int len);
|
1999-08-16 21:50:52 +00:00
|
|
|
static void printUSeqErr(const UChar* a, int len);
|
|
|
|
static void setNuConvTestName(const char *codepage, const char *direction);
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|