mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-13 17:01:16 +00:00
ICU-2787 Locale setDefault(), fix failing test - name too long.
X-SVN-Rev: 11875
This commit is contained in:
parent
749f51d769
commit
702663805e
2 changed files with 7 additions and 3 deletions
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue