09822cf77c
Natural string compare function doesn't take into account that the string can start with a number and in this case it treats it like a conventional string compare. This change takes this case into account. This change also refactores the tests for NaturalStringSorter class. The previous tet used a mock XBreakIterator and XCollator implementations to test the functionallity. This is not needed as we can just use a real one instead, which makes the test more real as it actually uses a real implementation instead of a mock implementation, which could differ. This change removes the mock XCollator and XBreakIterator implementations and moves the test into a new file - NaturalStringSortTest.cxx The test is also extended with the new use case where the string starts with a number. Change-Id: I32ea055f914c2947e4d979093b32f56170a61102 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134540 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
47 lines
1.3 KiB
Makefile
47 lines
1.3 KiB
Makefile
# -*- 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,comphelper_test))
|
|
|
|
$(eval $(call gb_CppunitTest_add_exception_objects,comphelper_test, \
|
|
comphelper/qa/string/test_string \
|
|
comphelper/qa/string/NaturalStringSortTest \
|
|
comphelper/qa/container/testifcontainer \
|
|
comphelper/qa/container/testifcontainer3 \
|
|
comphelper/qa/unit/test_hash \
|
|
comphelper/qa/unit/base64_test \
|
|
comphelper/qa/unit/propertyvalue \
|
|
comphelper/qa/unit/types_test \
|
|
comphelper/qa/unit/test_guards \
|
|
comphelper/qa/unit/test_traceevent \
|
|
))
|
|
|
|
$(eval $(call gb_CppunitTest_use_ure,comphelper_test))
|
|
$(eval $(call gb_CppunitTest_use_sdk_api,comphelper_test))
|
|
|
|
$(eval $(call gb_CppunitTest_use_libraries,comphelper_test, \
|
|
comphelper \
|
|
cppuhelper \
|
|
cppu \
|
|
sal \
|
|
unotest \
|
|
))
|
|
|
|
ifeq ($(TLS),NSS)
|
|
$(eval $(call gb_CppunitTest_use_externals,comphelper_test,\
|
|
plc4 \
|
|
nss3 \
|
|
))
|
|
endif
|
|
|
|
$(eval $(call gb_CppunitTest_use_components,comphelper_test,\
|
|
i18npool/util/i18npool \
|
|
))
|
|
|
|
# vim: set noet sw=4 ts=4:
|