1/******************************************************************** 2 * COPYRIGHT: 3 * Copyright (c) 1997-2006, International Business Machines Corporation and 4 * others. All Rights Reserved. 5 ********************************************************************/ 6/*************************************************************************** 7* 8* File CRESTST.H 9* 10* Modification History: 11* Name Date Description 12* Madhu Katragadda 05/09/2000 Ported Tests for New ResourceBundle API 13* Madhu Katragadda 05/24/2000 Added new tests to test RES_BINARY for collationElements 14************************************************************************************************* 15*/ 16#ifndef _CRESTSTN 17#define _CRESTSTN 18/* C TEST FOR NEW RESOURCEBUNDLE API*/ 19#include "cintltst.h" 20 21/* 22 * Test wrapper for ures_getStringXYZ(), for testing other variants of 23 * these functions as well. 24 * If index>=0, calls ures_getStringByIndex(). 25 * If key!=NULL, calls ures_getStringByKey(). 26 */ 27extern const UChar * 28tres_getString(const UResourceBundle *resB, 29 int32_t index, const char *key, 30 int32_t *length, 31 UErrorCode *status); 32 33void addNEWResourceBundleTest(TestNode**); 34 35/** 36*Perform several extensive tests using the subtest routine testTag 37*/ 38static void TestResourceBundles(void); 39/** 40* Test construction of ResourceBundle accessing a custom test resource-file 41**/ 42static void TestConstruction1(void); 43 44static void TestAliasConflict(void); 45 46static void TestFallback(void); 47 48static void TestBinaryCollationData(void); 49 50static void TestNewTypes(void); 51 52static void TestEmptyTypes(void); 53 54static void TestAPI(void); 55 56static void TestErrorConditions(void); 57 58static void TestGetVersion(void); 59 60static void TestGetVersionColl(void); 61 62static void TestEmptyBundle(void); 63 64static void TestDirectAccess(void); 65 66static void TestResourceLevelAliasing(void); 67 68static void TestErrorCodes(void); 69 70static void TestJB3763(void); 71 72static void TestXPath(void); 73 74static void TestStackReuse(void); 75 76/** 77* extensive subtests called by TestResourceBundles 78**/ 79static UBool testTag(const char* frag, UBool in_Root, UBool in_te, UBool in_te_IN); 80 81static void record_pass(void); 82static void record_fail(void); 83 84 85#endif 86