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
ca00d27e
Kaydet (Commit)
ca00d27e
authored
Eyl 06, 2012
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Related: fdo#54486 add some regression tests for ordinal suffixes
Change-Id: Iea51d777c3cc1fdc58fa7fccfe01e4e8394e79b2
üst
5fc1d590
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
139 additions
and
1 deletion
+139
-1
CppunitTest_i18npool_test_ordinalsuffix.mk
i18npool/CppunitTest_i18npool_test_ordinalsuffix.mk
+35
-0
Module_i18npool.mk
i18npool/Module_i18npool.mk
+1
-0
test_breakiterator.cxx
i18npool/qa/cppunit/test_breakiterator.cxx
+1
-1
test_ordinalsuffix.cxx
i18npool/qa/cppunit/test_ordinalsuffix.cxx
+102
-0
No files found.
i18npool/CppunitTest_i18npool_test_ordinalsuffix.mk
0 → 100644
Dosyayı görüntüle @
ca00d27e
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_CppunitTest_CppunitTest,i18npool_test_ordinalsuffix))
$(eval $(call gb_CppunitTest_use_api,i18npool_test_ordinalsuffix,\
udkapi \
offapi \
))
$(eval $(call gb_CppunitTest_use_libraries,i18npool_test_ordinalsuffix,\
cppu \
cppuhelper \
sal \
unotest \
$(gb_STDLIBS) \
))
$(eval $(call gb_CppunitTest_add_exception_objects,i18npool_test_ordinalsuffix,\
i18npool/qa/cppunit/test_ordinalsuffix \
))
$(eval $(call gb_CppunitTest_use_ure,i18npool_test_ordinalsuffix))
$(eval $(call gb_CppunitTest_use_components,i18npool_test_ordinalsuffix,\
i18npool/util/i18npool \
))
# vim: set noet sw=4 ts=4:
i18npool/Module_i18npool.mk
Dosyayı görüntüle @
ca00d27e
...
...
@@ -63,6 +63,7 @@ $(eval $(call gb_Module_add_check_targets,i18npool,\
CppunitTest_i18npool_test_breakiterator \
CppunitTest_i18npool_test_characterclassification \
CppunitTest_i18npool_test_languagetag \
CppunitTest_i18npool_test_ordinalsuffix \
))
# vim: set noet sw=4 ts=4:
i18npool/qa/cppunit/test_breakiterator.cxx
Dosyayı görüntüle @
ca00d27e
...
...
@@ -861,8 +861,8 @@ void TestBreakIterator::setUp()
void
TestBreakIterator
::
tearDown
()
{
BootstrapFixtureBase
::
tearDown
();
m_xBreak
.
clear
();
BootstrapFixtureBase
::
tearDown
();
}
CPPUNIT_TEST_SUITE_REGISTRATION
(
TestBreakIterator
);
...
...
i18npool/qa/cppunit/test_ordinalsuffix.cxx
0 → 100644
Dosyayı görüntüle @
ca00d27e
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include <algorithm>
#include <com/sun/star/i18n/XOrdinalSuffix.hpp>
#include <com/sun/star/lang/Locale.hpp>
#include <comphelper/stlunosequence.hxx>
#include <unotest/bootstrapfixturebase.hxx>
using
namespace
com
::
sun
::
star
;
class
TestOrdinalSuffix
:
public
test
::
BootstrapFixtureBase
{
private
:
uno
::
Reference
<
i18n
::
XOrdinalSuffix
>
m_xOrdinal
;
public
:
virtual
void
setUp
();
virtual
void
tearDown
();
void
testFrench
();
void
testEnglish
();
CPPUNIT_TEST_SUITE
(
TestOrdinalSuffix
);
CPPUNIT_TEST
(
testFrench
);
CPPUNIT_TEST
(
testEnglish
);
CPPUNIT_TEST_SUITE_END
();
};
void
TestOrdinalSuffix
::
setUp
()
{
BootstrapFixtureBase
::
setUp
();
m_xOrdinal
=
uno
::
Reference
<
i18n
::
XOrdinalSuffix
>
(
m_xSFactory
->
createInstance
(
"com.sun.star.i18n.OrdinalSuffix"
),
uno
::
UNO_QUERY_THROW
);
}
void
TestOrdinalSuffix
::
tearDown
()
{
m_xOrdinal
.
clear
();
BootstrapFixtureBase
::
tearDown
();
}
void
TestOrdinalSuffix
::
testFrench
()
{
lang
::
Locale
aLocale
(
"fr"
,
"LU"
,
""
);
uno
::
Sequence
<
OUString
>
aSuffixes
;
OUString
*
pStart
,
*
pEnd
,
*
pFind
;
//1er
aSuffixes
=
m_xOrdinal
->
getOrdinalSuffix
(
1
,
aLocale
);
pStart
=
comphelper
::
stl_begin
(
aSuffixes
);
pEnd
=
comphelper
::
stl_end
(
aSuffixes
);
pFind
=
std
::
find
(
pStart
,
pEnd
,
OUString
(
"er"
));
CPPUNIT_ASSERT
(
pFind
!=
pEnd
);
//2e, 3e, etc.
aSuffixes
=
m_xOrdinal
->
getOrdinalSuffix
(
2
,
aLocale
);
pStart
=
comphelper
::
stl_begin
(
aSuffixes
);
pEnd
=
comphelper
::
stl_end
(
aSuffixes
);
pFind
=
std
::
find
(
pStart
,
pEnd
,
OUString
(
"e"
));
CPPUNIT_ASSERT
(
pFind
!=
pEnd
);
}
void
TestOrdinalSuffix
::
testEnglish
()
{
lang
::
Locale
aLocale
(
"en"
,
"US"
,
""
);
uno
::
Sequence
<
OUString
>
aSuffixes
;
OUString
*
pStart
,
*
pEnd
,
*
pFind
;
//1st
aSuffixes
=
m_xOrdinal
->
getOrdinalSuffix
(
1
,
aLocale
);
pStart
=
comphelper
::
stl_begin
(
aSuffixes
);
pEnd
=
comphelper
::
stl_end
(
aSuffixes
);
pFind
=
std
::
find
(
pStart
,
pEnd
,
OUString
(
"st"
));
CPPUNIT_ASSERT
(
pFind
!=
pEnd
);
//2nd
aSuffixes
=
m_xOrdinal
->
getOrdinalSuffix
(
2
,
aLocale
);
pStart
=
comphelper
::
stl_begin
(
aSuffixes
);
pEnd
=
comphelper
::
stl_end
(
aSuffixes
);
pFind
=
std
::
find
(
pStart
,
pEnd
,
OUString
(
"nd"
));
CPPUNIT_ASSERT
(
pFind
!=
pEnd
);
//3rd
aSuffixes
=
m_xOrdinal
->
getOrdinalSuffix
(
3
,
aLocale
);
pStart
=
comphelper
::
stl_begin
(
aSuffixes
);
pEnd
=
comphelper
::
stl_end
(
aSuffixes
);
pFind
=
std
::
find
(
pStart
,
pEnd
,
OUString
(
"rd"
));
CPPUNIT_ASSERT
(
pFind
!=
pEnd
);
}
CPPUNIT_TEST_SUITE_REGISTRATION
(
TestOrdinalSuffix
);
CPPUNIT_PLUGIN_IMPLEMENT
();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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