void TestULocale();
void TestUResourceBundle();
void TestDisplayName();
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
LocaleAliasTest();
virtual ~LocaleAliasTest();
private:
CollationDummyTest();
virtual ~CollationDummyTest();
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par = NULL */);
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par = NULL */) override;
// perform test with strength PRIMARY
void TestPrimary(/* char* par */);
AlphabeticIndexTest();
virtual ~AlphabeticIndexTest();
- virtual void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par = NULL );
+ virtual void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
virtual void APITest();
virtual void ManyLocalesTest();
class TestCollator : public Collator
{
public:
- virtual TestCollator* clone() const;
+ virtual TestCollator* clone() const override;
using Collator::compare;
virtual UCollationResult compare(const UnicodeString& source,
const UnicodeString& target,
- UErrorCode& status) const;
+ UErrorCode& status) const override;
virtual UCollationResult compare(const UnicodeString& source,
const UnicodeString& target,
int32_t length,
- UErrorCode& status) const;
+ UErrorCode& status) const override;
virtual UCollationResult compare(const UChar* source,
int32_t sourceLength,
const UChar* target,
int32_t targetLength,
- UErrorCode& status) const;
+ UErrorCode& status) const override;
virtual CollationKey& getCollationKey(const UnicodeString& source,
CollationKey& key,
- UErrorCode& status) const;
+ UErrorCode& status) const override;
virtual CollationKey& getCollationKey(const UChar*source,
int32_t sourceLength,
CollationKey& key,
- UErrorCode& status) const;
- virtual int32_t hashCode(void) const;
- virtual Locale getLocale(ULocDataLocaleType type, UErrorCode& status) const;
- virtual ECollationStrength getStrength(void) const;
- virtual void setStrength(ECollationStrength newStrength);
- virtual UClassID getDynamicClassID(void) const;
- virtual void getVersion(UVersionInfo info) const;
+ UErrorCode& status) const override;
+ virtual int32_t hashCode(void) const override;
+ virtual Locale getLocale(ULocDataLocaleType type, UErrorCode& status) const override;
+ virtual ECollationStrength getStrength(void) const override;
+ virtual void setStrength(ECollationStrength newStrength) override;
+ virtual UClassID getDynamicClassID(void) const override;
+ virtual void getVersion(UVersionInfo info) const override;
virtual void setAttribute(UColAttribute attr, UColAttributeValue value,
- UErrorCode &status);
+ UErrorCode &status) override;
virtual UColAttributeValue getAttribute(UColAttribute attr,
- UErrorCode &status) const;
+ UErrorCode &status) const override;
virtual uint32_t setVariableTop(const UChar *varTop, int32_t len,
- UErrorCode &status);
+ UErrorCode &status) override;
virtual uint32_t setVariableTop(const UnicodeString &varTop,
- UErrorCode &status);
- virtual void setVariableTop(uint32_t varTop, UErrorCode &status);
- virtual uint32_t getVariableTop(UErrorCode &status) const;
+ UErrorCode &status) override;
+ virtual void setVariableTop(uint32_t varTop, UErrorCode &status) override;
+ virtual uint32_t getVariableTop(UErrorCode &status) const override;
virtual int32_t getSortKey(const UnicodeString& source,
uint8_t* result,
- int32_t resultLength) const;
+ int32_t resultLength) const override;
virtual int32_t getSortKey(const UChar*source, int32_t sourceLength,
- uint8_t*result, int32_t resultLength) const;
- virtual UnicodeSet *getTailoredSet(UErrorCode &status) const;
- virtual bool operator==(const Collator& other) const;
+ uint8_t*result, int32_t resultLength) const override;
+ virtual UnicodeSet *getTailoredSet(UErrorCode &status) const override;
+ virtual bool operator==(const Collator& other) const override;
// Collator::operator!= calls !Collator::operator== which works for all subclasses.
- virtual void setLocales(const Locale& requestedLocale, const Locale& validLocale, const Locale& actualLocale);
+ virtual void setLocales(const Locale& requestedLocale, const Locale& validLocale, const Locale& actualLocale) override;
TestCollator() : Collator() {}
TestCollator(UCollationStrength collationStrength,
UNormalizationMode decompositionMode) : Collator(collationStrength, decompositionMode) {}
class CollationAPITest: public IntlTestCollator {
public:
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par = NULL */);
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par = NULL */) override;
void doAssert(UBool condition, const char *message);
/**
class AstroTest: public CalendarTimeZoneTest {
public:
// IntlTest override
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) override;
public:
AstroTest();
directionBits(0), lineNumber(0), levelsCount(0), orderingCount(0),
errorCount(0) {}
- void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=NULL);
+ void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=NULL) override;
void TestBidiTest();
void TestBidiCharacterTest();
BytesTrieTest();
virtual ~BytesTrieTest();
- void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=NULL);
+ void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=NULL) override;
void TestBuilder();
void TestEmpty();
void Test_a();
class CalendarCaseTest: public CalendarTest {
public:
- virtual void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par );
+ virtual void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) override;
/* Test case struct */
struct TestCase {
*/
class CalendarLimitTest: public CalendarTimeZoneTest {
// IntlTest override
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) override;
public: // package
//test routine used by TestCalendarLimit
virtual void test(UDate millis, Calendar *cal, DateFormat *fmt);
class CalendarRegressionTest: public IntlTest {
// IntlTest override
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) override;
public:
void test4100311(void);
void test4074758(void);
class CalendarTest: public CalendarTimeZoneTest {
public:
// IntlTest override
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) override;
public:
/**
* This test confirms the correct behavior of add when incrementing
CanonicalIteratorTest();
virtual ~CanonicalIteratorTest();
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
void TestCanonicalIterator(void);
void TestExhaustive(void);
text = newText;
}
- virtual void getText(UnicodeString& result) {
+ virtual void getText(UnicodeString& result) override {
text.extract(0,text.length(),result);
}
static UClassID getStaticClassID(void){
return (UClassID)(&fgClassID);
}
- virtual UClassID getDynamicClassID(void) const{
+ virtual UClassID getDynamicClassID(void) const override {
return getStaticClassID();
}
- virtual bool operator==(const ForwardCharacterIterator& /*that*/) const{
+ virtual bool operator==(const ForwardCharacterIterator& /*that*/) const override {
return true;
}
- virtual SCharacterIterator* clone(void) const {
+ virtual SCharacterIterator* clone(void) const override {
return NULL;
}
- virtual int32_t hashCode(void) const{
+ virtual int32_t hashCode(void) const override {
return DONE;
}
- virtual UChar nextPostInc(void){ return text.charAt(pos++);}
- virtual UChar32 next32PostInc(void){return text.char32At(pos++);}
- virtual UBool hasNext() { return TRUE;}
- virtual UChar first(){return DONE;}
- virtual UChar32 first32(){return DONE;}
- virtual UChar last(){return DONE;}
- virtual UChar32 last32(){return DONE;}
- virtual UChar setIndex(int32_t /*pos*/){return DONE;}
- virtual UChar32 setIndex32(int32_t /*pos*/){return DONE;}
- virtual UChar current() const{return DONE;}
- virtual UChar32 current32() const{return DONE;}
- virtual UChar next(){return DONE;}
- virtual UChar32 next32(){return DONE;}
- virtual UChar previous(){return DONE;}
- virtual UChar32 previous32(){return DONE;}
- virtual int32_t move(int32_t delta,CharacterIterator::EOrigin origin){
+ virtual UChar nextPostInc(void) override { return text.charAt(pos++);}
+ virtual UChar32 next32PostInc(void) override {return text.char32At(pos++);}
+ virtual UBool hasNext() override { return TRUE;}
+ virtual UChar first() override {return DONE;}
+ virtual UChar32 first32() override {return DONE;}
+ virtual UChar last() override {return DONE;}
+ virtual UChar32 last32() override {return DONE;}
+ virtual UChar setIndex(int32_t /*pos*/) override {return DONE;}
+ virtual UChar32 setIndex32(int32_t /*pos*/) override {return DONE;}
+ virtual UChar current() const override {return DONE;}
+ virtual UChar32 current32() const override {return DONE;}
+ virtual UChar next() override {return DONE;}
+ virtual UChar32 next32() override {return DONE;}
+ virtual UChar previous() override {return DONE;}
+ virtual UChar32 previous32() override {return DONE;}
+ virtual int32_t move(int32_t delta,CharacterIterator::EOrigin origin) override {
switch(origin) {
case kStart:
pos = begin + delta;
return pos;
}
- virtual int32_t move32(int32_t delta, CharacterIterator::EOrigin origin){
+ virtual int32_t move32(int32_t delta, CharacterIterator::EOrigin origin) override {
switch(origin) {
case kStart:
pos = begin;
return pos;
}
- virtual UBool hasPrevious() {return TRUE;}
+ virtual UBool hasPrevious() override {return TRUE;}
SCharacterIterator& operator=(const SCharacterIterator& that){
text = that.text;
}
// useful stuff, mostly dummy but testing coverage and subclassability
- virtual UChar nextPostInc() {
+ virtual UChar nextPostInc() override {
if(pos<UPRV_LENGTHOF(s)) {
return s[pos++];
} else {
}
}
- virtual UChar32 next32PostInc() {
+ virtual UChar32 next32PostInc() override {
if(pos<UPRV_LENGTHOF(s)) {
UChar32 c;
U16_NEXT(s, pos, UPRV_LENGTHOF(s), c);
}
}
- virtual UBool hasNext() {
+ virtual UBool hasNext() override {
return pos<UPRV_LENGTHOF(s);
}
- virtual UChar first() {
+ virtual UChar first() override {
pos=0;
return s[0];
}
- virtual UChar32 first32() {
+ virtual UChar32 first32() override {
UChar32 c;
pos=0;
U16_NEXT(s, pos, UPRV_LENGTHOF(s), c);
return c;
}
- virtual UChar setIndex(int32_t position) {
+ virtual UChar setIndex(int32_t position) override {
if(0<=position && position<=UPRV_LENGTHOF(s)) {
pos=position;
if(pos<UPRV_LENGTHOF(s)) {
return DONE;
}
- virtual UChar32 setIndex32(int32_t position) {
+ virtual UChar32 setIndex32(int32_t position) override {
if(0<=position && position<=UPRV_LENGTHOF(s)) {
pos=position;
if(pos<UPRV_LENGTHOF(s)) {
return DONE;
}
- virtual UChar current() const {
+ virtual UChar current() const override {
if(pos<UPRV_LENGTHOF(s)) {
return s[pos];
} else {
}
}
- virtual UChar32 current32() const {
+ virtual UChar32 current32() const override {
if(pos<UPRV_LENGTHOF(s)) {
UChar32 c;
U16_GET(s, 0, pos, UPRV_LENGTHOF(s), c);
}
}
- virtual UChar next() {
+ virtual UChar next() override {
if(pos<UPRV_LENGTHOF(s) && ++pos<UPRV_LENGTHOF(s)) {
return s[pos];
} else {
}
}
- virtual UChar32 next32() {
+ virtual UChar32 next32() override {
if(pos<UPRV_LENGTHOF(s)) {
U16_FWD_1(s, pos, UPRV_LENGTHOF(s));
}
}
}
- virtual UBool hasPrevious() {
+ virtual UBool hasPrevious() override {
return pos>0;
}
- virtual void getText(UnicodeString &result) {
+ virtual void getText(UnicodeString &result) override {
result.setTo(s, UPRV_LENGTHOF(s));
}
// dummy implementations of other pure virtual base class functions
- virtual bool operator==(const ForwardCharacterIterator &that) const {
+ virtual bool operator==(const ForwardCharacterIterator &that) const override {
return
this==&that ||
(typeid(*this)==typeid(that) && pos==((SubCharIter &)that).pos);
}
- virtual int32_t hashCode() const {
+ virtual int32_t hashCode() const override {
return 2;
}
- virtual CharacterIterator *clone() const {
+ virtual CharacterIterator *clone() const override {
return NULL;
}
- virtual UChar last() {
+ virtual UChar last() override {
return 0;
}
- virtual UChar32 last32() {
+ virtual UChar32 last32() override {
return 0;
}
- virtual UChar previous() {
+ virtual UChar previous() override {
return 0;
}
- virtual UChar32 previous32() {
+ virtual UChar32 previous32() override {
return 0;
}
- virtual int32_t move(int32_t /*delta*/, EOrigin /*origin*/) {
+ virtual int32_t move(int32_t /*delta*/, EOrigin /*origin*/) override {
return 0;
}
- virtual int32_t move32(int32_t /*delta*/, EOrigin /*origin*/) {
+ virtual int32_t move32(int32_t /*delta*/, EOrigin /*origin*/) override {
return 0;
}
return (UClassID)(&fgClassID);
}
- virtual UClassID getDynamicClassID() const {
+ virtual UClassID getDynamicClassID() const override {
return getStaticClassID();
}
public:
CharIterTest();
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
/**
* Test Constructors and operators ==, != and a few other methods
delete coll;
}
- void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=NULL);
+ void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=NULL) override;
void TestMinMax();
void TestImplicits();
CompactDecimalFormatTest() {
}
- void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=0);
+ void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=0) override;
private:
void TestEnglishShort();
void TestSerbianShort();
ConversionTest();
virtual ~ConversionTest();
- void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=0);
+ void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=0) override;
void TestToUnicode();
void TestFromUnicode();
*/
class CompoundTransliteratorTest : public IntlTest {
public:
- void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par=NULL);
+ void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par=NULL) override;
/*Tests the constructors */
void TestConstruction(void);
CharsetDetectionTest();
virtual ~CharsetDetectionTest();
- virtual void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par = NULL );
+ virtual void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
virtual void ConstructionTest();
virtual void UTF8Test();
CollationCurrencyTest();
virtual ~CollationCurrencyTest();
- void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par = NULL);
+ void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par = NULL) override;
void currencyTest(/*char *par*/);
};
class DataDrivenCalendarTest : public IntlTest {
void runIndexedTest(int32_t index, UBool exec, const char* &name,
- char* par = NULL);
+ char* par = NULL) override;
public:
DataDrivenCalendarTest();
virtual ~DataDrivenCalendarTest();
class DataDrivenFormatTest : public IntlTest {
void runIndexedTest(int32_t index, UBool exec, const char* &name,
- char* par = NULL);
+ char* par = NULL) override;
public:
DataDrivenFormatTest();
virtual ~DataDrivenFormatTest();
class IntlTestDecimalFormatAPI: public IntlTest {
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
public:
/**
DecimalFormatTest();
virtual ~DecimalFormatTest();
- virtual void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par = NULL );
+ virtual void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
// The following are test functions that are visible from the intltest test framework.
virtual void DataDrivenTests();
CollationGermanTest();
virtual ~CollationGermanTest();
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
// perform test with strength PRIMARY
void TestPrimary(/* char* par */);
* verifies that it works on a basic level.
*/
class IntlTestDateFormatAPI: public IntlTest {
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
private:
/**
**/
class DateFormatRegressionTest: public CalendarTimeZoneTest {
// IntlTest override
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) override;
public:
void Test4029195(void);
class DateFormatRoundTripTest : public IntlTest {
// IntlTest override
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) override;
public:
DateFormatRoundTripTest();
**/
class DateFormatTest: public CalendarTimeZoneTest {
// IntlTest override
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) override;
public:
/**
* Verify that patterns have the correct values and could produce
* Test basic functionality of various API functions
**/
class DateIntervalFormatTest: public IntlTestWithFieldPosition {
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
public:
/**
* Test basic functionality of various API functions
**/
class IntlTestDateTimePatternGeneratorAPI : public IntlTest {
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
private:
/**
CollationEnglishTest();
virtual ~CollationEnglishTest();
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
// performs test with strength PRIMARY
void TestPrimary(/* char* par */);
class EraRulesTest : public IntlTest {
public:
- void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par = NULL);
+ void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par = NULL) override;
private:
void testAPIs();
CollationSpanishTest();
virtual ~CollationSpanishTest();
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
// performs tests with strength PRIMARY
void TestPrimary(/* char* par */);
CollationFinnishTest();
virtual ~CollationFinnishTest();
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
// perform tests with strength PRIMARY
void TestPrimary(/* char* par */);
void handleParseValue(const FieldsSet* inheritFrom,
int32_t field,
const U_NAMESPACE_QUALIFIER UnicodeString& substr,
- UErrorCode& status);
+ UErrorCode& status) override;
};
/**
void handleParseValue(const FieldsSet* inheritFrom,
int32_t field,
const U_NAMESPACE_QUALIFIER UnicodeString& substr,
- UErrorCode& status);
+ UErrorCode& status) override;
int32_t handleParseName(const FieldsSet* inheritFrom,
const U_NAMESPACE_QUALIFIER UnicodeString& name,
const U_NAMESPACE_QUALIFIER UnicodeString& substr,
- UErrorCode& status);
+ UErrorCode& status) override;
};
void testUnlimitedCapacity();
void testCodePoints();
- void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par = 0);
+ void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par = 0) override;
private:
void assertEqualsImpl(const UnicodeString &a, const FormattedStringBuilder &b);
class FormattedValueTest : public IntlTest {
public:
- void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=0);
+ void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=0) override;
private:
void testBasic();
void testSetters();
CollationFrenchTest();
virtual ~CollationFrenchTest();
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
// perform tests with strength SECONDARY
void TestSecondary(/* char* par */);
G7CollationTest() {}
virtual ~G7CollationTest();
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
// perform test for G7 locales
GenderInfoTest() {
}
- void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=0);
+ void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=0) override;
private:
void TestGetListGender();
void TestFallback();
class ICUNSubclass : public ICUNotifier {
public:
- UBool acceptsListener(const EventListener& /*l*/) const {
+ UBool acceptsListener(const EventListener& /*l*/) const override {
return TRUE;
// return l instanceof MyListener;
}
- virtual void notifyListener(EventListener& /*l*/) const {
+ virtual void notifyListener(EventListener& /*l*/) const override {
}
};
}
protected:
- virtual const Hashtable* getSupportedIDs(UErrorCode &/*status*/) const {
+ virtual const Hashtable* getSupportedIDs(UErrorCode &/*status*/) const override {
return &table;
}
};
return (UClassID)&fgClassID;
}
- virtual UClassID getDynamicClassID() const {
+ virtual UClassID getDynamicClassID() const override {
return getStaticClassID();
}
// use locale keys
class TestIntegerService : public ICUService {
public:
- ICUServiceKey* createKey(const UnicodeString* id, UErrorCode& status) const {
+ ICUServiceKey* createKey(const UnicodeString* id, UErrorCode& status) const override {
return LocaleKey::createWithCanonicalFallback(id, NULL, status); // no fallback locale
}
- virtual ICUServiceFactory* createSimpleFactory(UObject* obj, const UnicodeString& id, UBool visible, UErrorCode& status)
+ virtual ICUServiceFactory* createSimpleFactory(UObject* obj, const UnicodeString& id, UBool visible, UErrorCode& status) override
{
Integer* i;
if (U_SUCCESS(status) && obj && (i = dynamic_cast<Integer*>(obj)) != NULL) {
return NULL;
}
- virtual UObject* cloneInstance(UObject* instance) const {
+ virtual UObject* cloneInstance(UObject* instance) const override {
return instance ? new Integer(*(Integer*)instance) : NULL;
}
};
class TestStringSimpleKeyService : public ICUService {
public:
- virtual ICUServiceFactory* createSimpleFactory(UObject* obj, const UnicodeString& id, UBool visible, UErrorCode& status)
+ virtual ICUServiceFactory* createSimpleFactory(UObject* obj, const UnicodeString& id, UBool visible, UErrorCode& status) override
{
// We could put this type check into ICUService itself, but we'd still
// have to implement cloneInstance. Otherwise we could just tell the service
return NULL;
}
- virtual UObject* cloneInstance(UObject* instance) const {
+ virtual UObject* cloneInstance(UObject* instance) const override {
return instance ? new UnicodeString(*(UnicodeString*)instance) : NULL;
}
};
class TestStringService : public ICUService {
public:
- ICUServiceKey* createKey(const UnicodeString* id, UErrorCode& status) const {
+ ICUServiceKey* createKey(const UnicodeString* id, UErrorCode& status) const override {
return LocaleKey::createWithCanonicalFallback(id, NULL, status); // no fallback locale
}
- virtual ICUServiceFactory* createSimpleFactory(UObject* obj, const UnicodeString& id, UBool visible, UErrorCode& /* status */)
+ virtual ICUServiceFactory* createSimpleFactory(UObject* obj, const UnicodeString& id, UBool visible, UErrorCode& /* status */) override
{
UnicodeString* s;
if (obj && (s = dynamic_cast<UnicodeString*>(obj)) != NULL) {
return NULL;
}
- virtual UObject* cloneInstance(UObject* instance) const {
+ virtual UObject* cloneInstance(UObject* instance) const override {
return instance ? new UnicodeString(*(UnicodeString*)instance) : NULL;
}
};
class AnonymousStringFactory : public ICUServiceFactory
{
public:
- virtual UObject* create(const ICUServiceKey& key, const ICUService* /* service */, UErrorCode& /* status */) const {
+ virtual UObject* create(const ICUServiceKey& key, const ICUService* /* service */, UErrorCode& /* status */) const override {
return new UnicodeString(key.getID());
}
- virtual void updateVisibleIDs(Hashtable& /*result*/, UErrorCode& /*status*/) const {
+ virtual void updateVisibleIDs(Hashtable& /*result*/, UErrorCode& /*status*/) const override {
// do nothing
}
- virtual UnicodeString& getDisplayName(const UnicodeString& /*id*/, const Locale& /*locale*/, UnicodeString& result) const {
+ virtual UnicodeString& getDisplayName(const UnicodeString& /*id*/, const Locale& /*locale*/, UnicodeString& result) const override {
// do nothing
return result;
}
return (UClassID)&fgClassID;
}
- virtual UClassID getDynamicClassID() const {
+ virtual UClassID getDynamicClassID() const override {
return getStaticClassID();
}
~TestMultipleKeyStringFactory() {
}
- UObject* create(const ICUServiceKey& key, const ICUService* /* service */, UErrorCode& status) const {
+ UObject* create(const ICUServiceKey& key, const ICUService* /* service */, UErrorCode& status) const override {
if (U_FAILURE(status)) {
return NULL;
}
return NULL;
}
- void updateVisibleIDs(Hashtable& result, UErrorCode& status) const {
+ void updateVisibleIDs(Hashtable& result, UErrorCode& status) const override {
if (U_SUCCESS(_status)) {
for (int32_t i = 0; i < _ids.size(); ++i) {
result.put(*(UnicodeString*)_ids[i], (void*)this, status);
}
}
- UnicodeString& getDisplayName(const UnicodeString& id, const Locale& locale, UnicodeString& result) const {
+ UnicodeString& getDisplayName(const UnicodeString& id, const Locale& locale, UnicodeString& result) const override {
if (U_SUCCESS(_status) && _ids.contains((void*)&id)) {
char buffer[128];
UErrorCode status = U_ZERO_ERROR;
return (UClassID)&fgClassID;
}
- virtual UClassID getDynamicClassID() const {
+ virtual UClassID getDynamicClassID() const override {
return getStaticClassID();
}
supportedIDs = NULL;
}
- const Hashtable* getSupportedIDs(UErrorCode& status) const
+ const Hashtable* getSupportedIDs(UErrorCode& status) const override
{
if (supportedIDs == NULL) {
Hashtable* table = new Hashtable();
return supportedIDs;
}
- UnicodeString& getDisplayName(const UnicodeString& id, const Locale& locale, UnicodeString& result) const
+ UnicodeString& getDisplayName(const UnicodeString& id, const Locale& locale, UnicodeString& result) const override
{
UnicodeString prefix = "";
UnicodeString suffix = "";
public:
SimpleListener(ICUServiceTest* test, const UnicodeString& name) : _test(test), _name(name) {}
- virtual void serviceChanged(const ICUService& service) const {
+ virtual void serviceChanged(const ICUService& service) const override {
UnicodeString serviceName = "listener ";
serviceName.append(_name);
serviceName.append(" n++");
class TestStringLocaleService : public ICULocaleService {
public:
- virtual UObject* cloneInstance(UObject* instance) const {
+ virtual UObject* cloneInstance(UObject* instance) const override {
return instance ? new UnicodeString(*(UnicodeString*)instance) : NULL;
}
};
greetingID = NULL;
}
- UObject* create(const ICUServiceKey& key, const ICUService* service, UErrorCode& status) const {
+ UObject* create(const ICUServiceKey& key, const ICUService* service, UErrorCode& status) const override {
if (U_SUCCESS(status)) {
UnicodeString temp;
if (key.currentID(temp).compare(getGreetingID()) == 0) {
return NULL;
}
- void updateVisibleIDs(Hashtable& result, UErrorCode& status) const {
+ void updateVisibleIDs(Hashtable& result, UErrorCode& status) const override {
if (U_SUCCESS(status)) {
result.put("greeting", (void*)this, status);
}
}
- UnicodeString& getDisplayName(const UnicodeString& id, const Locale& /* locale */, UnicodeString& result) const {
+ UnicodeString& getDisplayName(const UnicodeString& id, const Locale& /* locale */, UnicodeString& result) const override {
result.append("wrap '");
result.append(id);
result.append("'");
return (UClassID)&fgClassID;
}
- virtual UClassID getDynamicClassID() const {
+ virtual UClassID getDynamicClassID() const override {
return getStaticClassID();
}
ICUServiceTest();
virtual ~ICUServiceTest();
- void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par = NULL);
+ void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par = NULL) override;
void testAPI_One(void);
void testAPI_Two(void);
class IdnaConfTest: public IntlTest {
public:
- void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par=NULL);
+ void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par=NULL) override;
IdnaConfTest();
virtual ~IdnaConfTest();
private:
class IntlCalendarTest: public CalendarTimeZoneTest {
public:
// IntlTest override
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) override;
public:
void TestTypes(void);
virtual void log( const UnicodeString &message );
- virtual void logln( const UnicodeString &message );
+ virtual void logln( const UnicodeString &message ) override;
virtual void logln( void );
virtual void err( const UnicodeString &message );
- virtual void errln( const UnicodeString &message );
+ virtual void errln( const UnicodeString &message ) override;
virtual void dataerr( const UnicodeString &message );
- virtual void dataerrln( const UnicodeString &message );
+ virtual void dataerrln( const UnicodeString &message ) override;
void errcheckln(UErrorCode status, const UnicodeString &message );
public:
UBool run_phase2( char* name, char* par ); // internally, supports reporting memory leaks
static const char* loadTestData(UErrorCode& err);
- virtual const char* getTestDataPath(UErrorCode& err);
+ virtual const char* getTestDataPath(UErrorCode& err) override;
static const char* getSourceTestData(UErrorCode& err);
static char *getUnidataPath(char path[]);
UChar *ReadAndConvertFile(const char *fileName, int &ulen, const char *encoding, UErrorCode &status);
CollationIteratorTest();
virtual ~CollationIteratorTest();
- void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par = NULL);
+ void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par = NULL) override;
/**
* Test that results from CollationElementIterator.next is equivalent to
class IntlTestFormat: public IntlTest {
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
};
class MajorTestLevel: public IntlTest {
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
};
class IntlTestNormalize: public IntlTest {
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
};
#endif
class IntlTestRBBI: public IntlTest {
public:
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
};
#endif /* #if !UCONFIG_NO_BREAK_ITERATION && !UCONFIG_NO_REGULAR_EXPRESSIONS */
public:
// IntlTest override
- virtual void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par);
+ virtual void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par) override;
#if U_HAVE_RBNF
/**
public:
// IntlTest override
- virtual void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par);
+ virtual void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par) override;
#if U_HAVE_RBNF
/**
class RbnfRoundTripTest : public IntlTest {
// IntlTest override
- virtual void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par);
+ virtual void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par) override;
#if U_HAVE_RBNF
/**
class IntlTestSpoof: public IntlTest {
public:
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
// Test the USpoofDetector API functions that require C++
// The pure C part of the API, which is most of it, is tested in cintltst
class IntlTestTransliterator: public IntlTest {
public:
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
};
#endif /* #if !UCONFIG_NO_TRANSLITERATION */
}
}
private:
- virtual void handleFailure() const {
+ virtual void handleFailure() const override {
++checks;
}
int32_t &checks;
public:
LocalPointerTest() {}
- void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=NULL);
+ void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=NULL) override;
void TestLocalPointer();
void TestLocalPointerMoveSwap();
class EnumSetTest : public IntlTest {
public:
EnumSetTest() {}
- virtual void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=NULL);
+ virtual void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=NULL) override;
void TestEnumSet();
};
class IntlTestUtilities: public IntlTest {
public:
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
};
class ErrorCodeTest: public IntlTest {
public:
- void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par = NULL);
+ void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par = NULL) override;
void TestErrorCode();
void TestSubclass();
void TestIcuTestErrorCode();
CollationKanaTest();
virtual ~CollationKanaTest();
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
// performs test with strength TERIARY
void TestTertiary(/* char* par */);
virtual ~JamoTest();
private:
void runIndexedTest(int32_t index, UBool exec, const char* &name,
- char* par=NULL);
+ char* par=NULL) override;
void TestJamo(void);
// Override TransliteratorTest
virtual void expectAux(const UnicodeString& tag,
const UnicodeString& summary, UBool pass,
- const UnicodeString& expectedResult);
+ const UnicodeString& expectedResult) override;
// Methods to convert Jamo to/from readable short names,
// e.g. (Gi) <> U+1100
LotusCollationKoreanTest();
virtual ~LotusCollationKoreanTest();
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
// performs test with strength TERIARY
void TestTertiary(/* char* par */);
ListFormatterTest();
virtual ~ListFormatterTest() {}
- void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=0);
+ void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=0) override;
void TestRoot();
void TestBogus();
LocaleBuilderTest();
virtual ~LocaleBuilderTest();
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
void TestAddRemoveUnicodeLocaleAttribute(void);
void TestAddRemoveUnicodeLocaleAttributeWellFormed(void);
public:
LocaleMatcherTest() {}
- void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=NULL);
+ void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=NULL) override;
void testEmpty();
void testCopyErrorTo();
LocaleDisplayNamesTest();
virtual ~LocaleDisplayNamesTest();
- void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par = NULL);
+ void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par = NULL) override;
#if !UCONFIG_NO_FORMATTING
/**
LocaleTest();
virtual ~LocaleTest();
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
/**
* Test methods to set and get data fields
LSTMBETest();
virtual ~LSTMBETest();
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
void TestThaiGraphclust();
void TestThaiCodepoints();
MeasureFormatTest() {
}
- void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=0);
+ void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=0) override;
private:
void TestBasic();
void TestCompatible53();
class DateFormatMiscTests : public IntlTest {
// IntlTest override
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) override;
public:
void test4097450(void);
CollationMonkeyTest();
virtual ~CollationMonkeyTest();
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
// utility function used in tests, returns absolute value
int32_t checkValue(int32_t value);
class MessageFormatRegressionTest: public IntlTest {
// IntlTest override
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) override;
public:
void Test4074764(void);
delete currencyStyle;
}
- virtual NumberFormat* createFormat(const Locale& /* loc */, UNumberFormatStyle formatType)
+ virtual NumberFormat* createFormat(const Locale& /* loc */, UNumberFormatStyle formatType) override
{
if (formatType == UNUM_CURRENCY) {
return currencyStyle->clone();
return NULL;
}
- virtual inline UClassID getDynamicClassID() const
+ virtual inline UClassID getDynamicClassID() const override
{
return (UClassID)&gID;
}
* This test executes basic functionality checks of various API functions
**/
class IntlTestNumberFormatAPI: public IntlTest {
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
private:
/**
class NumberFormatRoundTripTest : public IntlTest {
// IntlTest override
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) override;
public:
static UBool verbose;
NormalizerConformanceTest();
virtual ~NormalizerConformanceTest();
- void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par=NULL);
+ void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par=NULL) override;
/**
* Test the conformance of Normalizer to
void testInvalid();
void testUnescapeWithSymbolProvider();
- void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par = 0);
+ void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par = 0) override;
private:
UnicodeString unescapeWithDefaults(const SymbolProvider &defaultProvider, UnicodeString input,
void toDecimalNumber();
void microPropsInternals();
- void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par = 0);
+ void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par = 0) override;
private:
CurrencyUnit USD;
void testScientificAndCompactSuppressedExponent();
void testSuppressedExponentUnchangedByInitialScaling();
- void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par = 0);
+ void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par = 0) override;
private:
void assertDoubleEquals(UnicodeString message, double a, double b);
public:
void testDoubleConversionApi();
- void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par = 0);
+ void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par = 0) override;
};
class ModifiersTest : public IntlTest {
void testSimpleModifier();
void testCurrencySpacingEnabledModifier();
- void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par = 0);
+ void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par = 0) override;
private:
void assertModifierEquals(const Modifier &mod, int32_t expectedPrefixLength, bool expectedStrong,
void testPatternWithNoPlaceholder();
void testMutableEqualsImmutable();
- void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par = 0);
+ void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par = 0) override;
private:
UnicodeString getPrefix(const MutablePatternModifier &mod, UErrorCode &status);
void testExceptionOnInvalid();
void testBug13117();
- void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par = 0);
+ void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par = 0) override;
private:
};
void test20360_BidiOverflow();
void testInfiniteRecursion();
- void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par = 0);
+ void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par = 0) override;
};
class NumberSkeletonTest : public IntlTest {
void perUnitInArabic();
void perUnitToSkeleton();
- void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par = 0);
+ void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par = 0) override;
private:
void expectedErrorSkeleton(const char16_t** cases, int32_t casesLen);
void testGetDecimalNumbers();
void test21358_SignPosition();
- void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par = 0);
+ void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par = 0) override;
private:
CurrencyUnit USD;
public:
void testPermutations();
- void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par = 0);
+ void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par = 0) override;
};
class NumberTest : public IntlTest {
public:
- void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par = 0) {
+ void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par = 0) override {
if (exec) {
logln("TestSuite NumberTest: ");
}
class NumericSymbolProvider : public SymbolProvider {
public:
- virtual UnicodeString getSymbol(AffixPatternType type) const {
+ virtual UnicodeString getSymbol(AffixPatternType type) const override {
return Int64ToUnicodeString(type < 0 ? -type : type);
}
};
void TestPercent();
void TestPerMilli();
void TestPadding();
- void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=0);
+ void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=0) override;
private:
void assertPatternFr(
const char *expected, double x, const char *pattern, UBool possibleDataError=FALSE);
class StubNumberFormat :public NumberFormat{
public:
StubNumberFormat(){}
- virtual UnicodeString& format(double ,UnicodeString& appendTo,FieldPosition& ) const {
+ virtual UnicodeString& format(double ,UnicodeString& appendTo,FieldPosition& ) const override {
return appendTo;
}
- virtual UnicodeString& format(int32_t ,UnicodeString& appendTo,FieldPosition& ) const {
+ virtual UnicodeString& format(int32_t ,UnicodeString& appendTo,FieldPosition& ) const override {
return appendTo.append((UChar)0x0033);
}
- virtual UnicodeString& format(int64_t number,UnicodeString& appendTo,FieldPosition& pos) const {
+ virtual UnicodeString& format(int64_t number,UnicodeString& appendTo,FieldPosition& pos) const override {
return NumberFormat::format(number, appendTo, pos);
}
- virtual UnicodeString& format(const Formattable& , UnicodeString& appendTo, FieldPosition& , UErrorCode& ) const {
+ virtual UnicodeString& format(const Formattable& , UnicodeString& appendTo, FieldPosition& , UErrorCode& ) const override {
return appendTo;
}
virtual void parse(const UnicodeString& ,
Formattable& ,
- ParsePosition& ) const {}
+ ParsePosition& ) const override {}
virtual void parse( const UnicodeString& ,
Formattable& ,
- UErrorCode& ) const {}
- virtual UClassID getDynamicClassID(void) const {
+ UErrorCode& ) const override {}
+ virtual UClassID getDynamicClassID(void) const override {
static char classID = 0;
return (UClassID)&classID;
}
- virtual StubNumberFormat* clone() const {return NULL;}
+ virtual StubNumberFormat* clone() const override {return NULL;}
};
void
*/
class NumberFormatDataDrivenTest : public DataDrivenNumberFormatTestSuite {
public:
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) override;
void TestNumberFormatTestTuple();
void TestDataDrivenICU4C();
UBool isFormatPass(
const NumberFormatTestTuple &tuple,
UnicodeString &appendErrorMessage,
- UErrorCode &status);
+ UErrorCode &status) override;
UBool isToPatternPass(
const NumberFormatTestTuple &tuple,
UnicodeString &appendErrorMessage,
- UErrorCode &status);
+ UErrorCode &status) override;
UBool isParsePass(
const NumberFormatTestTuple &tuple,
UnicodeString &appendErrorMessage,
- UErrorCode &status);
+ UErrorCode &status) override;
UBool isParseCurrencyPass(
const NumberFormatTestTuple &tuple,
UnicodeString &appendErrorMessage,
- UErrorCode &status);
+ UErrorCode &status) override;
};
/**
class NumberFormatTest: public CalendarTimeZoneTest {
// IntlTest override
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) override;
public:
/**
{
public:
- virtual UClassID getDynamicClassID(void) const;
+ virtual UClassID getDynamicClassID(void) const override;
virtual UnicodeString& format( double number,
UnicodeString& toAppendTo,
FieldPositionIterator* posIter,
- UErrorCode& status) const
+ UErrorCode& status) const override
{
return NumberFormat::format(number, toAppendTo, posIter, status);
}
virtual UnicodeString& format(const Formattable& obj,
UnicodeString& toAppendTo,
FieldPosition& pos,
- UErrorCode& status) const
+ UErrorCode& status) const override
{
return NumberFormat::format(obj, toAppendTo, pos, status);
}
/* Just use one of the format functions */
virtual UnicodeString& format( double /* number */,
UnicodeString& toAppendTo,
- FieldPosition& /* pos */) const
+ FieldPosition& /* pos */) const override
{
toAppendTo = "";
return toAppendTo;
/* Just use one of the parse functions */
virtual void parse( const UnicodeString& /* text */,
Formattable& result,
- ParsePosition& /* parsePosition */) const
+ ParsePosition& /* parsePosition */) const override
{
result.setLong((int32_t)0);
}
virtual void parse( const UnicodeString& text,
Formattable& result,
- UErrorCode& status) const
+ UErrorCode& status) const override
{
NumberFormat::parse(text, result, status);
}
- virtual MyNumberFormatTest* clone() const
+ virtual MyNumberFormatTest* clone() const override
{ return NULL; }
virtual UnicodeString& format(int32_t,
UnicodeString& foo,
- FieldPosition&) const
+ FieldPosition&) const override
{ return foo.remove(); }
virtual UnicodeString& format(int64_t,
UnicodeString& foo,
- FieldPosition&) const
+ FieldPosition&) const override
{ return foo.remove(); }
virtual void applyPattern(const UnicodeString&, UParseError&, UErrorCode&){
class NumberFormatRegressionTest: public IntlTest {
// IntlTest override
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) override;
public:
void Test4075713(void);
void TestIterate();
void TestEqual();
void TestCopyAndAssign();
- void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=0);
+ void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=0) override;
void addVariant(
PluralMapBase::Category v,
const UnicodeString &value,
* Test basic functionality of various API functions
**/
class PluralFormatTest : public IntlTest {
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
private:
/**
* Test basic functionality of various API functions
**/
class PluralRulesTest : public IntlTest {
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
private:
/**
**/
class ParsePositionTest: public IntlTest {
// IntlTest override
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) override;
public:
void TestParsePosition(void);
QuantityFormatterTest() {
}
void TestBasic();
- void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=0);
+ void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=0) override;
private:
};
public:
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
/**
* Tests Constructor behaviour of RuleBasedBreakIterator
**/
RBBIMonkeyTest();
virtual ~RBBIMonkeyTest();
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
void testMonkey();
public:
RBBICharMonkey();
virtual ~RBBICharMonkey();
- virtual UVector *charClasses();
- virtual void setText(const UnicodeString &s);
- virtual int32_t next(int32_t i);
+ virtual UVector *charClasses() override;
+ virtual void setText(const UnicodeString &s) override;
+ virtual int32_t next(int32_t i) override;
private:
UVector *fSets;
public:
RBBIWordMonkey();
virtual ~RBBIWordMonkey();
- virtual UVector *charClasses();
- virtual void setText(const UnicodeString &s);
- virtual int32_t next(int32_t i);
+ virtual UVector *charClasses() override;
+ virtual void setText(const UnicodeString &s) override;
+ virtual int32_t next(int32_t i) override;
private:
UVector *fSets;
public:
RBBISentMonkey();
virtual ~RBBISentMonkey();
- virtual UVector *charClasses();
- virtual void setText(const UnicodeString &s);
- virtual int32_t next(int32_t i);
+ virtual UVector *charClasses() override;
+ virtual void setText(const UnicodeString &s) override;
+ virtual int32_t next(int32_t i) override;
private:
int moveBack(int posFrom);
int moveForward(int posFrom);
public:
RBBILineMonkey();
virtual ~RBBILineMonkey();
- virtual UVector *charClasses();
- virtual void setText(const UnicodeString &s);
- virtual int32_t next(int32_t i);
+ virtual UVector *charClasses() override;
+ virtual void setText(const UnicodeString &s) override;
+ virtual int32_t next(int32_t i) override;
virtual void rule9Adjust(int32_t pos, UChar32 *posChar, int32_t *nextPos, UChar32 *nextChar);
private:
UVector *fSets;
RBBITest();
virtual ~RBBITest();
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
void TestGetAvailableLocales();
void TestGetDisplayName();
CollationRegressionTest();
virtual ~CollationRegressionTest();
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
// @bug 4048446
//
RegexTest();
virtual ~RegexTest();
- virtual void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par = NULL );
+ virtual void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
// The following are test functions that are visible from the intltest test framework.
virtual void API_Match();
**/
class RegionTest: public IntlTest {
// IntlTest override
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) override;
public:
RegionTest();
RelativeDateTimeFormatterTest() {
}
- void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=0);
+ void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=0) override;
private:
void TestEnglish();
void TestEnglishCaps();
this->styles = s;
}
- virtual TestReplaceable *clone() const {
+ virtual TestReplaceable *clone() const override {
return new TestReplaceable(chars, styles);
}
return s;
}
- void extractBetween(int32_t start, int32_t limit, UnicodeString& result) const {
+ void extractBetween(int32_t start, int32_t limit, UnicodeString& result) const override {
chars.extractBetween(start, limit, result);
}
*
* @draft ICU 2.2
*/
- virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
+ virtual inline UClassID getDynamicClassID() const override { return getStaticClassID(); }
protected:
- virtual int32_t getLength() const {
+ virtual int32_t getLength() const override {
return chars.length();
}
- virtual UChar getCharAt(int32_t offset) const{
+ virtual UChar getCharAt(int32_t offset) const override {
return chars.charAt(offset);
}
- virtual UChar32 getChar32At(int32_t offset) const{
+ virtual UChar32 getChar32At(int32_t offset) const override {
return chars.char32At(offset);
}
styles.replaceBetween(start, limit, s);
}
- virtual void handleReplaceBetween(int32_t start, int32_t limit, const UnicodeString& text) {
+ virtual void handleReplaceBetween(int32_t start, int32_t limit, const UnicodeString& text) override {
UnicodeString s;
this->extractBetween(start, limit, s);
if (s == text) return; // NO ACTION!
}
- virtual void copy(int32_t start, int32_t limit, int32_t dest) {
+ virtual void copy(int32_t start, int32_t limit, int32_t dest) override {
chars.copy(start, limit, dest);
styles.copy(start, limit, dest);
}
*/
class NoopReplaceable : public Replaceable {
public:
- virtual int32_t getLength() const {
+ virtual int32_t getLength() const override {
return 0;
}
- virtual UChar getCharAt(int32_t /*offset*/) const{
+ virtual UChar getCharAt(int32_t /*offset*/) const override {
return 0xffff;
}
- virtual UChar32 getChar32At(int32_t /*offset*/) const{
+ virtual UChar32 getChar32At(int32_t /*offset*/) const override {
return 0xffff;
}
- void extractBetween(int32_t /*start*/, int32_t /*limit*/, UnicodeString& result) const {
+ void extractBetween(int32_t /*start*/, int32_t /*limit*/, UnicodeString& result) const override {
result.remove();
}
- virtual void handleReplaceBetween(int32_t /*start*/, int32_t /*limit*/, const UnicodeString &/*text*/) {
+ virtual void handleReplaceBetween(int32_t /*start*/, int32_t /*limit*/, const UnicodeString &/*text*/) override {
/* do nothing */
}
- virtual void copy(int32_t /*start*/, int32_t /*limit*/, int32_t /*dest*/) {
+ virtual void copy(int32_t /*start*/, int32_t /*limit*/, int32_t /*dest*/) override {
/* do nothing */
}
static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
- virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
+ virtual inline UClassID getDynamicClassID() const override { return getStaticClassID(); }
private:
static const char fgClassID;
*/
class ReplaceableTest : public IntlTest {
public:
- void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par=NULL);
+ void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par=NULL) override;
/*Tests the Replaceable class according to the API documentation. */
void TestReplaceableClass(void);
ResourceBundleTest();
virtual ~ResourceBundleTest();
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
/**
* Perform several extensive tests using the subtest routine testTag
NewResourceBundleTest();
virtual ~NewResourceBundleTest();
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
/**
* Perform several extensive tests using the subtest routine testTag
class ScientificNumberFormatterTest : public IntlTest {
public:
- void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=0);
+ void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=0) override;
private:
void TestBasic();
void TestFarsi();
* Test basic functionality of various API functions
**/
class IntlTestSimpleDateFormatAPI : public IntlTest {
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
private:
/**
* Test basic functionality of various API functions
**/
class SelectFormatTest : public IntlTest {
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
private:
/**
/**
* Generates a hash code for this iterator.
*/
- virtual int32_t hashCode(void) const;
+ virtual int32_t hashCode(void) const override;
/**
* Returns a UClassID for this ForwardCharacterIterator ("poor man's
* RTTI").<P> Despite the fact that this function is public,
* DO NOT CONSIDER IT PART OF CHARACTERITERATOR'S API!
*/
- virtual UClassID getDynamicClassID(void) const;
+ virtual UClassID getDynamicClassID(void) const override;
/**
* Gets the current code unit for returning and advances to the next code unit
* (toward endIndex()). If there are
* no more code units to return, returns DONE.
*/
- virtual UChar nextPostInc(void);
+ virtual UChar nextPostInc(void) override;
/**
* Gets the current code point for returning and advances to the next code point
* (toward endIndex()). If there are
* no more code points to return, returns DONE.
*/
- virtual UChar32 next32PostInc(void);
+ virtual UChar32 next32PostInc(void) override;
/**
* Returns FALSE if there are no more code units or code points
* This is used with nextPostInc() or next32PostInc() in forward
* iteration.
*/
- virtual UBool hasNext();
+ virtual UBool hasNext() override;
protected:
SimpleFwdCharIterator() {}
void TestFormatReplaceOptimizationNoOffsets();
void TestFormatReplaceNoOptimizationNoOffsets();
void TestQuotingLikeMessageFormat();
- void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=0);
+ void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=0) override;
private:
void verifyOffsets(
const int32_t *expected,
class ThreadPoolThread: public SimpleThread {
public:
ThreadPoolThread(ThreadPoolBase *pool, int32_t threadNum) : fPool(pool), fNum(threadNum) {}
- virtual void run() {fPool->callFn(fNum); }
+ virtual void run() override { fPool->callFn(fNum); }
ThreadPoolBase *fPool;
int32_t fNum;
};
ThreadPoolBase(test, howMany), fRunFnPtr(runFnPtr) {}
virtual ~ThreadPool() {}
private:
- virtual void callFn(int32_t param) {
+ virtual void callFn(int32_t param) override {
TestClass *test = dynamic_cast<TestClass *>(fIntlTest);
(test->*fRunFnPtr)(param);
}
const UnicodeString &pattern);
~TestSearch();
- void setOffset(int32_t position, UErrorCode &status);
- int32_t getOffset() const;
- SearchIterator* safeClone() const;
+ void setOffset(int32_t position, UErrorCode &status) override;
+ int32_t getOffset() const override;
+ SearchIterator* safeClone() const override;
/**
*
* @draft ICU 2.2
*/
- virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
+ virtual inline UClassID getDynamicClassID() const override { return getStaticClassID(); }
/**
* ICU "poor man's RTTI", returns a UClassID for this class.
UnicodeString m_pattern_;
protected:
- int32_t handleNext(int32_t position, UErrorCode &status);
- int32_t handlePrev(int32_t position, UErrorCode &status);
+ int32_t handleNext(int32_t position, UErrorCode &status) override;
+ int32_t handlePrev(int32_t position, UErrorCode &status) override;
TestSearch & operator=(const TestSearch &that);
private:
class StubSearchIterator:public SearchIterator{
public:
StubSearchIterator(){}
- virtual void setOffset(int32_t , UErrorCode &) {}
- virtual int32_t getOffset(void) const {return 0;}
- virtual SearchIterator* safeClone(void) const {return NULL;}
- virtual int32_t handleNext(int32_t , UErrorCode &){return 0;}
- virtual int32_t handlePrev(int32_t , UErrorCode &) {return 0;}
- virtual UClassID getDynamicClassID() const {
+ virtual void setOffset(int32_t , UErrorCode &) override {}
+ virtual int32_t getOffset(void) const override {return 0;}
+ virtual SearchIterator* safeClone(void) const override {return NULL;}
+ virtual int32_t handleNext(int32_t , UErrorCode &) override {return 0;}
+ virtual int32_t handlePrev(int32_t , UErrorCode &) override {return 0;}
+ virtual UClassID getDynamicClassID() const override {
static char classID = 0;
return (UClassID)&classID;
}
virtual ~StringSearchTest();
void runIndexedTest(int32_t index, UBool exec, const char* &name,
- char* par = NULL);
+ char* par = NULL) override;
#if !UCONFIG_NO_BREAK_ITERATION
private:
RuleBasedCollator *m_en_us_;
SetMonkey(const USet *theSet);
~SetMonkey();
- virtual void append(UnicodeString &test, UnicodeString &alternate);
+ virtual void append(UnicodeString &test, UnicodeString &alternate) override;
private:
const USet *set;
StringSetMonkey(const USet *theSet, UCollator *theCollator, CollData *theCollData);
~StringSetMonkey();
- void append(UnicodeString &testCase, UnicodeString &alternate);
+ void append(UnicodeString &testCase, UnicodeString &alternate) override;
private:
UnicodeString &generateAlternative(const UnicodeString &testCase, UnicodeString &alternate);
SSearchTest();
virtual ~SSearchTest();
- virtual void runIndexedTest(int32_t index, UBool exec, const char* &name, char* params = NULL );
+ virtual void runIndexedTest(int32_t index, UBool exec, const char* &name, char* params = NULL ) override;
#if !UCONFIG_NO_BREAK_ITERATION
virtual void searchTest();
void testSetCoverage();
void testNonEmpty();
- void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par = 0);
+ void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par = 0) override;
private:
void assertInSet(const UnicodeString& localeName, const UnicodeString &setName,
StringCaseTest();
virtual ~StringCaseTest();
- void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=0);
+ void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=0) override;
void TestCaseConversion();
void testGetCodePoint();
void testCommonPrefixLength();
- void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par = 0);
+ void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par = 0) override;
};
static const char16_t* SAMPLE_STRING = u"📻 radio 📻";
class SimpleByteSink : public ByteSink {
public:
SimpleByteSink(char *outbuf) : fOutbuf(outbuf), fLength(0) {}
- virtual void Append(const char *bytes, int32_t n) {
+ virtual void Append(const char *bytes, int32_t n) override {
if(fOutbuf != bytes) {
memcpy(fOutbuf, bytes, n);
}
fOutbuf += n;
fLength += n;
}
- virtual void Flush() { Append("z", 1); }
+ virtual void Flush() override { Append("z", 1); }
int32_t length() { return fLength; }
private:
char *fOutbuf;
StringTest() {}
virtual ~StringTest();
- void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=NULL);
+ void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=NULL) override;
private:
void TestEndian();
delete[] ids;
}
- virtual Collator* createCollator(const Locale& loc) {
+ virtual Collator* createCollator(const Locale& loc) override {
const CollatorInfo* ci = getInfo(loc);
if (ci) {
return ci->collator->clone();
virtual UnicodeString& getDisplayName(const Locale& objectLocale,
const Locale& displayLocale,
- UnicodeString& result)
+ UnicodeString& result) override
{
const CollatorInfo* ci = getInfo(objectLocale);
if (ci) {
return result;
}
- const UnicodeString* getSupportedIDs(int32_t& _count, UErrorCode& status) {
+ const UnicodeString* getSupportedIDs(int32_t& _count, UErrorCode& status) override {
if (U_SUCCESS(status)) {
if (!ids) {
ids = new UnicodeString[count];
return NULL;
}
- virtual inline UClassID getDynamicClassID() const {
+ virtual inline UClassID getDynamicClassID() const override {
return (UClassID)&gClassID;
}
class CollationServiceTest: public IntlTest {
public:
- void runIndexedTest(int32_t index, UBool exec, const char* &name, char* /*par = NULL */);
+ void runIndexedTest(int32_t index, UBool exec, const char* &name, char* /*par = NULL */) override;
void TestRegister(void);
void TestRegisterFactory(void);
/**
* runs tests in local functions:
**/
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
};
#endif /* #if !UCONFIG_NO_FORMATTING */
*/
class TestIDNA : public IntlTest {
public:
- void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par=NULL);
+ void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par=NULL) override;
void TestDataFile();
void TestToASCII();
void TestToUnicode();
* FieldPosition in test_FieldPosition(),
* Formattable in test_Formattable().
**/
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
};
#endif
CollationThaiTest();
virtual ~CollationThaiTest();
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
private:
*/
class TestMessageFormat: public IntlTest {
public:
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
/**
* regression test for a specific bug regarding ChoiceFormat boundaries
* Used by TestFiltering().
*/
class TestFilter1 : public UnicodeFilter {
- UClassID getDynamicClassID()const { return &gTestFilter1ClassID; }
- virtual TestFilter1* clone() const {
+ UClassID getDynamicClassID()const override { return &gTestFilter1ClassID; }
+ virtual TestFilter1* clone() const override {
return new TestFilter1(*this);
}
- virtual UBool contains(UChar32 c) const {
+ virtual UBool contains(UChar32 c) const override {
if(c==0x63 || c==0x61 || c==0x43 || c==0x41)
return FALSE;
else
}
// Stubs
virtual UnicodeString& toPattern(UnicodeString& result,
- UBool /*escapeUnprintable*/) const {
+ UBool /*escapeUnprintable*/) const override {
return result;
}
- virtual UBool matchesIndexValue(uint8_t /*v*/) const {
+ virtual UBool matchesIndexValue(uint8_t /*v*/) const override {
return FALSE;
}
- virtual void addMatchSetTo(UnicodeSet& /*toUnionTo*/) const {}
+ virtual void addMatchSetTo(UnicodeSet& /*toUnionTo*/) const override {}
};
class TestFilter2 : public UnicodeFilter {
- UClassID getDynamicClassID()const { return &gTestFilter2ClassID; }
- virtual TestFilter2* clone() const {
+ UClassID getDynamicClassID() const override { return &gTestFilter2ClassID; }
+ virtual TestFilter2* clone() const override {
return new TestFilter2(*this);
}
- virtual UBool contains(UChar32 c) const {
+ virtual UBool contains(UChar32 c) const override {
if(c==0x65 || c==0x6c)
return FALSE;
else
}
// Stubs
virtual UnicodeString& toPattern(UnicodeString& result,
- UBool /*escapeUnprintable*/) const {
+ UBool /*escapeUnprintable*/) const override {
return result;
}
- virtual UBool matchesIndexValue(uint8_t /*v*/) const {
+ virtual UBool matchesIndexValue(uint8_t /*v*/) const override {
return FALSE;
}
- virtual void addMatchSetTo(UnicodeSet& /*toUnionTo*/) const {}
+ virtual void addMatchSetTo(UnicodeSet& /*toUnionTo*/) const override {}
};
class TestFilter3 : public UnicodeFilter {
- UClassID getDynamicClassID()const { return &gTestFilter3ClassID; }
- virtual TestFilter3* clone() const {
+ UClassID getDynamicClassID() const override { return &gTestFilter3ClassID; }
+ virtual TestFilter3* clone() const override {
return new TestFilter3(*this);
}
- virtual UBool contains(UChar32 c) const {
+ virtual UBool contains(UChar32 c) const override {
if(c==0x6f || c==0x77)
return FALSE;
else
}
// Stubs
virtual UnicodeString& toPattern(UnicodeString& result,
- UBool /*escapeUnprintable*/) const {
+ UBool /*escapeUnprintable*/) const override {
return result;
}
- virtual UBool matchesIndexValue(uint8_t /*v*/) const {
+ virtual UBool matchesIndexValue(uint8_t /*v*/) const override {
return FALSE;
}
- virtual void addMatchSetTo(UnicodeSet& /*toUnionTo*/) const {}
+ virtual void addMatchSetTo(UnicodeSet& /*toUnionTo*/) const override {}
};
static const int MyUnicodeFunctorTestClassID = 0;
class MyUnicodeFunctorTestClass : public UnicodeFunctor {
public:
- virtual UnicodeFunctor* clone() const {return NULL;}
+ virtual UnicodeFunctor* clone() const override {return NULL;}
static UClassID getStaticClassID(void) {return (UClassID)&MyUnicodeFunctorTestClassID;}
- virtual UClassID getDynamicClassID(void) const {return getStaticClassID();}
- virtual void setData(const TransliterationRuleData*) {}
+ virtual UClassID getDynamicClassID(void) const override {return getStaticClassID();}
+ virtual void setData(const TransliterationRuleData*) override {}
};
void TransliteratorAPITest::TestUnicodeFunctor() {
*/
class TransliteratorAPITest : public IntlTest {
public:
- void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par=NULL);
+ void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par=NULL) override;
/*Tests the function getDisplayName() */
void TestGetDisplayName(void);
public:
LegalJamo() {}
virtual ~LegalJamo() {}
- virtual UBool is(const UnicodeString& sourceString) const;
+ virtual UBool is(const UnicodeString& sourceString) const override;
int getType(UChar c) const;
};
LegalGreek(UBool _full) { full = _full; }
virtual ~LegalGreek() {}
- virtual UBool is(const UnicodeString& sourceString) const;
+ virtual UBool is(const UnicodeString& sourceString) const override;
static UBool isVowel(UChar c);
public:
LegalHebrew(UErrorCode& error);
virtual ~LegalHebrew() {}
- virtual UBool is(const UnicodeString& sourceString) const;
+ virtual UBool is(const UnicodeString& sourceString) const override;
};
LegalHebrew::LegalHebrew(UErrorCode& error){
public:
LegalIndic();
- virtual UBool is(const UnicodeString& sourceString) const;
+ virtual UBool is(const UnicodeString& sourceString) const override;
virtual ~LegalIndic() {}
};
UBool LegalIndic::is(const UnicodeString& sourceString) const{
class TransliteratorRoundTripTest : public IntlTest {
void runIndexedTest(int32_t index, UBool exec, const char* &name,
- char* par=NULL);
+ char* par=NULL) override;
void TestKana(void);
void TestHiragana(void);
* Used by TestFiltering().
*/
class TestFilter : public UnicodeFilter {
- virtual TestFilter* clone() const {
+ virtual TestFilter* clone() const override {
return new TestFilter(*this);
}
- virtual UBool contains(UChar32 c) const {
+ virtual UBool contains(UChar32 c) const override {
return c != (UChar)0x0063 /*c*/;
}
// Stubs
virtual UnicodeString& toPattern(UnicodeString& result,
- UBool /*escapeUnprintable*/) const {
+ UBool /*escapeUnprintable*/) const override {
return result;
}
- virtual UBool matchesIndexValue(uint8_t /*v*/) const {
+ virtual UBool matchesIndexValue(uint8_t /*v*/) const override {
return FALSE;
}
- virtual void addMatchSetTo(UnicodeSet& /*toUnionTo*/) const {}
+ virtual void addMatchSetTo(UnicodeSet& /*toUnionTo*/) const override {}
public:
- UClassID getDynamicClassID() const { return (UClassID)&gTestFilterClassID; }
+ UClassID getDynamicClassID() const override { return (UClassID)&gTestFilterClassID; }
};
/**
public:
TestTrans(const UnicodeString& id) : Transliterator(id, 0) {
}
- virtual TestTrans* clone(void) const {
+ virtual TestTrans* clone(void) const override {
return new TestTrans(getID());
}
virtual void handleTransliterate(Replaceable& /*text*/, UTransPosition& offsets,
- UBool /*isIncremental*/) const
+ UBool /*isIncremental*/) const override
{
offsets.start = offsets.limit;
}
- virtual UClassID getDynamicClassID() const;
+ virtual UClassID getDynamicClassID() const override;
static UClassID U_EXPORT2 getStaticClassID();
};
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(TestTrans)
private:
void runIndexedTest(int32_t index, UBool exec, const char* &name,
- char* par=NULL);
+ char* par=NULL) override;
void TestInstantiation(void);
CollationTurkishTest();
virtual ~CollationTurkishTest();
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
// perform tests for turkish locale with strength PRIMARY
void TestPrimary(/* char* par */);
class StubTransliterator: public Transliterator{
public:
StubTransliterator(): Transliterator(UNICODE_STRING_SIMPLE("Any-Null"), 0) {}
- virtual void handleTransliterate(Replaceable& ,UTransPosition& offsets,UBool) const {
+ virtual void handleTransliterate(Replaceable& ,UTransPosition& offsets,UBool) const override {
offsets.start = offsets.limit;
}
- virtual UClassID getDynamicClassID() const{
+ virtual UClassID getDynamicClassID() const override {
static char classID = 0;
return (UClassID)&classID;
}
*/
class TransliteratorErrorTest : public IntlTest {
public:
- void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par=NULL);
+ void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par=NULL) override;
/*Tests the returned error codes on all the APIs according to the API documentation. */
void TestTransliteratorErrors(void);
class IntlTestCollator: public IntlTest {
- void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
protected:
struct Order
{
* Performs some tests in many variations on DateFormat
**/
class IntlTestDateFormat: public IntlTest {
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
private:
* Tests for DecimalFormatSymbols
**/
class IntlTestDecimalFormatSymbols: public IntlTest {
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
private:
/**
* Tests for DateFormatSymbols
**/
class IntlTestDateFormatSymbols: public IntlTest {
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
private:
/**
{
public:
TestThreadsThread(char* whatToChange) { fWhatToChange = whatToChange; }
- virtual void run() { Mutex m;
- *fWhatToChange = '*';
+ virtual void run() override {
+ Mutex m;
+ *fWhatToChange = '*';
}
private:
char *fWhatToChange;
{
public:
TestArabicShapeThreads() {}
- virtual void run() { doTailTest(); }
+ virtual void run() override { doTailTest(); }
private:
void doTailTest();
};
}
- virtual void run()
+ virtual void run() override
{
fTraceInfo = 1;
LocalPointer<NumberFormat> percentFormatter;
noLines = nl;
isAtLeastUCA62 = atLeastUCA62;
}
- virtual void run() {
+ virtual void run() override {
uint8_t sk1[1024], sk2[1024];
uint8_t *oldSk = NULL, *newSk = sk1;
int32_t oldLen = 0;
}
- virtual void run()
+ virtual void run() override
{
fTraceInfo = 1;
int loopCount = 0;
public:
TxThread() {}
~TxThread();
- void run();
+ void run() override;
};
TxThread::~TxThread() {}
const char *loc,
const char *loc2) : fCache(cache), fLoc(loc), fLoc2(loc2) {}
~UnifiedCacheThread() {}
- void run();
+ void run() override;
void exerciseByLocale(const Locale &);
const UnifiedCache *fCache;
Locale fLoc;
public:
BreakTranslitThread() {}
~BreakTranslitThread() {}
- void run();
+ void run() override;
};
void BreakTranslitThread::run() {
class TestIncDecThread : public SimpleThread {
public:
TestIncDecThread() {}
- virtual void run();
+ virtual void run() override;
};
static u_atomic_int32_t gIncDecCounter;
class Test20104Thread : public SimpleThread {
public:
Test20104Thread() {}
- virtual void run();
+ virtual void run() override;
};
void Test20104Thread::run() {
MultithreadTest();
virtual ~MultithreadTest();
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
/**
* test that threads even work
* NumberFormat.
*/
class IntlTestNumberFormat: public IntlTest {
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
private:
**/
class PUtilTest : public IntlTest {
// IntlTest override
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) override;
public:
// void testIEEEremainder(void);
BasicNormalizerTest();
virtual ~BasicNormalizerTest();
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
void TestHangulCompose(void);
void TestHangulDecomp(void);
#endif
class TimeUnitTest : public IntlTest {
- void runIndexedTest(int32_t index, UBool exec, const char* &name, char* /*par*/ ) {
+ void runIndexedTest(int32_t index, UBool exec, const char* &name, char* /*par*/ ) override {
if (exec) logln("TestSuite TimeUnitTest");
TESTCASE_AUTO_BEGIN;
TESTCASE_AUTO(testBasic);
*/
class TimeZoneBoundaryTest: public CalendarTimeZoneTest {
// IntlTest override
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) override;
public: // package
TimeZoneBoundaryTest();
class TimeZoneFormatTest : public IntlTest {
public:
// IntlTest override
- void runIndexedTest(int32_t index, UBool exec, const char*& name, char* par);
+ void runIndexedTest(int32_t index, UBool exec, const char*& name, char* par) override;
void TestTimeZoneRoundTrip(void);
void TestTimeRoundTrip(void);
class TimeZoneOffsetLocalTest : public IntlTest {
// IntlTest override
- void runIndexedTest(int32_t index, UBool exec, const char*& name, char* par);
+ void runIndexedTest(int32_t index, UBool exec, const char*& name, char* par) override;
void TestGetOffsetAroundTransition(void);
};
class TimeZoneRegressionTest: public IntlTest {
// IntlTest override
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) override;
public:
void Test4052967(void);
TestZIDEnumeration(UBool all = FALSE);
~TestZIDEnumeration();
- virtual int32_t count(UErrorCode& /*status*/) const {
+ virtual int32_t count(UErrorCode& /*status*/) const override {
return len;
}
- virtual const UnicodeString *snext(UErrorCode& status);
- virtual void reset(UErrorCode& status);
+ virtual const UnicodeString *snext(UErrorCode& status) override;
+ virtual void reset(UErrorCode& status) override;
static inline UClassID getStaticClassID() {
return (UClassID)&fgClassID;
}
- virtual UClassID getDynamicClassID() const {
+ virtual UClassID getDynamicClassID() const override {
return getStaticClassID();
}
private:
*/
class TimeZoneRuleTest : public CalendarTimeZoneTest {
// IntlTest override
- void runIndexedTest(int32_t index, UBool exec, const char*& name, char* par);
+ void runIndexedTest(int32_t index, UBool exec, const char*& name, char* par) override;
public:
void TestSimpleRuleBasedTimeZone(void);
void TestHistoricalRuleBasedTimeZone(void);
**/
class TimeZoneTest: public CalendarTimeZoneTest {
// IntlTest override
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) override;
public: // package
static const int32_t millisPerHour;
UCAConformanceTest();
virtual ~UCAConformanceTest();
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par = NULL */);
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par = NULL */) override;
void TestTableNonIgnorable(/* par */);
void TestTableShifted(/* par */);
UnicodeTest();
virtual ~UnicodeTest();
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
void TestAdditionalProperties();
void TestBinaryValues();
UCharsTrieTest();
virtual ~UCharsTrieTest();
- void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=NULL);
+ void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=NULL) override;
void TestBuilder();
void TestEmpty();
void Test_a();
public:
UnifiedCacheTest() {
}
- void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=0);
+ void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=0) override;
private:
void TestEvictionPolicy();
void TestBounded();
public:
UnitsDataTest() {}
- void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par = NULL);
+ void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par = NULL) override;
void testGetUnitCategory();
void testGetAllConversionRates();
public:
UnitsRouterTest() {}
- void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par = NULL);
+ void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par = NULL) override;
void testBasic();
};
public:
UnitsTest() {}
- void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par = NULL);
+ void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par = NULL) override;
void testUnitConstantFreshness();
void testExtractConvertibility();
// Appendable is abstract; we define a subclass to verify that there is no "poor man's RTTI".
class DummyAppendable : public Appendable {
public:
- virtual UBool appendCodeUnit(UChar /*c*/) { return TRUE; }
+ virtual UBool appendCodeUnit(UChar /*c*/) override { return TRUE; }
};
void UObjectTest::testIDs()
**/
class UObjectTest : public IntlTest {
// IntlTest override
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) override;
private:
// tests
void testIDs();
/**
* SymbolTable API
*/
- virtual const UnicodeString* lookup(const UnicodeString& s) const {
+ virtual const UnicodeString* lookup(const UnicodeString& s) const override {
return (const UnicodeString*) contents.get(s);
}
/**
* SymbolTable API
*/
- virtual const UnicodeFunctor* lookupMatcher(UChar32 /*ch*/) const {
+ virtual const UnicodeFunctor* lookupMatcher(UChar32 /*ch*/) const override {
return NULL;
}
* SymbolTable API
*/
virtual UnicodeString parseReference(const UnicodeString& text,
- ParsePosition& pos, int32_t limit) const {
+ ParsePosition& pos, int32_t limit) const override {
int32_t start = pos.getIndex();
int32_t i = start;
UnicodeString result;
~UnicodeSetTest();
private:
- void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par=NULL);
+ void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par=NULL) override;
void Testj2268();
public:
TestEnumeration() : i(0) {}
- virtual int32_t count(UErrorCode& /*status*/) const {
+ virtual int32_t count(UErrorCode& /*status*/) const override {
return UPRV_LENGTHOF(testEnumStrings);
}
- virtual const UnicodeString *snext(UErrorCode &status) {
+ virtual const UnicodeString *snext(UErrorCode &status) override {
if(U_SUCCESS(status) && i<UPRV_LENGTHOF(testEnumStrings)) {
unistr=UnicodeString(testEnumStrings[i++], "");
return &unistr;
return NULL;
}
- virtual void reset(UErrorCode& /*status*/) {
+ virtual void reset(UErrorCode& /*status*/) override {
i=0;
}
static inline UClassID getStaticClassID() {
return (UClassID)&fgClassID;
}
- virtual UClassID getDynamicClassID() const {
+ virtual UClassID getDynamicClassID() const override {
return getStaticClassID();
}
public:
TestCheckedArrayByteSink(char* outbuf, int32_t capacity)
: CheckedArrayByteSink(outbuf, capacity), calledFlush(FALSE) {}
- virtual void Flush() { calledFlush = TRUE; }
+ virtual void Flush() override { calledFlush = TRUE; }
UBool calledFlush;
};
class SimpleAppendable : public Appendable {
public:
explicit SimpleAppendable(UnicodeString &dest) : str(dest) {}
- virtual UBool appendCodeUnit(UChar c) { str.append(c); return TRUE; }
+ virtual UBool appendCodeUnit(UChar c) override { str.append(c); return TRUE; }
SimpleAppendable &reset() { str.remove(); return *this; }
private:
UnicodeString &str;
UnicodeStringTest() {}
virtual ~UnicodeStringTest();
- void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
+ void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
/**
* Test some basic methods (insert, remove, replace, ...)
UTS46Test() : trans(NULL), nontrans(NULL) {}
virtual ~UTS46Test();
- void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=NULL);
+ void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=NULL) override;
void TestAPI();
void TestNotSTD3();
void TestInvalidPunycodeDigits();
public:
TestCheckedArrayByteSink(char* outbuf, int32_t capacity)
: CheckedArrayByteSink(outbuf, capacity), calledFlush(FALSE) {}
- virtual CheckedArrayByteSink& Reset() {
+ virtual CheckedArrayByteSink& Reset() override {
CheckedArrayByteSink::Reset();
calledFlush = FALSE;
return *this;
}
- virtual void Flush() { calledFlush = TRUE; }
+ virtual void Flush() override { calledFlush = TRUE; }
UBool calledFlush;
};
UTextTest();
virtual ~UTextTest();
- void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par=NULL);
+ void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par=NULL) override;
void TextTest();
void ErrorTest();
void FreezeTest();
UVectorTest();
virtual ~UVectorTest();
- virtual void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par = NULL );
+ virtual void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
// The following are test functions that are visible from the intltest test framework.
void UVector_API();
UVector32Test();
virtual ~UVector32Test();
- virtual void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par = NULL );
+ virtual void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par = NULL ) override;
// The following are test functions that are visible from the intltest test framework.
virtual void UVector32_API();
fgTestDataPath = NULL;
}
}
- virtual void errln( const UnicodeString &message ) {
+ virtual void errln( const UnicodeString &message ) override {
char buffer[4000];
message.extract(0, message.length(), buffer, sizeof(buffer));
buffer[3999] = 0; /* NULL terminate */
log_err(buffer);
}
- virtual void logln( const UnicodeString &message ) {
+ virtual void logln( const UnicodeString &message ) override {
char buffer[4000];
message.extract(0, message.length(), buffer, sizeof(buffer));
buffer[3999] = 0; /* NULL terminate */
log_info(buffer);
}
- virtual void dataerrln( const UnicodeString &message ) {
+ virtual void dataerrln( const UnicodeString &message ) override {
char buffer[4000];
message.extract(0, message.length(), buffer, sizeof(buffer));
buffer[3999] = 0; /* NULL terminate */
return fgTestDataPath;
}
- virtual const char* getTestDataPath(UErrorCode& err) {
+ virtual const char* getTestDataPath(UErrorCode& err) override {
return loadTestData(err);
}
};