1 // Copyright (C) 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 /********************************************************************
5 * Copyright (c) 1997-2003, International Business Machines Corporation and
6 * others. All Rights Reserved.
7 ********************************************************************/
9 #ifndef _INTLTESTDATEFORMAT
10 #define _INTLTESTDATEFORMAT
12 #include "unicode/utypes.h"
14 #if !UCONFIG_NO_FORMATTING
16 #include "unicode/unistr.h"
17 #include "unicode/datefmt.h"
21 * Performs some tests in many variations on DateFormat
23 class IntlTestDateFormat: public IntlTest {
24 void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
29 * test DateFormat::getAvailableLocales
31 void testAvailableLocales(/* char* par */);
33 * call testLocale for all locales
35 void monsterTest(/* char *par */);
38 * call tryDate with variations, called by testLocale
40 void testFormat(/* char* par */);
42 * perform tests using date and fFormat, called in many variations
44 void tryDate(UDate date);
46 * call testFormat for different DateFormat::EStyle's, etc
48 void testLocale(/*char *par, */const Locale&, const UnicodeString&);
50 * return a random number
52 double randDouble(void);
54 * generate description for verbose test output
56 void describeTest(void);
59 UnicodeString fTestName;
60 int32_t fLimit; // How many iterations it should take to reach convergence
64 // Values in milliseconds (== Date)
66 ONEMINUTE = 60 * ONESECOND,
67 ONEHOUR = 60 * ONEMINUTE,
70 static const double ONEYEAR;
79 virtual ~IntlTestDateFormat();
82 #endif /* #if !UCONFIG_NO_FORMATTING */