ICU-2787 Locale setDefault(), fix failing test - name too long.

X-SVN-Rev: 11875
This commit is contained in:
Andy Heninger 2003-05-09 22:15:25 +00:00
parent 749f51d769
commit 702663805e
2 changed files with 7 additions and 3 deletions

View file

@ -291,6 +291,10 @@ Locale::Locale(const Locale &other)
Locale &Locale::operator=(const Locale &other)
{
if (*this == other) {
return *this;
}
/* Free our current storage */
if(fullName != fullNameBuffer) {
uprv_free(fullName);

View file

@ -254,9 +254,9 @@ static void TestNullDefault() {
char original[ULOC_FULLNAME_CAPACITY];
uprv_strcpy(original, uloc_getDefault());
uloc_setDefault("qq_BLAH", &status);
if (uprv_strcmp(uloc_getDefault(), "qq_BLAH") != 0) {
log_err(" Mismatch in uloc_setDefault: qq_BLAH versus %s\n", uloc_getDefault());
uloc_setDefault("qq_BLA", &status);
if (uprv_strcmp(uloc_getDefault(), "qq_BLA") != 0) {
log_err(" Mismatch in uloc_setDefault: qq_BLA versus %s\n", uloc_getDefault());
}
uloc_setDefault(NULL, &status);
if (uprv_strcmp(uloc_getDefault(), original) != 0) {