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
a1cb33ed
Kaydet (Commit)
a1cb33ed
authored
Tem 23, 2012
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Related: #i13494# regression tests for word iterator
Change-Id: Ifad0a8ae01386db80a5eca9dfba8ee6841980139
üst
ba47dd6f
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
80 additions
and
0 deletions
+80
-0
test_breakiterator.cxx
i18npool/qa/cppunit/test_breakiterator.cxx
+80
-0
README
i18npool/source/breakiterator/data/README
+0
-0
No files found.
i18npool/qa/cppunit/test_breakiterator.cxx
Dosyayı görüntüle @
a1cb33ed
...
@@ -281,6 +281,86 @@ void TestBreakIterator::testWordBoundaries()
...
@@ -281,6 +281,86 @@ void TestBreakIterator::testWordBoundaries()
CPPUNIT_ASSERT
(
m_xBreak
->
isEndWord
(
aTest
,
aBounds
.
endPos
,
aLocale
,
mode
));
CPPUNIT_ASSERT
(
m_xBreak
->
isEndWord
(
aTest
,
aBounds
.
endPos
,
aLocale
,
mode
));
}
}
}
}
//See https://issues.apache.org/ooo/show_bug.cgi?id=13494
{
const
rtl
::
OUString
aBase
(
"xxAAxxBBxxCCxx"
);
const
sal_Unicode
aTests
[]
=
{
'\''
,
';'
,
','
,
'.'
,
'!'
,
'@'
,
'#'
,
'%'
,
'&'
,
'*'
,
'('
,
')'
,
'_'
,
'-'
,
'{'
,
'}'
,
'['
,
']'
,
'\"'
,
'/'
,
'\\'
,
'?'
,
'~'
,
'$'
,
'+'
,
'^'
,
'='
,
'<'
,
'>'
,
'|'
};
const
sal_Int32
aDoublePositions
[]
=
{
0
,
2
,
4
,
6
,
8
,
10
,
12
,
14
};
for
(
size_t
j
=
0
;
j
<
SAL_N_ELEMENTS
(
aTests
);
++
j
)
{
rtl
::
OUString
aTest
=
aBase
.
replace
(
'x'
,
aTests
[
j
]);
sal_Int32
nPos
=
-
1
;
size_t
i
=
0
;
do
{
CPPUNIT_ASSERT
(
i
<
SAL_N_ELEMENTS
(
aDoublePositions
));
nPos
=
m_xBreak
->
nextWord
(
aTest
,
nPos
,
aLocale
,
i18n
::
WordType
::
ANYWORD_IGNOREWHITESPACES
).
startPos
;
CPPUNIT_ASSERT
(
nPos
==
aDoublePositions
[
i
++
]);
}
while
(
nPos
<
aTest
.
getLength
());
nPos
=
aTest
.
getLength
();
i
=
SAL_N_ELEMENTS
(
aDoublePositions
)
-
1
;
do
{
nPos
=
m_xBreak
->
previousWord
(
aTest
,
nPos
,
aLocale
,
i18n
::
WordType
::
ANYWORD_IGNOREWHITESPACES
).
startPos
;
CPPUNIT_ASSERT
(
nPos
==
aDoublePositions
[
--
i
]);
}
while
(
nPos
>
0
);
}
const
sal_Int32
aSinglePositions
[]
=
{
0
,
1
,
3
,
4
,
6
,
7
,
9
,
10
};
for
(
size_t
j
=
1
;
j
<
SAL_N_ELEMENTS
(
aTests
);
++
j
)
{
rtl
::
OUString
aTest
=
aBase
.
replaceAll
(
rtl
::
OUString
(
"xx"
),
rtl
::
OUString
(
aTests
[
j
]));
sal_Int32
nPos
=
-
1
;
size_t
i
=
0
;
do
{
CPPUNIT_ASSERT
(
i
<
SAL_N_ELEMENTS
(
aSinglePositions
));
nPos
=
m_xBreak
->
nextWord
(
aTest
,
nPos
,
aLocale
,
i18n
::
WordType
::
ANYWORD_IGNOREWHITESPACES
).
startPos
;
CPPUNIT_ASSERT
(
nPos
==
aSinglePositions
[
i
++
]);
}
while
(
nPos
<
aTest
.
getLength
());
nPos
=
aTest
.
getLength
();
i
=
SAL_N_ELEMENTS
(
aSinglePositions
)
-
1
;
do
{
nPos
=
m_xBreak
->
previousWord
(
aTest
,
nPos
,
aLocale
,
i18n
::
WordType
::
ANYWORD_IGNOREWHITESPACES
).
startPos
;
CPPUNIT_ASSERT
(
nPos
==
aSinglePositions
[
--
i
]);
}
while
(
nPos
>
0
);
}
const
sal_Int32
aSingleQuotePositions
[]
=
{
0
,
1
,
9
,
10
};
CPPUNIT_ASSERT
(
aTests
[
0
]
==
'\''
);
{
rtl
::
OUString
aTest
=
aBase
.
replaceAll
(
rtl
::
OUString
(
"xx"
),
rtl
::
OUString
(
aTests
[
0
]));
sal_Int32
nPos
=
-
1
;
size_t
i
=
0
;
do
{
CPPUNIT_ASSERT
(
i
<
SAL_N_ELEMENTS
(
aSingleQuotePositions
));
nPos
=
m_xBreak
->
nextWord
(
aTest
,
nPos
,
aLocale
,
i18n
::
WordType
::
ANYWORD_IGNOREWHITESPACES
).
startPos
;
CPPUNIT_ASSERT
(
nPos
==
aSingleQuotePositions
[
i
++
]);
}
while
(
nPos
<
aTest
.
getLength
());
nPos
=
aTest
.
getLength
();
i
=
SAL_N_ELEMENTS
(
aSingleQuotePositions
)
-
1
;
do
{
nPos
=
m_xBreak
->
previousWord
(
aTest
,
nPos
,
aLocale
,
i18n
::
WordType
::
ANYWORD_IGNOREWHITESPACES
).
startPos
;
CPPUNIT_ASSERT
(
nPos
==
aSingleQuotePositions
[
--
i
]);
}
while
(
nPos
>
0
);
}
}
}
}
//See http://qa.openoffice.org/issues/show_bug.cgi?id=111152
//See http://qa.openoffice.org/issues/show_bug.cgi?id=111152
...
...
i18npool/source/breakiterator/data/README
Dosyayı görüntüle @
a1cb33ed
This diff is collapsed.
Click to expand it.
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