Home | History | Annotate | Download | only in cintltst
      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  */
     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 TestBinaryCollationData(void);
     49 
     50 static void TestNewTypes(void);
     51 
     52 static void TestEmptyTypes(void);
     53 
     54 static void TestAPI(void);
     55 
     56 static void TestErrorConditions(void);
     57 
     58 static void TestGetVersion(void);
     59 
     60 static void TestGetVersionColl(void);
     61 
     62 static void TestEmptyBundle(void);
     63 
     64 static void TestDirectAccess(void);
     65 
     66 static void TestResourceLevelAliasing(void);
     67 
     68 static void TestErrorCodes(void);
     69 
     70 static void TestJB3763(void);
     71 
     72 static void TestXPath(void);
     73 
     74 static void TestStackReuse(void);
     75 
     76 /**
     77 * extensive subtests called by TestResourceBundles
     78 **/
     79 static UBool testTag(const char* frag, UBool in_Root, UBool in_te, UBool in_te_IN);
     80 
     81 static void record_pass(void);
     82 static void record_fail(void);
     83 
     84 
     85 #endif
     86