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 RESOURCEBUNDLETEST_H 8ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#define 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 ResourceBundleTest: public IntlTest { 16ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Querupublic: 17ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru ResourceBundleTest(); 18ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru virtual ~ResourceBundleTest(); 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 TestExemplar(void); 32ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 33ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru void TestGetSize(void); 34ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru void TestGetLocaleByType(void); 35ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 36ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queruprivate: 37ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru /** 38ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * The assignment operator has no real implementation. 39ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * It is provided to make the compiler happy. Do not call. 40ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru */ 41ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru ResourceBundleTest& operator=(const ResourceBundleTest&) { return *this; } 42ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 43ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru /** 44ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * extensive subtests called by TestResourceBundles 45ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru **/ 46ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru UBool testTag(const char* frag, UBool in_Root, UBool in_te, UBool in_te_IN); 47ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 48ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru void record_pass(UnicodeString passMessage); 49ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru void record_fail(UnicodeString errMessage); 50ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 51ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru int32_t pass; 52ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru int32_t fail; 53ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru}; 54ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 55ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#endif 56