Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Side by Side Diff: source/test/intltest/tsnmfmt.h

Issue 2435373002: Delete source/test (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « source/test/intltest/tsmthred.cpp ('k') | source/test/intltest/tsnmfmt.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /********************************************************************
2 * COPYRIGHT:
3 * Copyright (c) 1997-2003, International Business Machines Corporation and
4 * others. All Rights Reserved.
5 ********************************************************************/
6
7 #ifndef _INTLTESTNUMBERFORMAT
8 #define _INTLTESTNUMBERFORMAT
9
10
11 #include "unicode/utypes.h"
12
13 #if !UCONFIG_NO_FORMATTING
14
15 #include "unicode/numfmt.h"
16 #include "unicode/locid.h"
17 #include "intltest.h"
18
19
20 /**
21 * This test does round-trip testing (format -> parse -> format -> parse -> etc. ) of
22 * NumberFormat.
23 */
24 class IntlTestNumberFormat: public IntlTest {
25 void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
26
27 private:
28
29 /**
30 * call tryIt with many variations, called by testLocale
31 **/
32 void testFormat(/* char* par */);
33 /**
34 * perform tests using aNumber and fFormat, called in many variations
35 **/
36 void tryIt(double aNumber);
37 /**
38 * perform tests using aNumber and fFormat, called in many variations
39 **/
40 void tryIt(int32_t aNumber);
41 /**
42 * test NumberFormat::getAvailableLocales
43 **/
44 void testAvailableLocales(/* char* par */);
45 /**
46 * call testLocale for all locales
47 **/
48 void monsterTest(/* char *par */);
49 /**
50 * call testFormat for currency, percent and plain number instances
51 **/
52 void testLocale(/* char *par, */const Locale& locale, const UnicodeString& l ocaleName);
53
54 NumberFormat* fFormat;
55 UErrorCode fStatus;
56 Locale fLocale;
57
58 public:
59
60 virtual ~IntlTestNumberFormat();
61
62 /*
63 * Return a random double that isn't too large.
64 */
65 static double getSafeDouble(double smallerThanMax);
66
67 /*
68 * Return a random double
69 **/
70 static double randDouble();
71
72 /*
73 * Return a random uint32_t
74 **/
75 static uint32_t randLong();
76
77 /**
78 * Return a random double 0 <= x < 1.0
79 **/
80 static double randFraction()
81 {
82 return (double)randLong() / (double)0xFFFFFFFF;
83 }
84
85 };
86
87 #endif /* #if !UCONFIG_NO_FORMATTING */
88
89 #endif
OLDNEW
« no previous file with comments | « source/test/intltest/tsmthred.cpp ('k') | source/test/intltest/tsnmfmt.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698