• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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-2003, International Business Machines Corporation and
6  * others. All Rights Reserved.
7  ********************************************************************/
8 
9 #ifndef RESOURCEBUNDLETEST_H
10 #define RESOURCEBUNDLETEST_H
11 
12 #include "intltest.h"
13 
14 /**
15  * Tests for class ResourceBundle
16  **/
17 class ResourceBundleTest: public IntlTest {
18 public:
19     ResourceBundleTest();
20     virtual ~ResourceBundleTest();
21 
22     void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = nullptr ) override;
23 
24     /**
25      * Perform several extensive tests using the subtest routine testTag
26      **/
27     void TestResourceBundles();
28     /**
29      * Test construction of ResourceBundle accessing a custom test resource-file
30      **/
31     void TestConstruction();
32 
33     void TestExemplar();
34 
35     void TestGetSize();
36     void TestGetLocaleByType();
37 
38     void TestPersonUnits();
39     void TestZuluFields();
40 
41 private:
42     /**
43      * The assignment operator has no real implementation.
44      * It is provided to make the compiler happy. Do not call.
45      */
46     ResourceBundleTest& operator=(const ResourceBundleTest&) { return *this; }
47 
48     /**
49      * extensive subtests called by TestResourceBundles
50      **/
51     UBool testTag(const char* frag, UBool in_Root, UBool in_te, UBool in_te_IN);
52 
53     void record_pass(UnicodeString passMessage);
54     void record_fail(UnicodeString errMessage);
55 
56     int32_t pass;
57     int32_t fail;
58 };
59 
60 #endif
61