Skip to content

Commit

Permalink
ICU-22954 USetHeaderOnlyTest
Browse files Browse the repository at this point in the history
  • Loading branch information
markusicu committed Dec 18, 2024
1 parent 63f2f6a commit c9734f6
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 19 deletions.
2 changes: 1 addition & 1 deletion icu4c/source/test/intltest/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ numbertest_parse.o numbertest_doubleconversion.o numbertest_skeletons.o \
static_unisets_test.o numfmtdatadriventest.o numbertest_range.o erarulestest.o \
formattedvaluetest.o formatted_string_builder_test.o numbertest_permutation.o \
units_data_test.o units_router_test.o units_test.o displayoptions_test.o \
numbertest_simple.o uchar_type_build_test.o headeronlytest.o
numbertest_simple.o uchar_type_build_test.o usetheaderonlytest.o

DEPS = $(OBJECTS:.o=.d)

Expand Down
2 changes: 1 addition & 1 deletion icu4c/source/test/intltest/intltest.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@
<ClCompile Include="units_router_test.cpp" />
<ClCompile Include="units_test.cpp" />
<ClCompile Include="uchar_type_build_test.cpp" />
<ClCompile Include="headeronlytest.cpp" />
<ClCompile Include="usetheaderonlytest.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="colldata.h" />
Expand Down
14 changes: 10 additions & 4 deletions icu4c/source/test/intltest/intltest.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -571,10 +571,16 @@
<ClCompile Include="uchar_type_build_test.cpp">
<Filter>configuration</Filter>
</ClCompile>
<ClCompile Include="messageformat2test.cpp" />
<ClCompile Include="messageformat2test_custom.cpp" />
<ClCompile Include="messageformat2test_read_json.cpp" />
<ClCompile Include="localematchertest.cpp">
<ClCompile Include="messageformat2test.cpp">
<Filter>formatting</Filter>
</ClCompile>
<ClCompile Include="messageformat2test_custom.cpp">
<Filter>formatting</Filter>
</ClCompile>
<ClCompile Include="messageformat2test_read_json.cpp">
<Filter>formatting</Filter>
</ClCompile>
<ClCompile Include="usetheaderonlytest.cpp">
<Filter>misc</Filter>
</ClCompile>
</ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions icu4c/source/test/intltest/itutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#include "usettest.h"

extern IntlTest *createBytesTrieTest();
extern IntlTest *createHeaderOnlyTest();
extern IntlTest *createUSetHeaderOnlyTest();
extern IntlTest *createLocaleMatcherTest();
static IntlTest *createLocalPointerTest();
extern IntlTest *createUCharsTrieTest();
Expand Down Expand Up @@ -83,7 +83,7 @@ void IntlTestUtilities::runIndexedTest( int32_t index, UBool exec, const char* &
TESTCASE_AUTO_CLASS(LocaleBuilderTest);
TESTCASE_AUTO_CREATE_CLASS(LocaleMatcherTest);
TESTCASE_AUTO_CREATE_CLASS(UHashTest);
TESTCASE_AUTO_CREATE_CLASS(HeaderOnlyTest);
TESTCASE_AUTO_CREATE_CLASS(USetHeaderOnlyTest);
TESTCASE_AUTO_END;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// © 2024 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html

// headeronlytest.cpp
// usetheaderonlytest.cpp
// created: 2024dec11 Markus W. Scherer

#include <string>
Expand All @@ -19,9 +19,9 @@
#include "unicode/utf16.h"
#include "intltest.h"

class HeaderOnlyTest : public IntlTest {
class USetHeaderOnlyTest : public IntlTest {
public:
HeaderOnlyTest() = default;
USetHeaderOnlyTest() = default;

void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=nullptr) override;

Expand All @@ -31,13 +31,13 @@ class HeaderOnlyTest : public IntlTest {
void TestUSetElementIterator();
};

extern IntlTest *createHeaderOnlyTest() {
return new HeaderOnlyTest();
extern IntlTest *createUSetHeaderOnlyTest() {
return new USetHeaderOnlyTest();
}

void HeaderOnlyTest::runIndexedTest(int32_t index, UBool exec, const char *&name, char * /*par*/) {
void USetHeaderOnlyTest::runIndexedTest(int32_t index, UBool exec, const char *&name, char * /*par*/) {
if(exec) {
logln("TestSuite HeaderOnlyTest: ");
logln("TestSuite USetHeaderOnlyTest: ");
}
TESTCASE_AUTO_BEGIN;
TESTCASE_AUTO(TestUSetCodePointIterator);
Expand All @@ -55,7 +55,7 @@ std::u16string cpString(UChar32 c) {
}
}

void HeaderOnlyTest::TestUSetCodePointIterator() {
void USetHeaderOnlyTest::TestUSetCodePointIterator() {
IcuTestErrorCode errorCode(*this, "TestUSetCodePointIterator");
using U_HEADER_NESTED_NAMESPACE::USetCodePoints;
LocalUSetPointer uset(uset_openPattern(u"[abcçカ🚴]", -1, errorCode));
Expand Down Expand Up @@ -85,7 +85,7 @@ void HeaderOnlyTest::TestUSetCodePointIterator() {
assertTrue(WHERE, iter2 == limit);
}

void HeaderOnlyTest::TestUSetRangeIterator() {
void USetHeaderOnlyTest::TestUSetRangeIterator() {
IcuTestErrorCode errorCode(*this, "TestUSetRangeIterator");
using U_HEADER_NESTED_NAMESPACE::USetRanges;
using U_HEADER_NESTED_NAMESPACE::CodePointRange;
Expand Down Expand Up @@ -150,7 +150,7 @@ void HeaderOnlyTest::TestUSetRangeIterator() {
}
}

void HeaderOnlyTest::TestUSetStringIterator() {
void USetHeaderOnlyTest::TestUSetStringIterator() {
IcuTestErrorCode errorCode(*this, "TestUSetStringIterator");
using U_HEADER_NESTED_NAMESPACE::USetStrings;
LocalUSetPointer uset(uset_openPattern(u"[abcçカ🚴{}{abc}{de}]", -1, errorCode));
Expand Down Expand Up @@ -178,7 +178,7 @@ void HeaderOnlyTest::TestUSetStringIterator() {
assertTrue(WHERE, iter2 == limit);
}

void HeaderOnlyTest::TestUSetElementIterator() {
void USetHeaderOnlyTest::TestUSetElementIterator() {
IcuTestErrorCode errorCode(*this, "TestUSetElementIterator");
using U_HEADER_NESTED_NAMESPACE::USetElements;
LocalUSetPointer uset(uset_openPattern(u"[abcçカ🚴{}{abc}{de}]", -1, errorCode));
Expand Down

0 comments on commit c9734f6

Please sign in to comment.