1ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru/******************************************************************** 2ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * COPYRIGHT: 3ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * Copyright (c) 1997-2003, International Business Machines Corporation and 4ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * others. All Rights Reserved. 5ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru ********************************************************************/ 6ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 7ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#ifndef NEW_RESOURCEBUNDLETEST_H 8ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#define NEW_RESOURCEBUNDLETEST_H 9ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 10ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#include "intltest.h" 11ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 12ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru/** 13ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * Tests for class ResourceBundle 14ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru **/ 15ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queruclass NewResourceBundleTest: public IntlTest { 16ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Querupublic: 17ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru NewResourceBundleTest(); 18ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru virtual ~NewResourceBundleTest(); 19ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 20ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ); 21ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 22ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru /** 23ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * Perform several extensive tests using the subtest routine testTag 24ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru **/ 25ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru void TestResourceBundles(void); 26ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru /** 27ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * Test construction of ResourceBundle accessing a custom test resource-file 28ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru **/ 29ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru void TestConstruction(void); 30ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 31ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru void TestIteration(void); 32ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 33ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru void TestOtherAPI(void); 34ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 35ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru void TestNewTypes(void); 36ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 37ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru void TestGetByFallback(void); 38ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 39ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queruprivate: 40ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru /** 41ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * The assignment operator has no real implementation. 42ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * It is provided to make the compiler happy. Do not call. 43ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru */ 44ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru NewResourceBundleTest& operator=(const NewResourceBundleTest&) { return *this; } 45ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 46ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru /** 47ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * extensive subtests called by TestResourceBundles 48ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru **/ 49ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru UBool testTag(const char* frag, UBool in_Root, UBool in_te, UBool in_te_IN); 50ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 51ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru void record_pass(void); 52ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru void record_fail(void); 53ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 54ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru int32_t pass; 55ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru int32_t fail; 56ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 57ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru}; 58ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 59ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#endif 60