1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 /********************************************************************
5 * Copyright (c) 2008-2016 International Business Machines Corporation and
6 * others. All Rights Reserved.
7 ********************************************************************/
9 #ifndef _INTLTESTDATEINTERVALFORMAT
10 #define _INTLTESTDATEINTERVALFORMAT
12 #include "unicode/utypes.h"
13 #include "unicode/locid.h"
15 #if !UCONFIG_NO_FORMATTING
21 * Test basic functionality of various API functions
23 class DateIntervalFormatTest
: public IntlTestWithFieldPosition
{
24 void runIndexedTest( int32_t index
, UBool exec
, const char* &name
, char* par
= NULL
);
28 * Performs tests on many API functions, see detailed comments in source code
38 * Test formatting using user defined DateIntervalInfo
40 void testFormatUserDII();
43 * Test for no unwanted side effects when setting
46 void testSetIntervalPatternNoSideEffect();
49 * Tests different year formats.
51 void testYearFormats();
54 * Stress test -- stress test formatting on 40 locales
58 void testTicket11583_2();
60 void testTicket11985();
62 void testTicket11669();
63 void threadFunc11669(int32_t threadNum
);
65 void testTicket12065();
67 void testFormattedDateInterval();
68 void testCreateInstanceForAllLocales();
72 * Test formatting against expected result
74 void expect(const char** data
, int32_t data_length
);
77 * Test formatting against expected result using user defined
80 void expectUserDII(const char** data
, int32_t data_length
);
83 * Stress test formatting
85 void stress(const char** data
, int32_t data_length
, const Locale
& loc
,
89 #endif /* #if !UCONFIG_NO_FORMATTING */