1 // © 2018 and later: Unicode, Inc. and others. 2 // License & terms of use: http://www.unicode.org/copyright.html 3 4 #include "intltest.h" 5 #include "unicode/localebuilder.h" 6 7 8 /** 9 * Tests for the LocaleBuilder class 10 **/ 11 class LocaleBuilderTest: public IntlTest { 12 public: 13 LocaleBuilderTest(); 14 virtual ~LocaleBuilderTest(); 15 16 void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override; 17 18 void TestAddRemoveUnicodeLocaleAttribute(void); 19 void TestAddRemoveUnicodeLocaleAttributeWellFormed(void); 20 void TestAddUnicodeLocaleAttributeIllFormed(void); 21 void TestLocaleBuilder(void); 22 void TestLocaleBuilderBasic(void); 23 void TestLocaleBuilderBasicWithExtensionsOnDefaultLocale(void); 24 void TestPosixCases(void); 25 void TestSetExtensionOthers(void); 26 void TestSetExtensionPU(void); 27 void TestSetExtensionT(void); 28 void TestSetExtensionU(void); 29 void TestSetExtensionValidateOthersIllFormed(void); 30 void TestSetExtensionValidateOthersWellFormed(void); 31 void TestSetExtensionValidatePUIllFormed(void); 32 void TestSetExtensionValidatePUWellFormed(void); 33 void TestSetExtensionValidateTIllFormed(void); 34 void TestSetExtensionValidateTWellFormed(void); 35 void TestSetExtensionValidateUIllFormed(void); 36 void TestSetExtensionValidateUWellFormed(void); 37 void TestSetLanguageIllFormed(void); 38 void TestSetLanguageWellFormed(void); 39 void TestSetLocale(void); 40 void TestSetRegionIllFormed(void); 41 void TestSetRegionWellFormed(void); 42 void TestSetScriptIllFormed(void); 43 void TestSetScriptWellFormed(void); 44 void TestSetUnicodeLocaleKeywordIllFormedKey(void); 45 void TestSetUnicodeLocaleKeywordIllFormedValue(void); 46 void TestSetUnicodeLocaleKeywordWellFormed(void); 47 void TestSetVariantIllFormed(void); 48 void TestSetVariantWellFormed(void); 49 50 private: 51 void Verify(LocaleBuilder& bld, const char* expected, const char* msg); 52 }; 53