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