1 /******************************************************************** 2 * COPYRIGHT: 3 * Copyright (c) 1997-2013, 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 */ 27 extern const UChar * 28 tres_getString(const UResourceBundle *resB, 29 int32_t index, const char *key, 30 int32_t *length, 31 UErrorCode *status); 32 33 void addNEWResourceBundleTest(TestNode**); 34 35 /** 36 *Perform several extensive tests using the subtest routine testTag 37 */ 38 static void TestResourceBundles(void); 39 /** 40 * Test construction of ResourceBundle accessing a custom test resource-file 41 **/ 42 static void TestConstruction1(void); 43 44 static void TestAliasConflict(void); 45 46 static void TestFallback(void); 47 48 static void TestPreventFallback(void); 49 50 static void TestBinaryCollationData(void); 51 52 static void TestNewTypes(void); 53 54 static void TestEmptyTypes(void); 55 56 static void TestAPI(void); 57 58 static void TestErrorConditions(void); 59 60 static void TestGetVersion(void); 61 62 static void TestGetVersionColl(void); 63 64 static void TestEmptyBundle(void); 65 66 static void TestDirectAccess(void); 67 68 static void TestTicket9804(void); 69 70 static void TestResourceLevelAliasing(void); 71 72 static void TestErrorCodes(void); 73 74 static void TestJB3763(void); 75 76 static void TestXPath(void); 77 78 static void TestStackReuse(void); 79 80 /** 81 * extensive subtests called by TestResourceBundles 82 **/ 83 static UBool testTag(const char* frag, UBool in_Root, UBool in_te, UBool in_te_IN); 84 85 static void record_pass(void); 86 static void record_fail(void); 87 88 89 #endif 90