scuffed-code/icu4c/source/test/intltest/listformattertest.h
2012-09-12 00:14:25 +00:00

60 lines
1.5 KiB
C++

/*
*******************************************************************************
*
* Copyright (C) 2012, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
* file name: listformattertest.cpp
* encoding: US-ASCII
* tab size: 8 (not used)
* indentation:4
*
* created on: 2012aug27
* created by: Umesh P. Nair
*/
#ifndef __LISTFORMATTERTEST_H__
#define __LISTFORMATTERTEST_H__
#include "unicode/listformatter.h"
#include "intltest.h"
class ListFormatterTest : public IntlTest {
public:
ListFormatterTest();
virtual ~ListFormatterTest() {}
void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=0);
void TestLocaleFallback();
void TestRoot();
void TestBogus();
void TestEnglish();
void TestEnglishUS();
void TestRussian();
void TestMalayalam();
void TestZulu();
void TestOutOfOrderPatterns();
private:
void CheckFormatting(const ListFormatter* formatter, UnicodeString data[], int32_t data_size, const UnicodeString& expected_result);
void CheckFourCases(
const char* locale_string,
UnicodeString one,
UnicodeString two,
UnicodeString three,
UnicodeString four,
UnicodeString results[4]);
private:
// Reused test data.
const UnicodeString prefix;
const UnicodeString one;
const UnicodeString two;
const UnicodeString three;
const UnicodeString four;
};
#endif