Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
af12236c
Kaydet (Commit)
af12236c
authored
Şub 16, 2018
tarafından
Eike Rathke
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Prepare to add specific number format index to test against
Change-Id: I1c01c9afe4a2479bd8e595b84816febe8e9e5947
üst
a1eff310
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
22 deletions
+25
-22
svl.cxx
svl/qa/unit/svl.cxx
+25
-22
No files found.
svl/qa/unit/svl.cxx
Dosyayı görüntüle @
af12236c
...
...
@@ -1171,9 +1171,10 @@ void Test::testIsNumberFormat()
namespace
{
struct
FormatInputOutput
{
const
char
*
mpInput
;
const
bool
mbNumber
;
const
char
*
mpOutput
;
const
char
*
mpInput
;
const
bool
mbNumber
;
const
char
*
mpOutput
;
const
sal_uInt32
mnOutputIndex
;
};
}
...
...
@@ -1192,6 +1193,8 @@ void checkSpecificNumberFormats( SvNumberFormatter& rFormatter,
OUStringToOString
(
aString
,
RTL_TEXTENCODING_UTF8
)).
getStr
(),
rVec
[
i
].
mbNumber
,
bIsNumber
);
if
(
bIsNumber
)
{
if
(
rVec
[
i
].
mnOutputIndex
)
nIndex
=
rVec
[
i
].
mnOutputIndex
;
Color
*
pColor
;
rFormatter
.
GetOutputString
(
fNumber
,
nIndex
,
aString
,
&
pColor
);
CPPUNIT_ASSERT_EQUAL_MESSAGE
(
OString
(
OString
(
pName
)
+
" "
+
OString
::
number
(
i
)
+
" mismatch"
).
getStr
(),
...
...
@@ -1208,8 +1211,8 @@ void Test::testIsNumberFormatSpecific()
SvNumberFormatter
aFormatter
(
m_xContext
,
LANGUAGE_ENGLISH_US
);
std
::
vector
<
FormatInputOutput
>
aIO
=
{
{
"5-12-14"
,
false
,
""
},
{
"32-12-14"
,
true
,
"1932-12-14"
}
{
"5-12-14"
,
false
,
""
,
0
},
{
"32-12-14"
,
true
,
"1932-12-14"
,
0
}
};
checkSpecificNumberFormats
(
aFormatter
,
aIO
,
"[en-US] date"
);
...
...
@@ -1221,8 +1224,8 @@ void Test::testIsNumberFormatSpecific()
SvNumberFormatter
aFormatter
(
m_xContext
,
LANGUAGE_GERMAN
);
std
::
vector
<
FormatInputOutput
>
aIO
=
{
{
"5-12-14"
,
false
,
""
},
{
"32-12-14"
,
true
,
"1932-12-14"
}
{
"5-12-14"
,
false
,
""
,
0
},
{
"32-12-14"
,
true
,
"1932-12-14"
,
0
}
};
checkSpecificNumberFormats
(
aFormatter
,
aIO
,
"[de-DE] date"
);
...
...
@@ -1234,10 +1237,10 @@ void Test::testIsNumberFormatSpecific()
SvNumberFormatter
aFormatter
(
m_xContext
,
LANGUAGE_DUTCH
);
std
::
vector
<
FormatInputOutput
>
aIO
=
{
{
"22-11-1999"
,
true
,
"22-11-99"
},
// if default YY changes to YYYY adapt this
{
"1999-11-22"
,
true
,
"1999-11-22"
},
{
"1-2-11"
,
true
,
"01-02-11"
},
// if default YY changes to YYYY adapt this
{
"99-2-11"
,
true
,
"1999-02-11"
}
{
"22-11-1999"
,
true
,
"22-11-99"
,
0
},
// if default YY changes to YYYY adapt this
{
"1999-11-22"
,
true
,
"1999-11-22"
,
0
},
{
"1-2-11"
,
true
,
"01-02-11"
,
0
},
// if default YY changes to YYYY adapt this
{
"99-2-11"
,
true
,
"1999-02-11"
,
0
}
};
checkSpecificNumberFormats
(
aFormatter
,
aIO
,
"[nl-NL] date"
);
...
...
@@ -1249,11 +1252,11 @@ void Test::testIsNumberFormatSpecific()
SvNumberFormatter
aFormatter
(
m_xContext
,
LANGUAGE_ENGLISH_SAFRICA
);
std
::
vector
<
FormatInputOutput
>
aIO
=
{
{
"1999/11/22"
,
true
,
"99/11/22"
},
// if default YY changes to YYYY adapt this
{
"1999-11-22"
,
true
,
"1999-11-22"
},
{
"11/2/1"
,
true
,
"11/02/01"
},
// if default YY changes to YYYY adapt this
{
"99-2-11"
,
true
,
"1999-02-11"
},
{
"22-2-11"
,
true
,
"2022-02-11"
}
{
"1999/11/22"
,
true
,
"99/11/22"
,
0
},
// if default YY changes to YYYY adapt this
{
"1999-11-22"
,
true
,
"1999-11-22"
,
0
},
{
"11/2/1"
,
true
,
"11/02/01"
,
0
},
// if default YY changes to YYYY adapt this
{
"99-2-11"
,
true
,
"1999-02-11"
,
0
},
{
"22-2-11"
,
true
,
"2022-02-11"
,
0
}
};
checkSpecificNumberFormats
(
aFormatter
,
aIO
,
"[en-ZA] date"
);
...
...
@@ -1265,12 +1268,12 @@ void Test::testIsNumberFormatSpecific()
SvNumberFormatter
aFormatter
(
m_xContext
,
LANGUAGE_FRENCH
);
std
::
vector
<
FormatInputOutput
>
aIO
=
{
{
"22/11/1999"
,
true
,
"22/11/99"
},
// if default YY changes to YYYY adapt this
{
"1999-11-22"
,
true
,
"1999-11-22"
},
{
"1/2/11"
,
true
,
"01/02/11"
},
// if default YY changes to YYYY adapt this
{
"99-2-11"
,
true
,
"1999-02-11"
},
{
"22-2-11"
,
true
,
"22/02/11"
},
// if default YY changes to YYYY adapt this
{
"22.2.11"
,
true
,
"22/02/11"
}
// if default YY changes to YYYY adapt this
{
"22/11/1999"
,
true
,
"22/11/99"
,
0
},
// if default YY changes to YYYY adapt this
{
"1999-11-22"
,
true
,
"1999-11-22"
,
0
},
{
"1/2/11"
,
true
,
"01/02/11"
,
0
},
// if default YY changes to YYYY adapt this
{
"99-2-11"
,
true
,
"1999-02-11"
,
0
},
{
"22-2-11"
,
true
,
"22/02/11"
,
0
},
// if default YY changes to YYYY adapt this
{
"22.2.11"
,
true
,
"22/02/11"
,
0
}
// if default YY changes to YYYY adapt this
};
checkSpecificNumberFormats
(
aFormatter
,
aIO
,
"[fr-FR] date"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment