2000-05-15 18:39:17 +00:00
|
|
|
/********************************************************************
|
|
|
|
* COPYRIGHT:
|
2006-07-03 21:05:30 +00:00
|
|
|
* Copyright (c) 1997-2006, International Business Machines Corporation and
|
2000-05-15 18:39:17 +00:00
|
|
|
* others. All Rights Reserved.
|
|
|
|
********************************************************************/
|
2000-05-24 23:42:34 +00:00
|
|
|
/***************************************************************************
|
2000-05-15 18:39:17 +00:00
|
|
|
*
|
|
|
|
* File CRESTST.H
|
|
|
|
*
|
|
|
|
* Modification History:
|
2000-05-24 23:42:34 +00:00
|
|
|
* Name Date Description
|
|
|
|
* Madhu Katragadda 05/09/2000 Ported Tests for New ResourceBundle API
|
|
|
|
* Madhu Katragadda 05/24/2000 Added new tests to test RES_BINARY for collationElements
|
|
|
|
*************************************************************************************************
|
2000-05-15 18:39:17 +00:00
|
|
|
*/
|
|
|
|
#ifndef _CRESTSTN
|
|
|
|
#define _CRESTSTN
|
|
|
|
/* C TEST FOR NEW RESOURCEBUNDLE API*/
|
|
|
|
#include "cintltst.h"
|
|
|
|
|
2006-07-03 21:05:30 +00:00
|
|
|
/*
|
|
|
|
* Test wrapper for ures_getStringXYZ(), for testing other variants of
|
|
|
|
* these functions as well.
|
|
|
|
* If index>=0, calls ures_getStringByIndex().
|
|
|
|
* If key!=NULL, calls ures_getStringByKey().
|
|
|
|
*/
|
|
|
|
extern const UChar *
|
|
|
|
tres_getString(const UResourceBundle *resB,
|
|
|
|
int32_t index, const char *key,
|
|
|
|
int32_t *length,
|
|
|
|
UErrorCode *status);
|
2000-05-15 18:39:17 +00:00
|
|
|
|
2001-08-27 18:51:43 +00:00
|
|
|
void addNEWResourceBundleTest(TestNode**);
|
2000-05-15 18:39:17 +00:00
|
|
|
|
2001-08-27 18:51:43 +00:00
|
|
|
/**
|
|
|
|
*Perform several extensive tests using the subtest routine testTag
|
|
|
|
*/
|
|
|
|
static void TestResourceBundles(void);
|
|
|
|
/**
|
|
|
|
* Test construction of ResourceBundle accessing a custom test resource-file
|
|
|
|
**/
|
|
|
|
static void TestConstruction1(void);
|
|
|
|
|
|
|
|
static void TestAliasConflict(void);
|
|
|
|
|
|
|
|
static void TestFallback(void);
|
|
|
|
|
|
|
|
static void TestBinaryCollationData(void);
|
2000-05-15 18:39:17 +00:00
|
|
|
|
2001-08-27 18:51:43 +00:00
|
|
|
static void TestNewTypes(void);
|
2000-05-15 18:39:17 +00:00
|
|
|
|
2001-08-27 18:51:43 +00:00
|
|
|
static void TestEmptyTypes(void);
|
2000-05-15 18:39:17 +00:00
|
|
|
|
2001-08-27 18:51:43 +00:00
|
|
|
static void TestAPI(void);
|
2000-05-24 23:42:34 +00:00
|
|
|
|
2001-08-27 18:51:43 +00:00
|
|
|
static void TestErrorConditions(void);
|
2000-07-11 23:27:11 +00:00
|
|
|
|
2001-08-27 18:51:43 +00:00
|
|
|
static void TestGetVersion(void);
|
2000-07-12 01:09:23 +00:00
|
|
|
|
2004-04-14 20:28:35 +00:00
|
|
|
static void TestGetVersionColl(void);
|
|
|
|
|
2001-08-27 18:51:43 +00:00
|
|
|
static void TestEmptyBundle(void);
|
2000-07-12 01:09:23 +00:00
|
|
|
|
2002-06-24 20:58:56 +00:00
|
|
|
static void TestDirectAccess(void);
|
|
|
|
|
|
|
|
static void TestResourceLevelAliasing(void);
|
|
|
|
|
2002-12-11 01:39:59 +00:00
|
|
|
static void TestErrorCodes(void);
|
|
|
|
|
2004-10-23 00:19:39 +00:00
|
|
|
static void TestJB3763(void);
|
|
|
|
|
2005-03-08 23:59:12 +00:00
|
|
|
static void TestXPath(void);
|
|
|
|
|
2005-08-10 06:13:37 +00:00
|
|
|
static void TestStackReuse(void);
|
|
|
|
|
2001-08-27 18:51:43 +00:00
|
|
|
/**
|
|
|
|
* extensive subtests called by TestResourceBundles
|
|
|
|
**/
|
|
|
|
static UBool testTag(const char* frag, UBool in_Root, UBool in_te, UBool in_te_IN);
|
2000-05-15 18:39:17 +00:00
|
|
|
|
2001-08-27 18:51:43 +00:00
|
|
|
static void record_pass(void);
|
|
|
|
static void record_fail(void);
|
2000-05-15 18:39:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
#endif
|