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-2001, International Business Machines Corporation and
6  * others. All Rights Reserved.
7  ********************************************************************/
8 /********************************************************************************
9 *
10 * File CFORMTST.H
11 *
12 * Modification History:
13 *        Name                     Description
14 *     Madhu Katragadda               Creation
15 *********************************************************************************
16 */
17 /* FormatTest is a medium top level test for everything in the  C FORMAT API */
18 
19 #ifndef _CFORMATTST
20 #define _CFORMATTST
21 
22 #include "unicode/utypes.h"
23 
24 #if !UCONFIG_NO_FORMATTING
25 
26 #include "cintltst.h"
27 #include "unicode/udat.h"
28 #include "unicode/uformattedvalue.h"
29 
30 
31 /* Internal function used by all the test format files */
32 UChar* myDateFormat(UDateFormat *dat, UDate d);
33 
34 
35 typedef struct UFieldPositionWithCategory {
36     UFieldCategory category;
37     int32_t field;
38     int32_t beginIndex;
39     int32_t endIndex;
40 } UFieldPositionWithCategory;
41 
42 // The following are implemented in uformattedvaluetest.c
43 void checkFormattedValue(
44     const char* message,
45     const UFormattedValue* fv,
46     const UChar* expectedString,
47     UFieldCategory expectedCategory,
48     const UFieldPosition* expectedFieldPositions,
49     int32_t expectedFieldPositionsLength);
50 
51 void checkMixedFormattedValue(
52     const char* message,
53     const UFormattedValue* fv,
54     const UChar* expectedString,
55     const UFieldPositionWithCategory* expectedFieldPositions,
56     int32_t length);
57 
58 
59 #endif /* #if !UCONFIG_NO_FORMATTING */
60 
61 #endif
62