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